/* ============================================
   HOLY SPIRIT SOUNDS™ — MASTER STYLESHEET
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-glass: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.08);

    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;

    --accent-gold-light: #f9d423;
    --accent-gold-dark: #aa771c;
    --gradient-gold: linear-gradient(135deg, #d4af37 0%, #f3e5ab 50%, #aa771c 100%);
    --gradient-primary: linear-gradient(135deg, #ff4e50 0%, #f9d423 100%);

    --nav-height: 70px;
    --transition-fast: 0.3s ease;
    --radius: 16px;
    --radius-sm: 8px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Outfit', sans-serif; line-height: 1.3; }
a { color: inherit; }
img { max-width: 100%; height: auto; }

/* ---------- Utility Classes ---------- */
.hidden        { display: none !important; }
.container     { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-center   { text-align: center; }
.text-left     { text-align: left; }
.text-right    { text-align: right; }
.text-white    { color: #fff; }
.text-gold     { color: var(--accent-gold-light); }
.text-secondary{ color: var(--text-secondary); }
.text-success  { color: #4caf50; font-weight: 600; }
.text-danger   { color: #f44336; font-weight: 600; }
.font-bold     { font-weight: 700; }
.uppercase     { text-transform: uppercase; }
.inline-block  { display: inline-block; }
.w-100         { width: 100%; }
.m-0           { margin: 0; }
.mt-2          { margin-top: 0.5rem; }
.mt-3          { margin-top: 1rem; }
.mt-4          { margin-top: 1.5rem; }
.mt-5          { margin-top: 3rem; }
.mb-1          { margin-bottom: 0.25rem; }
.mb-2          { margin-bottom: 0.5rem; }
.mb-3          { margin-bottom: 1rem; }
.mb-4          { margin-bottom: 1.5rem; }
.mb-5          { margin-bottom: 3rem; }
.p-4           { padding: 1.5rem; }
.p-5           { padding: 2.5rem; }
.pt-4          { padding-top: 1.5rem; }
.pt-5          { padding-top: 3rem; }
.pb-3          { padding-bottom: 1rem; }
.mr-2          { margin-right: 0.5rem; }
.mx-auto       { margin-left: auto; margin-right: auto; }
.small         { font-size: 0.85rem; }
.lead-text     { font-size: 1.15rem; color: var(--text-secondary); }
.position-relative { position: relative; z-index: 2; }
.border-bottom { border-bottom: 1px solid rgba(255,255,255,0.08); }

/* Flex */
.flex          { display: flex; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap     { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.align-items-start  { align-items: flex-start; }
.gap-3         { gap: 1rem; }
.gap-4         { gap: 1.5rem; }

/* Grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 992px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr; }
    .p-5 { padding: 1.5rem; }
}

/* ---------- Typography ---------- */
.glamour-title {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* ---------- Glassmorphism ---------- */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius);
}

/* ============================================
   NAVIGATION
   ============================================ */
.main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 3%;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    z-index: 1000;
}

.main-nav .logo a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
    white-space: nowrap;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 6px 8px;
    border-radius: 6px;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.admin-link { color: var(--accent-gold-light) !important; }

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition-fast);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--gradient-gold);
    color: #000;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.3);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-sm { padding: 8px 16px; font-size: 0.78rem; }

.btn-icon {
    width: 45px; height: 45px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 1rem;
}
.btn-icon:hover { background: rgba(255,255,255,0.1); }

.btn-icon-small {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
    margin-right: 4px;
}
.btn-icon-small:hover {
    background: rgba(255,255,255,0.12);
    transform: scale(1.1);
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
#app-content {
    margin-top: var(--nav-height);
    min-height: calc(100vh - var(--nav-height));
}

#app-content.no-nav-margin {
    margin-top: 0;
}

/* ============================================
   PAGE SECTIONS (all public pages)
   ============================================ */
.section {
    padding: 60px 0;
}

.page-header {
    height: 45vh;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    overflow: hidden;
}
.page-header h1 { font-size: 2.8rem; }
.page-header .lead-text { font-size: 1.2rem; margin-top: 0.5rem; }

.header-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(10,10,15,0.5) 0%, rgba(10,10,15,0.85) 100%);
}

