/* Portal Theme - Bronze/Champagne Brand */
:root {
    --brand-50: #fdf8f0;
    --brand-100: #faefd9;
    --brand-200: #f3d9a8;
    --brand-300: #E5C158;
    --brand-400: #D4AF37;
    --brand-500: #CD7F32;
    --brand-600: #A67C1E;
    --brand-700: #8B6914;
    --brand-800: #5E4028;
    --brand-900: #3D2810;

    --gold-50: #fdf9f5;
    --gold-100: #f8efdf;
    --gold-200: #f0d9b8;
    --gold-300: #E8D3C4;
    --gold-400: #D9C3B0;
    --gold-500: #B3A16C;
    --gold-600: #9C8A5A;
    --gold-700: #7A6840;
    --gold-800: #5E4028;

    --accent-magenta: #0a0a0a;
    --accent-cyan: #ffffff;

    --brand-500-rgb: 205, 127, 50;
    --brand-600-rgb: 166, 124, 30;
    --brand-800-rgb: 94, 64, 40;
    --gold-400-rgb: 217, 195, 176;
    --gold-500-rgb: 179, 161, 108;
}

body.portal-theme {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #fdf8f0 25%, #fdf9f5 50%, #fdf8f0 75%, #ffffff 100%);
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
    background-attachment: fixed;
}

body.portal-theme::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.1) 45%),
        linear-gradient(120deg, rgba(205, 127, 50, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

body.portal-theme::after {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(179, 161, 108, 0.07) 0%, transparent 45%);
    pointer-events: none;
    z-index: 0;
}

#mainContent,
.portal-content-shell {
    position: relative;
    z-index: 10;
}

body:has(.fixed.inset-0.z-50:not([style*="display: none"])) .portal-content-shell {
    z-index: 40;
}

.empire-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(205, 127, 50, 0.18) 0%, transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.12) 0%, transparent 30%),
        radial-gradient(circle at 50% 50%, rgba(205, 127, 50, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 30% 70%, rgba(0, 0, 0, 0.06) 0%, transparent 40%);
    opacity: 0.9;
    z-index: 0;
    animation: empire-glow-keyframes 8s ease-in-out infinite;
}

.wealth-particles {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.wealth-drop {
    position: absolute;
    background: linear-gradient(45deg, rgba(205, 127, 50, 0.4), rgba(179, 161, 108, 0.3));
    border-radius: 50%;
    z-index: 1;
    animation: wealth-flow-keyframes 12s linear infinite;
}

.sparkle-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(205, 127, 50, 0.8), transparent);
    border-radius: 50%;
    animation: sparkle-keyframes 2s ease-in-out infinite;
    z-index: 1;
}

.bokeh-particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(205, 127, 50, 0.25), transparent 70%);
    animation: float-slow-keyframes 8s ease-in-out infinite;
    z-index: 0;
}

.empire-symbol {
    position: absolute;
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, rgba(205, 127, 50, 0.2), rgba(0, 0, 0, 0.12));
    border-radius: 12px;
    border: 1px solid rgba(205, 127, 50, 0.25);
    opacity: 0.12;
    animation: drift-keyframes 15s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(205, 127, 50, 0.1);
}

.empire-symbol::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 50%;
    background: linear-gradient(to top, rgba(205, 127, 50, 0.35) 0%, rgba(205, 127, 50, 0.15) 50%, transparent 100%);
    border-radius: 2px 2px 0 0;
}

.empire-symbol::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.7), transparent);
    border-radius: 50%;
    animation: twinkle-keyframes 2s ease-in-out infinite;
}

@keyframes float-wealth-keyframes {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
    33% { transform: translateY(-20px) translateX(10px) rotate(120deg); }
    66% { transform: translateY(10px) translateX(-15px) rotate(240deg); }
}

@keyframes wave-flow-keyframes {
    0%, 100% { transform: translateY(0) translateX(0) scale(1); opacity: 0.1; }
    50% { transform: translateY(-30px) translateX(20px) scale(1.5); opacity: 0.3; }
}

@keyframes empire-glow-keyframes {
    0%, 100% { opacity: 0.85; }
    50% { opacity: 1; }
}

@keyframes wealth-flow-keyframes {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-20px) scale(1.2); opacity: 0; }
}

