:root {
    --primary: #29104A; /* Deep Royal Purple */
    --primary-light: #7A4DBB; /* Regal Violet */
    --primary-soft: #C3A6D8; /* Lavender Accent */
    --background: #F6F1FA; /* Soft Lilac Background */
    --surface: #F0E6F6; /* Velvet Surface */
    --surface-hover: #E7DAF3; /* Hover Highlight */
    --border-soft: #D8C9E9; /* Gentle Border */
    --text-primary: #1B0F28; /* Dark Text */
    --text-secondary: #4D3A5A; /* Muted Text */
    --success: #4CAF50;
    --warning: #F7B74A;
    --error: #E53935;
    --info: #5C6BC0;
    /* Gold accent for shimmer */
    --gold: #D4AF37;
    --gold-wave: linear-gradient(270deg, #D4AF37 0%, #FFF1A8 50%, #D4AF37 100%);
    --gold-wave-size: 200%;
    --appbar-shadow: rgba(32, 10, 51, 0.25);
}

/* --- GOLD SHIMMER ANIMATION --- */
@keyframes waveGold {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100% 0%;
    }
}

/* For text shimmer */
.animated-gold-text {
    background: var(--gold-wave);
    background-size: var(--gold-wave-size) 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: waveGold 3s linear infinite;
}

/* For borders or indicators */
.animated-gold-border {
    border-image: var(--gold-wave) 1;
    border-width: 2px;
    border-style: solid;
    animation: waveGold 4s linear infinite;
}

/* --- Hide footer option --- */
.hide-footer .footer {
    display: none !important;
}

/* --- BASE BACKGROUND & TEXT --- */
body {
    background-color: var(--background);
    color: var(--text-primary);
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

/* --- SURFACES / CARDS / PANELS --- */
.mud-paper,
.card,
.surface {
    background-color: var(--surface) !important;
    border: 1px solid var(--border-soft) !important;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(41, 16, 74, 0.25), 0 2px 8px rgba(122, 77, 187, 0.15);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .mud-paper:hover,
    .card:hover {
        background-color: var(--surface-hover) !important;
        transform: scale(1.01);
        box-shadow: 0 8px 20px rgba(41, 16, 74, 0.35), 0 4px 12px rgba(212, 175, 55, 0.25);
    }

/* --- HEADERS / APPBAR --- */
.mud-appbar {
    background: linear-gradient(90deg, var(--primary), var(--primary-light)) !important;
    color: white !important;
    box-shadow: 0 3px 12px var(--appbar-shadow) !important;
    border-bottom: 2px solid var(--gold);
}

/* --- BUTTON STYLING (Royal Glass) --- */
.button-glass {
    background: linear-gradient(135deg, rgba(122, 77, 187, 0.6), rgba(41, 16, 74, 0.8));
    color: white !important;
    backdrop-filter: blur(8px);
    border: 1px solid var(--gold);
    border-radius: 12px;
    transition: 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
}

    .button-glass:hover {
        background: linear-gradient(135deg, rgba(122, 77, 187, 0.8), rgba(41, 16, 74, 0.95));
        box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
    }

    /* Add animated gold border on hover */
    .button-glass:hover {
        border-image: var(--gold-wave) 1;
        animation: waveGold 4s linear infinite;
    }

/* --- INPUTS --- */
.mud-input-root,
.mud-select {
    background-color: var(--surface) !important;
    border-radius: 12px !important;
    border: 1px solid var(--border-soft) !important;
    transition: 0.3s ease;
}

    .mud-input-root:focus-within,
    .mud-select:focus-within {
        border: 1px solid var(--gold) !important;
        box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
    }

/* --- TABLES --- */
.mud-table {
    background-color: var(--surface) !important;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
}

.mud-table-row:hover {
    background-color: var(--surface-hover) !important;
    box-shadow: inset 0 0 8px rgba(122, 77, 187, 0.25);
}

/* --- DIALOGS --- */
.mud-dialog {
    background-color: var(--surface) !important;
    border-radius: 18px !important;
    border: 1px solid var(--gold) !important;
    box-shadow: 0 8px 24px rgba(41, 16, 74, 0.35);
}

.dialog-backdrop-blur {
    backdrop-filter: blur(20px) brightness(0.7);
    background: rgba(41, 16, 74, 0.6) !important;
}

/* --- TEXT COLORS --- */
.text-primary {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

/* --- ROYAL TITLES --- */
.royal-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    background: linear-gradient(to right, var(--primary-light), var(--primary-soft));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

    /* Apply animated gold shimmer to royal titles */
    .royal-title.gold-shimmer {
        background: var(--gold-wave);
        background-size: var(--gold-wave-size) 100%;
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        animation: waveGold 3s linear infinite;
    }

/* --- IGNIS NAV CONTAINER --- */
.ignis-nav {
    background: linear-gradient(180deg, rgba(16, 13, 22, 0.97), rgba(13, 10, 18, 0.99));
    border-right: 1px solid rgba(212, 175, 55, 0.45);
    padding: 12px 10px;
    box-shadow: inset -8px 0 22px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.03);
}

    .ignis-nav .mud-nav-link {
        color: rgba(237, 231, 246, 0.78) !important;
    }

        .ignis-nav .mud-nav-link:hover {
            background: rgba(122, 77, 187, 0.18);
            box-shadow: inset 0 0 8px rgba(212, 175, 55, 0.12);
        }

        .ignis-nav .mud-nav-link.active {
            background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(122, 77, 187, 0.22));
            box-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
        }

            .ignis-nav .mud-nav-link.active::before {
                content: "";
                position: absolute;
                left: 0;
                top: 10%;
                height: 80%;
                width: 4px;
                background: var(--gold-wave);
                background-size: var(--gold-wave-size) 100%;
                animation: waveGold 3s linear infinite;
                border-radius: 4px;
            }

    /* --- NAV GROUP HEADERS --- */
    .ignis-nav .mud-nav-group > .mud-nav-link {
        background: rgba(255,255,255,0.035);
        border: 1px solid rgba(212,175,55,0.18);
    }

    .ignis-nav .mud-nav-group.mud-expanded > .mud-nav-link {
        box-shadow: 0 0 14px rgba(212, 175, 55, 0.35);
    }

.nav-image-container {
    padding: 24px 12px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.35);
}

    .nav-image-container img {
        border-radius: 16px;
        box-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
    }

.ignis-nav .mud-divider {
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    height: 1px;
    opacity: 0.6;
}

.ignis-drawer {
    background: linear-gradient(180deg, rgba(16, 13, 22, 0.97), rgba(13, 10, 18, 0.99)) !important;
}

/* Layout container fills viewport */
.ignis-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main content grows to fill space above footer */
.ignis-main-content {
    flex: 1 0 auto;
}

/* Footer never shrinks */
.ignis-footer {
    flex-shrink: 0;
}