/* Tags */
.tag {
    padding: 6px 16px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 20px;
    color: var(--accent-gold-light);
    font-size: 0.82rem;
    font-weight: 500;
    display: inline-block;
}

.feature-tags { display: flex; gap: 12px; flex-wrap: wrap; }

/* Value cards (About page) */
.value-card {
    padding: 24px;
    transition: transform 0.3s ease;
}
.value-card:hover { transform: translateY(-4px); }

.value-icon {
    width: 60px; height: 60px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: var(--accent-gold-light);
    border-radius: 50%;
    margin-bottom: 15px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

/* Hero Section (Home) */
.hero-section {
    height: 90vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-section h1 { font-size: 3.5rem; margin-bottom: 1rem; }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(10,10,15,0.4) 0%, rgba(10,10,15,0.9) 100%);
    z-index: 1;
}

.hero-content { position: relative; z-index: 2; max-width: 800px; padding: 0 24px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }

/* Section Cards */
.section-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.section-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

/* Max widths */
.max-w-800 { max-width: 800px; }

/* ============================================
   FORMS
   ============================================ */
.custom-form .form-group { text-align: left; }
.custom-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    transition: border-color 0.3s, background 0.3s;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent-gold-light);
    background: rgba(0,0,0,0.6);
}
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }

/* ============================================
   LOADING OVERLAY
   ============================================ */
#action-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}
#action-overlay.hidden { opacity: 0; pointer-events: none; }

.spinner {
    width: 44px; height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-gold-light);
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   PWA INSTALL PROMPT
   ============================================ */
#pwa-install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 10000;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#pwa-install-prompt.hidden { transform: translate(-50%, 150%); display: flex !important; }
.pwa-content { display: flex; align-items: center; gap: 15px; }
.pwa-icon { width: 50px; height: 50px; border-radius: 12px; }
.pwa-text h4 { margin: 0 0 5px 0; font-size: 1.05rem; }
.pwa-text p { margin: 0; font-size: 0.85rem; color: var(--text-secondary); }
.pwa-actions { display: flex; justify-content: flex-end; gap: 10px; }
.pwa-actions .btn { padding: 8px 16px; font-size: 0.8rem; }

/* ============================================
   PRODUCT / MEDIA CARDS
   ============================================ */
.product-card, .media-card, .section-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}
.product-card:hover, .media-card:hover {
    transform: translateY(-5px);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

/* Social links */
.social-links { display: flex; gap: 12px; flex-wrap: wrap; }
.social-icon {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}
.social-icon:hover { color: var(--accent-gold-light); }

/* ============================================
   MODAL OVERLAY
   ============================================ */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 9998;
}

/* ============================================
   RESPONSIVE — PUBLIC NAV
   ============================================ */
@media (max-width: 992px) {
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: rgba(12,12,18,0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px 24px;
        gap: 4px;
        border-bottom: 1px solid var(--border-glass);
    }
    .nav-links.active { display: flex; }
    .nav-links a { padding: 10px 12px; font-size: 0.85rem; }
    .mobile-menu-toggle { display: flex; }
    .hero-section h1 { font-size: 2.2rem; }
    .page-header h1 { font-size: 2rem; }
}

@media (max-width: 600px) {
    .hero-section { height: 80vh; }
    .hero-section h1 { font-size: 1.8rem; }
    .container { padding: 0 16px; }
    .section { padding: 40px 0; }
}

/* ============================================
   ADMIN PANEL
   ============================================ */

/* Wrapper */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    position: fixed;
    top: 0; left: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(18,18,26,0.98) 0%, rgba(10,10,15,0.98) 100%);
    border-right: 1px solid var(--border-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 900;
    padding: 0;
    border-radius: 0;
    overflow-y: auto;
}