@keyframes sparkle-keyframes {
    0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

@keyframes float-slow-keyframes {
    0%, 100% { transform: translateY(0) translateX(0); }
    33% { transform: translateY(-15px) translateX(10px); }
    66% { transform: translateY(8px) translateX(-8px); }
}

@keyframes drift-keyframes {
    0%, 100% { transform: translateY(0) translateX(0) rotate(0deg); }
    33% { transform: translateY(-20px) translateX(15px) rotate(3deg); }
    66% { transform: translateY(10px) translateX(-10px) rotate(-2deg); }
}

@keyframes twinkle-keyframes {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.empire-glass-card {
    background: linear-gradient(145deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.85) 50%,
        rgba(255, 255, 255, 0.90) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 2px solid;
    border-image: linear-gradient(135deg,
        rgba(205, 127, 50, 0.35),
        rgba(0, 0, 0, 0.2),
        rgba(255, 255, 255, 0.4),
        rgba(205, 127, 50, 0.3)) 1;
    background-clip: padding-box;
    box-shadow:
        0 25px 50px rgba(205, 127, 50, 0.12),
        0 0 0 1px rgba(205, 127, 50, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 0 60px rgba(205, 127, 50, 0.03);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.empire-glass-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.empire-glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(205, 127, 50, 0.12), transparent);
    transition: 0.8s;
    pointer-events: none;
}

.empire-glass-card:hover::before {
    left: 100%;
}

.empire-glass-card--static:hover {
    transform: none;
    box-shadow:
        0 25px 50px rgba(205, 127, 50, 0.12),
        0 0 0 1px rgba(205, 127, 50, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 0 60px rgba(205, 127, 50, 0.03);
}

.empire-glass-card--modal {
    border: 1px solid transparent;
    border-image: none;
    box-shadow:
        0 25px 50px rgba(205, 127, 50, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 0 60px rgba(205, 127, 50, 0.03);
}

.empire-glass-card--modal::after {
    border: none;
}

.empire-glass-card--modal.empire-glass-card--static:hover,
.empire-glass-card--modal:hover {
    transform: none;
    box-shadow:
        0 25px 50px rgba(205, 127, 50, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 0 60px rgba(205, 127, 50, 0.03);
}

.empire-glass-card:not(.empire-glass-card--static):hover {
    box-shadow:
        0 35px 70px rgba(205, 127, 50, 0.25),
        0 0 0 1px rgba(205, 127, 50, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-4px);
}

.empire-modal-header {
    background: linear-gradient(135deg, #3D2810 0%, #8B6914 40%, #CD7F32 100%);
    border-bottom: none;
}

.wealth-accent {
    background: linear-gradient(135deg, #0a0a0a, #B3A16C, #CD7F32);
    background-size: 200% 200%;
    animation: gradient-flow-keyframes 6s ease infinite;
}

@keyframes gradient-flow-keyframes {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.luxury-text {
    background: linear-gradient(135deg, #0a0a0a 0%, #B3A16C 50%, #CD7F32 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: luxury-shine-keyframes 4s linear infinite;
}

.brand-tagline {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(205, 127, 50, 0.25);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(255, 254, 240, 0.95));
    box-shadow: 0 10px 20px rgba(205, 127, 50, 0.12);
    text-transform: uppercase;
    letter-spacing: 0.24em;
    font-weight: 600;
    font-size: 0.7rem;
    color: #A67C00;
    backdrop-filter: blur(6px);
}

.brand-tagline::before,
.brand-tagline::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(205, 127, 50, 0.95), rgba(179, 161, 108, 0.6));
    box-shadow: 0 0 8px rgba(205, 127, 50, 0.4);
    flex-shrink: 0;
}

@keyframes luxury-shine-keyframes {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.empire-input {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    border: 2px solid transparent;
    background-clip: padding-box;
    box-shadow:
        0 4px 15px rgba(15, 23, 42, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.empire-input:hover {
    border-color: rgba(205, 127, 50, 0.18);
    box-shadow: 0 6px 18px rgba(205, 127, 50, 0.12);
}

.empire-input:focus {
    outline: none;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    border-color: rgba(205, 127, 50, 0.45);
    box-shadow:
        0 8px 25px rgba(205, 127, 50, 0.2),
        0 0 0 3px rgba(179, 161, 108, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.empire-input::placeholder {
    color: rgba(107, 114, 128, 0.6);
    font-style: italic;
}

.empire-logo-glow {
    animation: empire-logo-glow-keyframes 4s infinite ease-in-out;
}

@keyframes empire-logo-glow-keyframes {
    0%, 100% { filter: drop-shadow(0 0 15px rgba(205, 127, 50, 0.45)); }
    50% { filter: drop-shadow(0 0 25px rgba(205, 127, 50, 0.70)); }
}

.empire-btn {
    background: linear-gradient(135deg, #0a0a0a 0%, #B3A16C 50%, #CD7F32 100%);
    background-size: 200% 200%;
    animation: gradient-flow-keyframes 6s ease infinite;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 8px 25px rgba(205, 127, 50, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    letter-spacing: 0.08em;
    color: #fff;
}

.logo-frame {
    border-radius: 999px;
    box-shadow: 0 12px 30px rgba(205, 127, 50, 0.18);
    isolation: isolate;
}

.logo-frame::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: inherit;
    border: 1px solid rgba(205, 127, 50, 0.25);
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.2);
    z-index: 0;
    pointer-events: none;
}

.subtitle-text {
    color: rgba(75, 85, 99, 0.9);
    font-weight: 500;
    line-height: 1.6;
}

.saying-text {
    font-style: italic;
    max-width: 26rem;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    color: rgba(55, 65, 81, 0.92);
}

.saying-text::after {
    content: '';
    display: block;
    width: 55%;
    height: 2px;
    margin: 0.6rem auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.65), rgba(179, 161, 108, 0.15));
}

.form-hint {
    color: rgba(107, 114, 128, 0.75);
    letter-spacing: 0.02em;
}

.link-accent {
    position: relative;
    display: inline-block;
}

.link-accent::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.6), rgba(179, 161, 108, 0.2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.link-accent:hover::after {
    transform: scaleX(1);
}

body.portal-theme input[type='checkbox'] {
    accent-color: #B3A16C;
}

.empire-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: 0.6s;
}

.empire-btn:hover::before {
    left: 100%;
}

.empire-btn:hover {
    box-shadow:
        0 12px 35px rgba(205, 127, 50, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.empire-btn:disabled {
    opacity: 0.7;
    transform: none;
    cursor: not-allowed;
}

.empire-silhouette {
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, rgba(205, 127, 50, 0.25), rgba(0, 0, 0, 0.2));
    border-radius: 8px;
    position: relative;
}

.empire-silhouette::before {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 40%;
    background: linear-gradient(to top, rgba(205, 127, 50, 0.4) 0%, transparent 100%);
    border-radius: 2px;
}

@media (max-width: 640px) {
    .empire-glass-card--login {
        width: 95%;
        margin: 0 auto;
        padding: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .empire-glass-card--login {
        min-width: 480px;
    }
}

/* Lighter glass panel for dense content (tables, lists) */
.empire-panel {
    background: linear-gradient(145deg,
        rgba(255, 255, 255, 0.97) 0%,
        rgba(255, 255, 255, 0.92) 50%,
        rgba(253, 248, 240, 0.95) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(205, 127, 50, 0.18);
    box-shadow:
        0 8px 30px rgba(205, 127, 50, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
}

.empire-page-header {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(253, 248, 240, 0.95) 0%, rgba(253, 249, 245, 0.9) 50%, rgba(255, 255, 255, 0.95) 100%);
    border: 1px solid rgba(205, 127, 50, 0.2);
    border-radius: 1rem;
    box-shadow: 0 8px 30px rgba(205, 127, 50, 0.08);
}

.empire-page-header::before {
    content: '';
    position: absolute;
    top: -2rem;
    right: -2rem;
    width: 8rem;
    height: 8rem;
    background: radial-gradient(circle, rgba(205, 127, 50, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.empire-page-header::after {
    content: '';
    position: absolute;
    bottom: -1.5rem;
    left: -1.5rem;
    width: 6rem;
    height: 6rem;
    background: radial-gradient(circle, rgba(179, 161, 108, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.empire-page-title {
    font-family: 'Playfair Display', serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #B3A16C 50%, #CD7F32 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: luxury-shine-keyframes 4s linear infinite;
}

.empire-page-title--light {
    font-family: 'Playfair Display', serif;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    background: none;
    animation: none;
}

.empire-stat-value {
    font-weight: 700;
    background: linear-gradient(135deg, #5E4028 0%, #CD7F32 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.empire-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(205, 127, 50, 0.22);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(253, 248, 240, 0.95));
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8B6914;
}

.empire-btn-secondary {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(253, 248, 240, 0.9));
    border: 2px solid rgba(205, 127, 50, 0.35);
    color: #8B6914;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(205, 127, 50, 0.1);
}

.empire-btn-secondary:hover {
    background: linear-gradient(145deg, rgba(253, 248, 240, 1), rgba(250, 239, 217, 0.95));
    border-color: rgba(205, 127, 50, 0.5);
    box-shadow: 0 6px 18px rgba(205, 127, 50, 0.15);
    color: #5E4028;
}

.empire-btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (prefers-reduced-motion: reduce) {
    .wealth-drop,
    .sparkle-particle,
    .bokeh-particle,
    .empire-symbol,
    .empire-pattern,
    .luxury-text,
    .empire-page-title,
    .empire-btn,
    .empire-logo-glow {
        animation: none !important;
    }

    .empire-glass-card:not(.empire-glass-card--static):hover,
    .empire-btn:hover {
        transform: none;
    }
}