.sidebar-header {
    padding: 28px 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.admin-nav {
    list-style: none;
    padding: 16px 12px;
    flex-grow: 1;
}
.admin-nav li { margin-bottom: 4px; }

.admin-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    transition: all 0.25s ease;
    font-size: 0.92rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}
.admin-nav a:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}
.admin-nav a.active {
    background: linear-gradient(135deg, rgba(212,175,55,0.15) 0%, rgba(249,212,35,0.08) 100%);
    color: var(--accent-gold-light);
    font-weight: 600;
}
.admin-nav a.active::before {
    content: '';
    position: absolute;
    left: 0; top: 15%; height: 70%; width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--gradient-gold);
}
.admin-nav .icon {
    font-size: 1.15rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 20px 20px 24px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.user-info { display: flex; align-items: center; gap: 12px; }

/* Admin Content */
.admin-content {
    flex-grow: 1;
    margin-left: 260px;
    padding: 40px 40px 60px;
    min-height: 100vh;
    background: var(--bg-primary);
}

/* Stat Cards */
.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    height: 3px;
    background: var(--gradient-gold);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}
.stat-card:hover::after { opacity: 1; }

/* Toggle Switch */
.custom-switch {
    position: relative;
    display: inline-block;
    width: 52px; height: 28px;
    flex-shrink: 0;
}
.custom-switch input { opacity: 0; width: 0; height: 0; }

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 28px;
    transition: all 0.35s ease;
}
.switch-slider::before {
    position: absolute;
    content: '';
    height: 20px; width: 20px;
    left: 3px; bottom: 3px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.35s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.custom-switch input:checked + .switch-slider {
    background: linear-gradient(135deg, rgba(212,175,55,0.4), rgba(249,212,35,0.25));
    border-color: var(--accent-gold-light);
}
.custom-switch input:checked + .switch-slider::before {
    transform: translateX(24px);
    background: var(--accent-gold-light);
    box-shadow: 0 0 10px rgba(249,212,35,0.4);
}

/* Admin Table */
.admin-table { border-collapse: collapse; width: 100%; }
.admin-table th {
    padding: 14px 16px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-align: left;
}
.admin-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.92rem;
    color: var(--text-secondary);
    vertical-align: middle;
}
.admin-table tbody tr { transition: background 0.2s ease; }
.admin-table tbody tr:hover { background: rgba(255,255,255,0.03); }

/* Badges */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-block;
}
.badge-gold { background: rgba(212,175,55,0.15); color: var(--accent-gold-light); border: 1px solid rgba(212,175,55,0.3); }
.badge-blue { background: rgba(55,150,212,0.15); color: #64b5f6; border: 1px solid rgba(55,150,212,0.3); }
.badge-gray { background: rgba(255,255,255,0.05); color: #999; border: 1px solid rgba(255,255,255,0.1); }

/* Activity Timeline */
.activity-timeline { list-style: none; padding: 0; margin: 0; }
.activity-timeline li {
    padding: 14px 0 14px 24px;
    border-left: 2px solid rgba(255,255,255,0.06);
    position: relative;
    transition: border-color 0.2s;
}
.activity-timeline li:hover { border-left-color: var(--accent-gold-light); }
.activity-timeline li::before {
    content: '';
    position: absolute;
    left: -5px; top: 18px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent-gold-light);
    box-shadow: 0 0 8px rgba(249,212,35,0.3);
}
.activity-timeline .time {
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.activity-timeline .desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Admin Responsive */
@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .admin-sidebar { width: 220px; }
    .admin-content { margin-left: 220px; padding: 24px 20px; }
}
@media (max-width: 600px) {
    .admin-sidebar {
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1100;
    }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-content { margin-left: 0; padding: 20px 16px; }
}

/* ============================================
   ERROR PAGES
   ============================================ */
.error-view, .error-msg {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px;
}
.error-msg h2 { margin-bottom: 1rem; }
