/* ═══════════════════════════════════════════════════════════════
   MIDNIGHT THEME — Cosmic Deep Space Reskin
   A premium game-wide theme: deep indigo, starfields,
   aurora borealis, nebula glows, constellation dust.
   Applied via body.theme-midnight (on top of body.rebrand)
   ═══════════════════════════════════════════════════════════════ */

/* ── KEYFRAME ANIMATIONS ── */

@keyframes midnight-twinkle-1 {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}
@keyframes midnight-twinkle-2 {
    0%, 100% { opacity: 0.5; }
    33% { opacity: 0.1; }
    66% { opacity: 0.9; }
}
@keyframes midnight-twinkle-3 {
    0%, 100% { opacity: 0.15; }
    25% { opacity: 0.8; }
    75% { opacity: 0.4; }
}

@keyframes midnight-aurora {
    0% {
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
    25% { background-position: 50% 30%; }
    50% {
        background-position: 100% 50%;
        filter: hue-rotate(30deg);
    }
    75% { background-position: 50% 70%; }
    100% {
        background-position: 0% 50%;
        filter: hue-rotate(0deg);
    }
}

@keyframes midnight-nebula-drift {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
    33% { transform: translate(10px, -5px) scale(1.05); opacity: 0.6; }
    66% { transform: translate(-5px, 8px) scale(0.97); opacity: 0.3; }
}

@keyframes midnight-star-float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.6; }
    50% { transform: translateY(-3px) rotate(180deg); opacity: 1; }
}

@keyframes midnight-core-pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.12); opacity: 0.85; }
}

@keyframes midnight-ring-expand {
    0% { transform: scale(0.95); opacity: 0.8; border-color: rgba(140,180,255,0.7); }
    50% { opacity: 0.4; }
    100% { transform: scale(1.25); opacity: 0; border-color: rgba(100,140,220,0.1); }
}

@keyframes midnight-outer-ring {
    0% { transform: scale(0.9); opacity: 0.5; }
    70% { opacity: 0.15; }
    100% { transform: scale(1.35); opacity: 0; }
}

@keyframes midnight-shimmer {
    0% { transform: translateX(-40px); opacity: 0; }
    50% { opacity: 0.8; }
    100% { transform: translateX(40px); opacity: 0; }
}

@keyframes midnight-glow-breathe {
    0%, 100% { box-shadow: 0 0 15px rgba(100,140,220,0.15), 0 0 30px rgba(80,60,180,0.05); }
    50% { box-shadow: 0 0 22px rgba(100,140,220,0.25), 0 0 45px rgba(80,60,180,0.1); }
}

@keyframes midnight-scan {
    0% { top: -2px; opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { top: calc(100% + 2px); opacity: 0; }
}

@keyframes midnight-constellation-pulse {
    0%, 100% { opacity: 0.03; }
    50% { opacity: 0.08; }
}

@keyframes midnight-topbar-aurora {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes midnight-cell-starfield {
    0% { background-position: 0 0, 25px 25px, 50px 10px; }
    100% { background-position: 200px 100px, 225px 125px, 250px 110px; }
}

@keyframes midnight-modal-appear {
    0% { opacity: 0; transform: scale(0.95) translateY(8px); filter: blur(4px); }
    100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}

@keyframes midnight-progress-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(100,160,255,0.5), 0 0 20px rgba(80,120,220,0.2); }
    50% { box-shadow: 0 0 14px rgba(120,180,255,0.7), 0 0 30px rgba(100,140,240,0.3); }
}

@keyframes midnight-shooting-star {
    0% { transform: translateX(0) translateY(0) rotate(-45deg); opacity: 0; width: 0; }
    5% { opacity: 1; width: 40px; }
    15% { opacity: 0.6; width: 60px; }
    30% { opacity: 0; width: 80px; }
    100% { transform: translateX(300px) translateY(300px) rotate(-45deg); opacity: 0; width: 0; }
}

@keyframes midnight-stardust-float {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 0.7; }
    90% { opacity: 0.7; }
    100% { transform: translateY(-80px) translateX(20px); opacity: 0; }
}


/* ════════════════════════════════════════════
   1. CORE PALETTE — CSS Variable Overrides
   ════════════════════════════════════════════ */
body.theme-midnight {
    --frame:      #1a2048;
    --frame-hi:   #2a3468;
    --frame-lo:   #0a0e28;
    --panel-bg:   #10142e;
    --dark-bg:    #0c0f24;
    --darkest:    #08091a;
    --gold:       #8cb4e8;
    --gold-dim:   #5a7aaa;
    --green:      #4ae8a0;
    --red:        #ff5566;
    --white:      #d0daf0;
    --muted:      #5a6a8a;
    --chat-bg:    #080a18;
    --cell-bg:    #121630;
    --cell-hover: #1a2040;
    --cell-active:#222850;

    --midnight-accent: #8cb4e8;
    --midnight-accent-dim: #5a7aaa;
    --midnight-aurora-1: #40ddaa;
    --midnight-aurora-2: #6a66ff;
    --midnight-aurora-3: #aa44ff;
    --midnight-nebula: rgba(80,60,180,0.08);
    --midnight-star: rgba(200,220,255,0.8);

    /* Override parchment variables so rebrand's texture surfaces
       use midnight colors instead of brown mahogany */
    --parchment-shade-base: #10142e;
    --parchment-shade-overlay: linear-gradient(180deg,
        rgba(16,20,46,0.7), rgba(8,9,26,0.7));
    --parchment-shade-radial: radial-gradient(ellipse at center,
        rgba(140,180,232,0.03) 0%, transparent 60%);
    --parchment-shade-image: none;

    background: #060814 !important;
}


/* ════════════════════════════════════════════
   2. BODY — Deep Space Background + Starfield
   ════════════════════════════════════════════ */

/* Main starfield layer on game wrapper */
body.theme-midnight .game {
    background:
        /* Layer 1: Tiny distant stars */
        radial-gradient(1px 1px at 10% 15%, rgba(200,220,255,0.9), transparent),
        radial-gradient(1px 1px at 25% 8%, rgba(180,200,255,0.7), transparent),
        radial-gradient(1px 1px at 40% 22%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 55% 5%, rgba(200,210,255,0.8), transparent),
        radial-gradient(1px 1px at 70% 18%, rgba(220,230,255,0.6), transparent),
        radial-gradient(1px 1px at 85% 12%, rgba(200,220,255,0.7), transparent),
        radial-gradient(1px 1px at 15% 35%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 60% 42%, rgba(200,220,255,0.6), transparent),
        radial-gradient(1px 1px at 90% 38%, rgba(180,200,255,0.8), transparent),
        radial-gradient(1px 1px at 35% 55%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 78% 62%, rgba(200,210,255,0.7), transparent),
        radial-gradient(1px 1px at 5% 72%, rgba(220,230,255,0.6), transparent),
        radial-gradient(1px 1px at 48% 78%, rgba(200,220,255,0.5), transparent),
        radial-gradient(1px 1px at 92% 85%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 20% 92%, rgba(200,220,255,0.7), transparent),
        /* Layer 2: Brighter stars with subtle glow */
        radial-gradient(2px 2px at 18% 20%, rgba(180,210,255,0.9), transparent),
        radial-gradient(2px 2px at 52% 10%, rgba(200,200,255,0.8), transparent),
        radial-gradient(2px 2px at 82% 45%, rgba(220,220,255,0.7), transparent),
        radial-gradient(2px 2px at 33% 70%, rgba(180,200,255,0.6), transparent),
        radial-gradient(2px 2px at 67% 88%, rgba(200,220,255,0.8), transparent),
        /* Layer 3: Deep space nebula hints */
        radial-gradient(ellipse 400px 200px at 30% 40%, rgba(60,40,120,0.06), transparent),
        radial-gradient(ellipse 300px 300px at 70% 60%, rgba(40,60,120,0.05), transparent),
        radial-gradient(ellipse 500px 250px at 50% 20%, rgba(80,50,140,0.04), transparent),
        /* Base */
        #060814;
}

/* Shooting stars + starfield now handled by theme-midnight-fx.js canvas */


/* ════════════════════════════════════════════
   3. TOP BAR — Cosmic Header with Aurora Edge
   ════════════════════════════════════════════ */
body.theme-midnight .topbar {
    background: linear-gradient(180deg, #141838 0%, #0e1228 100%) !important;
    border-bottom: 2px solid #0a0e22 !important;
    box-shadow:
        inset 0 1px 0 rgba(140,180,232,0.12),
        0 2px 8px rgba(0,0,0,0.6),
        0 4px 20px rgba(40,60,120,0.15) !important;
    position: relative;
}

/* Aurora shimmer at bottom edge of topbar */
body.theme-midnight .topbar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--midnight-aurora-1) 15%,
        var(--midnight-aurora-2) 35%,
        var(--midnight-accent) 50%,
        var(--midnight-aurora-3) 65%,
        var(--midnight-aurora-1) 85%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: midnight-topbar-aurora 8s ease-in-out infinite;
    opacity: 0.6;
    z-index: 1;
}

body.theme-midnight .topbar-title {
    color: var(--midnight-accent) !important;
    text-shadow: 1px 1px 0 #000, 0 0 15px rgba(140,180,232,0.4), 0 0 30px rgba(100,140,220,0.15) !important;
}

body.theme-midnight .topbar-alpha {
    background: linear-gradient(135deg, var(--midnight-aurora-2), var(--midnight-aurora-3)) !important;
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4) !important;
}

body.theme-midnight .topbar-stat {
    color: var(--white) !important;
}

body.theme-midnight .gold {
    color: var(--midnight-accent) !important;
}

body.theme-midnight .topbar-settings-btn {
    color: var(--muted);
}
body.theme-midnight .topbar-settings-btn:hover {
    color: var(--midnight-accent);
}
body.theme-midnight .account-dropdown {
    background: linear-gradient(180deg, #1a2040, #0e1428);
    border-color: #080c18;
    box-shadow: inset 1px 1px 0 rgba(60,80,140,0.3), inset -1px -1px 0 rgba(8,12,24,0.5), 0 8px 28px rgba(0,0,0,0.7);
}
body.theme-midnight .account-dropdown::before { background: linear-gradient(90deg, transparent, rgba(140,180,232,0.2), transparent); }
body.theme-midnight .account-dropdown-name { color: var(--midnight-accent); text-shadow: 1px 1px 0 #000, 0 0 10px rgba(140,180,232,0.2); }
body.theme-midnight .account-dropdown-item:hover { background: linear-gradient(90deg, rgba(140,180,232,0.08), transparent 80%); }
body.theme-midnight .account-dropdown-item::before { background: var(--midnight-accent); }
body.theme-midnight .account-dropdown-divider { background: linear-gradient(90deg, transparent, rgba(140,180,232,0.12), transparent); }

body.theme-midnight .online-dot {
    background: var(--midnight-aurora-1) !important;
    box-shadow: 0 0 6px rgba(64,221,170,0.6) !important;
}

body.theme-midnight .prestige-badge {
    background: linear-gradient(135deg, #1a2060, #2a1860) !important;
    border-color: var(--midnight-aurora-2) !important;
    color: var(--midnight-aurora-2) !important;
}


/* ════════════════════════════════════════════
   4. GAME BODY — Deep Space
   ════════════════════════════════════════════ */
body.theme-midnight .game-body {
    background: transparent !important;
}


/* ════════════════════════════════════════════
   5. VIEWPORT — Nebula Window
   ════════════════════════════════════════════ */
body.theme-midnight .viewport {
    background: rgba(6,8,20,0.55) !important;
    border-color: #1a2048 !important;
    box-shadow:
        inset 0 0 100px rgba(20,30,80,0.6),
        inset 0 0 200px rgba(40,20,80,0.15),
        0 0 1px #000 !important;
    position: relative;
}

/* Viewport starfield/nebula now handled by canvas FX layer.
   Pseudo-elements cleared so they don't block the canvas showing through. */
body.theme-midnight .viewport::before,
body.theme-midnight .viewport::after {
    display: none !important;
}


/* ── Action Button — Cosmic Pulse ── */
body.theme-midnight #click-zone::before {
    background: radial-gradient(circle, rgba(100,140,220,0.5) 0%, rgba(80,60,180,0.2) 40%, transparent 65%) !important;
    animation: midnight-core-pulse 2.5s ease-in-out infinite !important;
}

body.theme-midnight #click-zone.ring-burst::after {
    border-color: rgba(140,180,255,0.7) !important;
    box-shadow: 0 0 18px rgba(140,180,255,0.5), inset 0 0 12px rgba(100,140,220,0.2) !important;
    animation: midnight-ring-expand 0.6s linear forwards !important;
}

body.theme-midnight #click-zone .action-outer-ring {
    border-color: rgba(100,140,220,0.3) !important;
    box-shadow: 0 0 24px rgba(80,60,180,0.2) !important;
    animation: midnight-outer-ring 1.2s ease-out infinite !important;
}

body.theme-midnight #click-zone:hover::before {
    background: radial-gradient(circle, rgba(140,180,255,0.6) 0%, rgba(100,80,200,0.3) 40%, transparent 65%) !important;
}

body.theme-midnight .action-icon-wrap {
    background: radial-gradient(circle, rgba(100,140,220,0.06) 0%, transparent 70%),
                rgba(10,14,32,0.25) !important;
    border-color: var(--frame) !important;
    box-shadow: 0 0 30px rgba(40,60,120,0.3), inset 0 0 50px rgba(0,0,0,0.5) !important;
}
body.theme-midnight .action-icon-wrap:active {
    border-color: var(--midnight-accent) !important;
    box-shadow: 0 0 40px rgba(100,140,220,0.25), inset 0 0 20px rgba(40,60,120,0.2) !important;
}
body.theme-midnight .action-icon-wrap.clog-complete {
    border-color: var(--midnight-aurora-1) !important;
}

body.theme-midnight .action-skill-name {
    color: var(--midnight-accent) !important;
}

/* ── Progress Bar — Cosmic Glow ── */
body.theme-midnight .action-progress-fill {
    background: linear-gradient(90deg, #2a5090, #4a80cc, #6aa0ee, #8cb4e8) !important;
    box-shadow: 0 0 8px rgba(100,160,255,0.5), 0 0 20px rgba(80,120,220,0.2) !important;
    animation: midnight-progress-glow 2s ease-in-out infinite !important;
    position: relative !important;
}
body.theme-midnight .action-progress-fill::after {
    background: linear-gradient(90deg, transparent, rgba(200,220,255,0.6), transparent) !important;
    animation: midnight-shimmer 1.5s ease-in-out infinite !important;
}

body.theme-midnight .action-progress {
    background: rgba(10,14,32,0.8) !important;
    border-color: #1a2048 !important;
}

body.theme-midnight .action-status.training {
    color: var(--midnight-accent) !important;
}


/* ════════════════════════════════════════════
   6. SIDEBAR — Cosmic Panels
   ════════════════════════════════════════════ */
body.theme-midnight .sidebar {
    background: var(--panel-bg) !important;
    border-color: #0a0e22 !important;
}

/* Crystal pillars instead of stone */
body.theme-midnight .sidebar::before,
body.theme-midnight .sidebar::after {
    background:
        linear-gradient(90deg,
            #080c1e 0px,
            #1a2048 1px,
            #2a3468 2px,
            #1a2048 4px,
            #141838 5px,
            #0e1228 6px,
            #080c1e 7px
        ) !important;
    box-shadow: inset 0 0 6px rgba(0,0,0,0.6), 0 0 4px rgba(80,100,180,0.05) !important;
}

body.theme-midnight .sidebar-body {
    background: var(--cell-bg) !important;
}

body.theme-midnight .sidebar-splitter {
    background: var(--darkest) !important;
    border-color: #0a0e22 !important;
}
body.theme-midnight .sidebar-splitter::after {
    background: #2a3468 !important;
}
body.theme-midnight .sidebar-splitter:hover::after {
    background: var(--midnight-accent) !important;
}


/* ── Sidebar Tabs ── */
body.theme-midnight .sidebar-top-tabs,
body.theme-midnight .sidebar-tabs {
    background: #0a0e22 !important;
}

body.theme-midnight .sidebar-top-tab,
body.theme-midnight .sidebar-tab {
    background: linear-gradient(180deg, #141838, #0e1228, #0a0e22) !important;
    border-color: #080c1e !important;
    color: var(--muted) !important;
}

body.theme-midnight .sidebar-top-tab:hover,
body.theme-midnight .sidebar-tab:hover {
    background: linear-gradient(180deg, #1e2448, #141838, #0e1228) !important;
    color: var(--white) !important;
}

body.theme-midnight .sidebar-top-tab.active,
body.theme-midnight .sidebar-tab.active {
    background: linear-gradient(180deg, #1e2448, #182040, #141838) !important;
    border-color: #1a2048 !important;
    box-shadow: inset 0 1px 0 rgba(140,180,232,0.08) !important;
    color: var(--midnight-accent) !important;
}

body.theme-midnight .sidebar-top-tab.active::before,
body.theme-midnight .sidebar-tab.active::before {
    background: #141838 !important;
}


/* ════════════════════════════════════════════
   7. RL BAR — Celestial Navigation Rail
   ════════════════════════════════════════════ */
body.theme-midnight .rl-bar {
    background: linear-gradient(180deg, #0e1228, #080c1e) !important;
    border-right-color: #0a0e22 !important;
    border-left-color: #0a0e22 !important;
}

body.theme-midnight .rl-bar-btn.active {
    background: rgba(100,140,220,0.15) !important;
    border-color: rgba(140,180,232,0.35) !important;
}
body.theme-midnight .rl-bar-btn:hover {
    background: rgba(100,140,220,0.1) !important;
    border-color: rgba(140,180,232,0.2) !important;
}

body.theme-midnight .rl-bar-sep {
    background: #1a2048 !important;
}

body.theme-midnight .rl-bar-btn::after {
    background: var(--darkest) !important;
    border-color: #1a2048 !important;
    color: var(--midnight-accent) !important;
}

body.theme-midnight .rl-bar-prestige {
    background: linear-gradient(135deg, #0e1838, #1a1060) !important;
    border-color: var(--midnight-aurora-2) !important;
}
body.theme-midnight .rl-bar-prestige span {
    color: var(--midnight-aurora-2) !important;
}
body.theme-midnight .rl-bar-prestige:hover {
    background: linear-gradient(135deg, #141e48, #221868) !important;
}

body.theme-midnight .rl-bar-grab {
    background: #141838 !important;
    border-color: #0a0e22 !important;
}
body.theme-midnight .rl-bar-grab:hover {
    background: #1e2448 !important;
}

body.theme-midnight .rl-panel-header {
    background: linear-gradient(180deg, #141838, #0e1228) !important;
}


/* ════════════════════════════════════════════
   8. SKILL GRID — Constellation Cells
   ════════════════════════════════════════════ */
body.theme-midnight .skill-grid {
    background: var(--darkest) !important;
}

body.theme-midnight .skill-cell {
    background: #141838 !important;
    background-image:
        radial-gradient(1px 1px at 20% 30%, rgba(200,220,255,0.15), transparent),
        radial-gradient(1px 1px at 70% 60%, rgba(180,200,255,0.1), transparent),
        radial-gradient(1px 1px at 45% 80%, rgba(200,210,255,0.08), transparent),
        repeating-linear-gradient(137deg, transparent, transparent 1px, rgba(100,140,220,0.02) 1px, transparent 2px) !important;
    border: 1px solid #2a3468 !important;
    border-radius: 10px !important;
    transition: transform 0.15s, box-shadow 0.25s, background 0.15s, border-color 0.25s !important;
}

/* XP bar track */
body.theme-midnight .skill-cell::after {
    background: rgba(100,140,220,0.15) !important;
}

/* XP bar fill */
body.theme-midnight .skill-cell .sk-xp-bar {
    background: linear-gradient(90deg, var(--midnight-aurora-1), #60ddcc) !important;
    box-shadow: 0 0 4px rgba(64,221,170,0.3) !important;
}

/* Hover */
body.theme-midnight .skill-cell:hover {
    background-color: #1a2048 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 16px rgba(40,60,120,0.4), 0 0 8px rgba(100,140,220,0.1) !important;
    border-color: rgba(140,180,232,0.3) !important;
}

/* Active */
body.theme-midnight .skill-cell.active {
    background-color: #1a2048 !important;
    border-color: var(--midnight-accent) !important;
    box-shadow: inset 0 0 12px rgba(100,140,220,0.1), 0 0 8px rgba(100,140,220,0.15) !important;
}

/* Maxed — celestial glow */
body.theme-midnight .skill-cell.maxed {
    border-color: rgba(140,180,232,0.5) !important;
    box-shadow: 0 0 12px rgba(100,140,220,0.2), inset 0 0 6px rgba(140,180,232,0.05) !important;
    animation: midnight-glow-breathe 3s ease-in-out infinite;
}
body.theme-midnight .skill-cell.maxed .sk-xp-bar {
    background: linear-gradient(90deg, var(--midnight-accent), #a0d0ff) !important;
    box-shadow: 0 0 6px rgba(140,180,232,0.4) !important;
}

body.theme-midnight .sk-hi,
body.theme-midnight .sk-lo {
    color: #8cb4e8 !important;
}

body.theme-midnight .total-level-cell {
    background: #0e1228 !important;
    color: var(--midnight-accent) !important;
}
body.theme-midnight .total-level-cell .total-num {
    color: var(--midnight-accent) !important;
}


/* ════════════════════════════════════════════
   9. RC PANELS — Frosted Glass Cosmic Panels
   ════════════════════════════════════════════ */
body.theme-midnight .sidebar-skills { background: var(--panel-bg) !important; }
body.theme-midnight .rc-panel-wrap { background: var(--panel-bg) !important; }
body.theme-midnight .rc-panel-body { background: var(--panel-bg) !important; }
body.theme-midnight .rc-panel-head {
    background: linear-gradient(180deg, #141838, #0e1228) !important;
    border-bottom-color: #0a0e22 !important;
}

body.theme-midnight .rc-panel-tabs {
    background: linear-gradient(180deg, #0e1228, #0a0e22) !important;
}

body.theme-midnight .rc-panel-tab {
    background: linear-gradient(180deg, #141838, #0e1228) !important;
    border-color: #080c1e !important;
}
body.theme-midnight .rc-panel-tab:hover {
    background: linear-gradient(180deg, #1e2448, #141838) !important;
    color: var(--white) !important;
}
body.theme-midnight .rc-panel-tab.active {
    background: linear-gradient(180deg, #1e2448, #182040) !important;
    border-bottom-color: #182040 !important;
    color: var(--midnight-accent) !important;
    box-shadow: inset 0 1px 0 rgba(140,180,232,0.1) !important;
}

body.theme-midnight .rc-panel-search input {
    background: #08091a !important;
    border-color: #1a2048 !important;
}
body.theme-midnight .rc-panel-search input:focus {
    border-color: var(--midnight-accent) !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5), 0 0 6px rgba(140,180,232,0.2) !important;
}

body.theme-midnight .rc-panel-foot {
    background: linear-gradient(180deg, #0a0e22, #08091a) !important;
    border-top-color: #0a0e22 !important;
}


/* ════════════════════════════════════════════
   10. RC MODALS — Cosmic Overlay Windows
   ════════════════════════════════════════════ */
body.theme-midnight .rc-overlay {
    background: rgba(4,6,16,0.75) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
}

body.theme-midnight .rc-modal {
    background: #1a2048 !important;
    background-image: linear-gradient(180deg, #1e2448 0%, #1a2048 8%, #141838 92%, #0e1228 100%) !important;
    border-color: #0a0e22 !important;
    box-shadow:
        inset 1px 1px 0 #2a3468,
        inset -1px -1px 0 #0a0e28,
        0 8px 32px rgba(0,0,0,0.8),
        0 0 60px rgba(60,80,160,0.08) !important;
    animation: midnight-modal-appear 0.3s ease-out !important;
}

body.theme-midnight .rc-modal-inner {
    background: #10142e !important;
    background-image: linear-gradient(180deg, #0e1228 0%, #10142e 15%, #10142e 85%, #0c0f24 100%) !important;
    border-color: #08091a !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5), 0 1px 0 #1a2048 !important;
}

body.theme-midnight .rc-modal-head {
    background: linear-gradient(180deg, #141838 0%, #0e1228 100%) !important;
    border-bottom-color: #0a0e22 !important;
}

body.theme-midnight .rc-modal-title {
    color: var(--midnight-accent) !important;
    text-shadow: 1px 1px 0 #000, 0 0 10px rgba(140,180,232,0.3) !important;
}


/* ════════════════════════════════════════════
   11. METHOD LIST — Cosmic Rows
   ════════════════════════════════════════════ */
body.theme-midnight .method-list-head {
    background: linear-gradient(180deg, #0e1228, #080c1e) !important;
    border-bottom-color: #0a0e22 !important;
}

body.theme-midnight .method-list {
    background: var(--darkest) !important;
}

body.theme-midnight .method-row {
    background: #141838 !important;
    background-image:
        radial-gradient(1px 1px at 15% 40%, rgba(200,220,255,0.06), transparent),
        radial-gradient(1px 1px at 80% 20%, rgba(180,200,255,0.04), transparent),
        repeating-linear-gradient(137deg, transparent, transparent 1px, rgba(100,140,220,0.015) 1px, transparent 2px) !important;
    border: 1px solid #2a3468 !important;
    border-radius: 10px !important;
    -webkit-mask: none !important;
    mask: none !important;
    transition: background 0.15s, transform 0.15s, box-shadow 0.25s, border-color 0.25s !important;
}

body.theme-midnight .method-row:hover:not(:disabled) {
    background: #1a2048 !important;
    border-color: rgba(140,180,232,0.25) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(40,60,120,0.35) !important;
}

body.theme-midnight .method-row.active {
    background: #1a2048 !important;
    border-color: var(--midnight-accent) !important;
    box-shadow: inset 0 0 10px rgba(100,140,220,0.1) !important;
}

body.theme-midnight .method-row.clog-complete {
    background: rgba(64,221,170,0.06) !important;
    border-color: rgba(64,221,170,0.2) !important;
}
body.theme-midnight .method-row.clog-complete .meth-name {
    color: var(--midnight-aurora-1) !important;
}
body.theme-midnight .method-row.clog-complete:hover:not(:disabled) {
    background: rgba(64,221,170,0.1) !important;
}
body.theme-midnight .method-row.clog-complete.active {
    background: rgba(64,221,170,0.08) !important;
    border-color: rgba(64,221,170,0.35) !important;
}

body.theme-midnight .method-row.expanded {
    background: #1a2048 !important;
    border-color: var(--midnight-accent) !important;
}

body.theme-midnight .method-detail {
    background: #08091a !important;
    border-color: rgba(42,52,104,0.4) !important;
}

body.theme-midnight .method-detail-btn {
    background: linear-gradient(180deg, #1e2860, #14204a) !important;
    border-color: rgba(140,180,232,0.3) !important;
    color: var(--midnight-accent) !important;
}
body.theme-midnight .method-detail-btn:hover {
    background: linear-gradient(180deg, #2a3470, #1e2860) !important;
    border-color: rgba(140,180,232,0.5) !important;
}

body.theme-midnight .meth-xp { color: var(--midnight-aurora-1) !important; }
body.theme-midnight .meth-gp { color: var(--midnight-accent) !important; }


/* ════════════════════════════════════════════
   12. COMBAT TAB — Cosmic Combat
   ════════════════════════════════════════════ */
body.theme-midnight .combat-tab-grid {
    background: var(--darkest) !important;
}

body.theme-midnight .combat-tab-btn {
    background: #141838 !important;
    background-image:
        radial-gradient(1px 1px at 30% 50%, rgba(200,220,255,0.06), transparent),
        repeating-linear-gradient(137deg, transparent, transparent 1px, rgba(100,140,220,0.015) 1px, transparent 2px) !important;
    border: 1px solid #2a3468 !important;
    border-radius: 10px !important;
}
body.theme-midnight .combat-tab-btn:hover {
    background-color: #1a2048 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(40,60,120,0.35) !important;
}
body.theme-midnight .combat-tab-btn.active {
    background-color: #1a2048 !important;
    border-color: var(--midnight-accent) !important;
    box-shadow: inset 0 0 12px rgba(100,140,220,0.12), 0 0 8px rgba(100,140,220,0.08) !important;
}

body.theme-midnight .combat-tab-retaliate {
    background: #141838 !important;
    border: 1px solid #2a3468 !important;
    border-radius: 10px !important;
}
body.theme-midnight .combat-tab-retaliate.active {
    background-color: #1a2048 !important;
    border-color: var(--midnight-accent) !important;
    box-shadow: inset 0 0 10px rgba(100,140,220,0.1) !important;
}

body.theme-midnight .combat-tab-category {
    background: var(--darkest) !important;
    border-top-color: #0a0e22 !important;
    color: var(--midnight-accent-dim) !important;
}

body.theme-midnight .autocast-info-panel {
    background: #0c1028 !important;
    border-color: #2a3468 !important;
}


/* ════════════════════════════════════════════
   13. CHATBOX — Deep Space Chat
   ════════════════════════════════════════════ */
body.theme-midnight .chatbox {
    background: var(--chat-bg) !important;
}

body.theme-midnight .chatbox-tabs {
    background: #0a0e22 !important;
    border-color: #080c1e !important;
}

body.theme-midnight .chatbox-tab {
    background: linear-gradient(180deg, #141838, #0e1228, #0a0e22) !important;
    border-color: #080c1e !important;
}
body.theme-midnight .chatbox-tab:hover {
    background: linear-gradient(180deg, #1e2448, #141838, #0e1228) !important;
}
body.theme-midnight .chatbox-tab.active {
    background: linear-gradient(180deg, #1e2448, #182040, #141838) !important;
    border-bottom-color: #141838 !important;
}

body.theme-midnight .chat-input-row {
    background: #0e1228 !important;
    border-top-color: #1a2048 !important;
}
body.theme-midnight .chat-input {
    background: #080a18 !important;
    border-color: #1a2048 !important;
    color: var(--white) !important;
}
body.theme-midnight .chat-input:focus {
    border-color: var(--midnight-accent) !important;
}


/* ════════════════════════════════════════════
   14. BANK — Cosmic Inventory
   ════════════════════════════════════════════ */
body.theme-midnight .bank-grid {
    background: #141838 !important;
}

body.theme-midnight .bank-cell {
    background: var(--cell-bg) !important;
    border-color: #1a2048 !important;
}
body.theme-midnight .bank-cell:hover {
    background: var(--cell-hover) !important;
    border-color: rgba(140,180,232,0.25) !important;
}
body.theme-midnight .bank-cell.selected {
    background: var(--cell-active) !important;
    border-color: var(--midnight-accent) !important;
    box-shadow: 0 0 8px rgba(140,180,232,0.15) !important;
}

body.theme-midnight .prayer-tab {
    background: #0c1028 !important;
}
body.theme-midnight .prayer-cell {
    background: #0c1028 !important;
}
body.theme-midnight .prayer-cell:hover:not(.locked) {
    background: #141838 !important;
    border-color: rgba(140,180,232,0.2) !important;
}
body.theme-midnight .prayer-cell.active {
    background: rgba(20,30,70,0.9) !important;
    border-color: var(--midnight-aurora-2) !important;
    box-shadow: inset 0 0 10px rgba(106,102,255,0.15), 0 0 6px rgba(106,102,255,0.1) !important;
}
body.theme-midnight .prayer-cell.active img {
    filter: drop-shadow(0 0 4px rgba(106,102,255,0.5)) !important;
}
body.theme-midnight .prayer-footer {
    background: linear-gradient(180deg, #0e1228, #080c1e) !important;
}
body.theme-midnight .prayer-summary {
    background: #080c1e !important;
}


/* ════════════════════════════════════════════
   15. CHARACTER SELECT — Cosmic Panel
   ════════════════════════════════════════════ */
body.theme-midnight .charselect-overlay {
    background: rgba(4,6,16,0.7) !important;
    backdrop-filter: blur(4px) !important;
}

body.theme-midnight .charselect-panel {
    background: #1a2048 !important;
    background-image: linear-gradient(180deg, #1e2448 0%, #1a2048 8%, #141838 92%, #0e1228 100%) !important;
    border-color: #0a0e22 !important;
    box-shadow:
        inset 1px 1px 0 #2a3468,
        inset -1px -1px 0 #0a0e28,
        0 8px 32px rgba(0,0,0,0.8),
        0 0 40px rgba(60,80,160,0.1) !important;
}

body.theme-midnight .charselect-inner {
    background: #10142e !important;
    background-image: linear-gradient(180deg, #0e1228 0%, #10142e 15%, #10142e 85%, #0c0f24 100%) !important;
    border-color: #08091a !important;
}

body.theme-midnight .charselect-header {
    background: linear-gradient(180deg, #141838, #0e1228) !important;
    border-bottom-color: #0a0e22 !important;
}

body.theme-midnight .charselect-title {
    color: var(--midnight-accent) !important;
    text-shadow: 1px 1px 0 #000, 0 0 12px rgba(140,180,232,0.3) !important;
}

body.theme-midnight .charselect-footer {
    background: linear-gradient(180deg, #0e1228, #141838) !important;
    border-top-color: #0a0e22 !important;
}


/* ════════════════════════════════════════════
   16. EVENTS — Cosmic Events
   ════════════════════════════════════════════ */
body.theme-midnight .events-hub-btn {
    background: var(--cell-bg) !important;
    border-color: #2a3468 !important;
    border-top-color: #2a3468 !important;
    border-left-color: #1e2448 !important;
    border-right-color: #141838 !important;
    border-bottom-color: #0e1228 !important;
    box-shadow: 0 0 0 1px #0a0e22, inset 0 0 6px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.5), 0 0 12px rgba(60,80,160,0.06) !important;
}
body.theme-midnight .events-hub-btn:hover {
    background: var(--cell-hover) !important;
}

body.theme-midnight .events-hub-item {
    background: var(--cell-bg) !important;
    border-color: #1a2048 !important;
}
body.theme-midnight .events-hub-item:hover {
    background: var(--cell-hover) !important;
    border-color: rgba(140,180,232,0.25) !important;
}


/* ════════════════════════════════════════════
   17. MARKETPLACE — Cosmic Trade Post
   ════════════════════════════════════════════ */
body.theme-midnight .marketplace-header {
    background: linear-gradient(180deg, #10142e, #0c0f24) !important;
    border-bottom-color: #0a0e22 !important;
}
body.theme-midnight .marketplace-header::after {
    background: linear-gradient(90deg, transparent, rgba(140,180,232,0.25), transparent) !important;
}
body.theme-midnight .marketplace-title {
    color: var(--midnight-accent) !important;
    text-shadow: 1px 1px 0 #000, 0 0 10px rgba(140,180,232,0.3) !important;
}

body.theme-midnight .marketplace-action-buy {
    background: linear-gradient(180deg, #0e2848, #081830) !important;
    border-color: #1a4a6a !important;
    color: var(--midnight-aurora-1) !important;
}
body.theme-midnight .marketplace-action-buy:hover {
    background: linear-gradient(180deg, #143058, #0e2040) !important;
    box-shadow: 0 0 12px rgba(64,221,170,0.15) !important;
}

body.theme-midnight .marketplace-action-sell {
    background: linear-gradient(180deg, #2a1838, #1a0e28) !important;
    border-color: #4a2860 !important;
    color: var(--midnight-aurora-3) !important;
}
body.theme-midnight .marketplace-action-sell:hover {
    background: linear-gradient(180deg, #341e42, #221430) !important;
    box-shadow: 0 0 12px rgba(170,68,255,0.15) !important;
}


/* ════════════════════════════════════════════
   18. DISCONNECT NOTICE
   ════════════════════════════════════════════ */
body.theme-midnight .disconnect-notice {
    background: rgba(10,14,32,0.95) !important;
    border-color: var(--red) !important;
}


/* ════════════════════════════════════════════
   19. SCROLLBARS — Cosmic Thin Scrollbars
   ════════════════════════════════════════════ */
body.theme-midnight ::-webkit-scrollbar {
    width: 6px;
}
body.theme-midnight ::-webkit-scrollbar-track {
    background: #08091a;
}
body.theme-midnight ::-webkit-scrollbar-thumb {
    background: #2a3468;
    border-radius: 3px;
}
body.theme-midnight ::-webkit-scrollbar-thumb:hover {
    background: #3a4478;
}


/* ════════════════════════════════════════════
   20. LOAD-IN ANIMATIONS — Cosmic Load
   ════════════════════════════════════════════ */
body.theme-midnight .viewport {
    animation: midnight-viewport-load 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}
@keyframes midnight-viewport-load {
    0% {
        opacity: 0;
        transform: scale(0.95);
        box-shadow: 0 0 0 rgba(100,140,220,0);
    }
    50% {
        box-shadow: 0 0 60px rgba(100,140,220,0.3);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}


/* ════════════════════════════════════════════
   21. PRESTIGE SYSTEM — Cosmic Prestige
   ════════════════════════════════════════════ */
body.theme-midnight .p-fullscreen {
    background: #08091a !important;
    background-image:
        radial-gradient(ellipse 800px 400px at 50% 0%, rgba(60,80,180,0.06) 0%, transparent 100%),
        radial-gradient(ellipse 600px 300px at 50% 100%, rgba(100,60,180,0.04) 0%, transparent 100%) !important;
}

body.theme-midnight .ph-header {
    background: linear-gradient(180deg, rgba(14,18,40,0.95) 0%, rgba(10,14,30,0.85) 100%) !important;
    border-bottom-color: #1a2048 !important;
}

body.theme-midnight .ph-tier-icon {
    background: linear-gradient(135deg, var(--midnight-accent), var(--midnight-aurora-2)) !important;
    color: #08091a !important;
    box-shadow: 0 0 14px rgba(140,180,232,0.3) !important;
}

body.theme-midnight .ph-currency-val {
    color: var(--midnight-accent) !important;
}

body.theme-midnight .ph-active-task {
    background: rgba(100,140,220,0.06) !important;
    border-color: rgba(140,180,232,0.2) !important;
}
body.theme-midnight .ph-task-name {
    color: var(--midnight-accent) !important;
}
body.theme-midnight .ph-task-count {
    color: var(--muted) !important;
}

body.theme-midnight .ph-no-task {
    border-color: #1a2048 !important;
}

body.theme-midnight .ph-hub .slayer-tab-bar {
    background-color: #08091a !important;
}


/* ════════════════════════════════════════════
   22. SHOP / RL PANEL — Cosmic Shopping
   ════════════════════════════════════════════ */
body.theme-midnight .rl-shop-header {
    background: linear-gradient(180deg, #10142e, #0c0f24) !important;
    border-bottom-color: #0a0e22 !important;
    color: var(--midnight-accent) !important;
}


/* ════════════════════════════════════════════
   23. TOOLTIPS — Cosmic Tooltips
   ════════════════════════════════════════════ */
body.theme-midnight .rl-bar-btn::after,
body.theme-midnight .sidebar-top-tab::after,
body.theme-midnight .sidebar-tab::after {
    background: #08091a !important;
    color: var(--midnight-accent) !important;
    border-color: #1a2048 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.7), 0 0 8px rgba(60,80,160,0.1) !important;
}


/* ════════════════════════════════════════════
   24. BUTTONS — Cosmic Interactive Elements
   ════════════════════════════════════════════ */

/* Generic button override for stone-style buttons */
body.theme-midnight .rc-btn,
body.theme-midnight .stone-btn,
body.theme-midnight .settings-btn,
body.theme-midnight .rl-fr-add-btn {
    background: linear-gradient(180deg, #1e2860, #14204a) !important;
    border-color: rgba(140,180,232,0.3) !important;
    color: var(--midnight-accent) !important;
    transition: all 0.15s !important;
}
body.theme-midnight .rc-btn:hover,
body.theme-midnight .stone-btn:hover,
body.theme-midnight .settings-btn:hover,
body.theme-midnight .rl-fr-add-btn:hover {
    background: linear-gradient(180deg, #2a3470, #1e2860) !important;
    border-color: rgba(140,180,232,0.5) !important;
    box-shadow: 0 0 10px rgba(100,140,220,0.15) !important;
}


/* ════════════════════════════════════════════
   25. PROFILE HUB — Midnight Profile Theme
   ════════════════════════════════════════════ */

/* When the game theme is midnight, override the profile hub base */
body.theme-midnight .profile-hub {
    background: linear-gradient(180deg, #0a0e24 0%, #080a1a 30%, #060818 100%) !important;
}

body.theme-midnight .sidebar-body:has(.profile-hub) {
    background: #060818 !important;
}

body.theme-midnight .profile-hub .ph-edge {
    opacity: 0.6 !important;
    background: linear-gradient(90deg, transparent 5%, var(--midnight-aurora-2) 20%, var(--midnight-accent) 40%, #e0f0ff 50%, var(--midnight-accent) 60%, var(--midnight-aurora-2) 80%, transparent 95%) !important;
}

body.theme-midnight .profile-hub .ph-hero {
    background: radial-gradient(ellipse 80% 70% at 50% 30%, rgba(100,140,220,0.06) 0%, transparent 70%) !important;
}

body.theme-midnight .profile-hub .ph-avatar-lg {
    border: 3px solid transparent !important;
    background:
        linear-gradient(#08091a, #08091a) padding-box,
        conic-gradient(from 0deg, #2a3468, #5a7aaa, #8cb4e8, #a0d0ff, #8cb4e8, #5a7aaa, rgba(42,52,104,0.3), #2a3468) border-box !important;
    box-shadow: 0 0 24px rgba(100,140,220,0.3), 0 0 50px rgba(80,60,180,0.1), inset 0 0 14px rgba(100,140,220,0.1) !important;
}

body.theme-midnight .profile-hub .ph-name {
    color: var(--midnight-accent) !important;
    text-shadow: 0 1px 8px rgba(140,180,232,0.3) !important;
}

body.theme-midnight .profile-hub .ph-clan {
    color: var(--muted) !important;
}

body.theme-midnight .profile-hub .ph-lvl-pill {
    color: var(--midnight-accent) !important;
    background: rgba(100,140,220,0.08) !important;
    border-color: #1a2048 !important;
}

body.theme-midnight .profile-hub .ph-section {
    border-top-color: #1a2048 !important;
}

body.theme-midnight .profile-hub .ph-section-label {
    color: var(--muted) !important;
}

body.theme-midnight .profile-hub .ph-vital-track {
    border-color: #1a2048 !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5), 0 0 6px rgba(60,80,160,0.05) !important;
}

body.theme-midnight .profile-hub .ph-slayer-fill {
    background: linear-gradient(90deg, #2a5090, var(--midnight-accent), #a0d0ff) !important;
    box-shadow: 0 0 8px rgba(140,180,232,0.3) !important;
}

body.theme-midnight .profile-hub .ph-slayer-track {
    border-color: #1a2048 !important;
}

body.theme-midnight .profile-hub .ph-fill-prayer {
    background: linear-gradient(180deg, var(--midnight-aurora-2), #4a50cc, #3040aa) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 0 8px rgba(106,102,255,0.2) !important;
}

body.theme-midnight .profile-hub .ph-timer {
    color: var(--muted) !important;
}

body.theme-midnight .profile-hub .ph-theme-gear {
    color: var(--muted) !important;
}
body.theme-midnight .profile-hub .ph-theme-gear:hover {
    color: var(--midnight-accent) !important;
    background: rgba(100,140,220,0.1) !important;
}

body.theme-midnight .profile-hub .ph-theme-picker {
    background: #08091a !important;
    border-color: #1a2048 !important;
}

body.theme-midnight .profile-hub .ph-theme-option:hover {
    background: rgba(100,140,220,0.1) !important;
    color: var(--white) !important;
}
body.theme-midnight .profile-hub .ph-theme-option.ph-theme-active {
    color: var(--midnight-accent) !important;
    background: rgba(100,140,220,0.06) !important;
}


/* ════════════════════════════════════════════
   26. LEVEL-UP SPLASH — Cosmic Celebration
   ════════════════════════════════════════════ */
body.theme-midnight .lu-backdrop {
    background: radial-gradient(ellipse at center, rgba(60,80,180,0.15), transparent 70%),
                rgba(4,6,16,0.4) !important;
}

body.theme-midnight .lu-ring {
    border-color: rgba(140,180,232,0.4) !important;
    box-shadow: 0 0 30px rgba(100,140,220,0.3), inset 0 0 20px rgba(100,140,220,0.1) !important;
}

body.theme-midnight .lu-text {
    color: var(--midnight-accent) !important;
    text-shadow: 0 0 20px rgba(140,180,232,0.5), 0 2px 4px rgba(0,0,0,0.8) !important;
}


/* ════════════════════════════════════════════
   27. GLOBAL SEARCH — Cosmic Search
   ════════════════════════════════════════════ */
body.theme-midnight .global-search-results {
    background: #0c0f24 !important;
    border-color: #1a2048 !important;
    box-shadow: 0 6px 24px rgba(0,0,0,0.7), 0 0 20px rgba(60,80,160,0.08) !important;
}

body.theme-midnight .global-search-input {
    background: #08091a !important;
    border-color: #1a2048 !important;
    color: var(--white) !important;
}
body.theme-midnight .global-search-input:focus {
    border-color: var(--midnight-accent) !important;
    box-shadow: 0 0 8px rgba(140,180,232,0.2) !important;
}


/* ════════════════════════════════════════════
   28. RL ROW PATTERN — Cosmic List Items
   ════════════════════════════════════════════ */
body.theme-midnight .rl-row {
    background: #141838 !important;
    border-color: #2a3468 !important;
}
body.theme-midnight .rl-row:hover {
    background: #1a2048 !important;
    border-color: rgba(140,180,232,0.2) !important;
}
body.theme-midnight .rl-row.active,
body.theme-midnight .rl-row.selected {
    background: #1e2448 !important;
    border-color: var(--midnight-accent) !important;
}


/* ════════════════════════════════════════════
   29. MONSTER HP BAR — Cosmic Combat
   ════════════════════════════════════════════ */
body.theme-midnight .monster-hp-bar {
    background: #08091a !important;
    border-color: #1a2048 !important;
}
body.theme-midnight .monster-hp-fill {
    box-shadow: 0 0 6px rgba(64,221,170,0.3) !important;
}
body.theme-midnight .player-hp-bar {
    background: #08091a !important;
    border-color: #1a2048 !important;
}


/* ════════════════════════════════════════════
   30. IRON MAN MODE — Cosmic Iron
   ════════════════════════════════════════════ */
body.theme-midnight .ironman-badge {
    background: linear-gradient(135deg, #0e1838, #1a1060) !important;
    border-color: var(--midnight-aurora-2) !important;
    color: var(--midnight-aurora-2) !important;
}


/* ════════════════════════════════════════════
   31. SUBTLE COSMIC SCAN LINE (optional luxury)
   ════════════════════════════════════════════ */

/* A very subtle scan line that sweeps down the viewport periodically */
body.theme-midnight .viewport .vp-center::before {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 10%,
        rgba(140,180,232,0.15) 30%,
        rgba(200,220,255,0.25) 50%,
        rgba(140,180,232,0.15) 70%,
        transparent 90%
    );
    pointer-events: none;
    z-index: 1;
    animation: midnight-scan 8s linear infinite;
    opacity: 0.4;
}


/* ════════════════════════════════════════════
   32. STARDUST PARTICLES (floating micro-stars)
   Near the topbar area for extra premium feel
   ════════════════════════════════════════════ */
body.theme-midnight .topbar::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(1px 1px at 5% 50%, rgba(200,220,255,0.6), transparent),
        radial-gradient(1px 1px at 15% 30%, rgba(180,200,255,0.4), transparent),
        radial-gradient(1px 1px at 28% 70%, rgba(220,230,255,0.5), transparent),
        radial-gradient(1px 1px at 42% 20%, rgba(200,220,255,0.3), transparent),
        radial-gradient(1px 1px at 58% 60%, rgba(180,210,255,0.5), transparent),
        radial-gradient(1px 1px at 72% 40%, rgba(200,200,255,0.4), transparent),
        radial-gradient(1px 1px at 88% 55%, rgba(220,230,255,0.3), transparent),
        radial-gradient(1px 1px at 95% 25%, rgba(200,220,255,0.5), transparent);
    animation: midnight-twinkle-2 5s ease-in-out infinite;
    z-index: 0;
}


/* ════════════════════════════════════════════
   33. PLAYER OWNED HOUSE — Cosmic POH
   ════════════════════════════════════════════ */
body.theme-midnight .poh-floor {
    background: #08091a !important;
    border-color: #1a2048 !important;
}
body.theme-midnight .poh-room {
    background: #10142e !important;
    border-color: #1a2048 !important;
}
body.theme-midnight .poh-room:hover {
    background: #141838 !important;
    border-color: rgba(140,180,232,0.25) !important;
}


/* ════════════════════════════════════════════
   34. SPELLBOOK — Cosmic Magic
   ════════════════════════════════════════════ */
body.theme-midnight .spell-cell {
    background: #10142e !important;
    border-color: #1a2048 !important;
}
body.theme-midnight .spell-cell:hover:not(.locked) {
    background: #141838 !important;
    border-color: rgba(140,180,232,0.25) !important;
    box-shadow: 0 0 8px rgba(106,102,255,0.1) !important;
}
body.theme-midnight .spell-cell.active {
    background: #1a2048 !important;
    border-color: var(--midnight-aurora-2) !important;
    box-shadow: 0 0 12px rgba(106,102,255,0.2) !important;
}


/* ════════════════════════════════════════════
   35. MISC — Various Small Overrides
   ════════════════════════════════════════════ */

/* Settings tabs */
body.theme-midnight .theme-btn.active {
    background: var(--midnight-accent) !important;
    color: #08091a !important;
}

/* Selection highlights */
body.theme-midnight ::selection {
    background: rgba(140,180,232,0.3);
    color: #fff;
}

/* Links */
body.theme-midnight a {
    color: var(--midnight-accent);
}

/* Awakened toggle */
body.theme-midnight .awakened-toggle {
    background: rgba(10,14,32,0.5) !important;
}
body.theme-midnight .awakened-toggle.active {
    background: rgba(106,102,255,0.2) !important;
    border-color: var(--midnight-aurora-2) !important;
}

/* Notification / toast styles */
body.theme-midnight .toast,
body.theme-midnight .notification {
    background: #10142e !important;
    border-color: #1a2048 !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.6), 0 0 12px rgba(60,80,160,0.08) !important;
}

/* Drop overlay / loot */
body.theme-midnight .loot-popup {
    background: rgba(10,14,32,0.9) !important;
    border-color: var(--midnight-accent) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.7), 0 0 20px rgba(100,140,220,0.1) !important;
}

/* Equipment panel */
body.theme-midnight .equip-slot {
    background: #10142e !important;
    border-color: #1a2048 !important;
}
body.theme-midnight .equip-slot:hover {
    background: #141838 !important;
    border-color: rgba(140,180,232,0.25) !important;
}
body.theme-midnight .equip-slot.filled {
    border-color: #2a3468 !important;
}

/* Quest log */
body.theme-midnight .quest-row {
    background: #141838 !important;
    border-color: #1a2048 !important;
}
body.theme-midnight .quest-row:hover {
    background: #1a2048 !important;
}
body.theme-midnight .quest-row.complete {
    background: rgba(64,221,170,0.05) !important;
}

/* Farming patches */
body.theme-midnight .farm-patch {
    background: #10142e !important;
    border-color: #1a2048 !important;
}
body.theme-midnight .farm-patch:hover {
    border-color: rgba(140,180,232,0.25) !important;
}

/* Clue scroll reward screen */
body.theme-midnight .clue-reward-panel {
    background: #10142e !important;
    border-color: #1a2048 !important;
}

/* Collection log */
body.theme-midnight .clog-category {
    background: #0e1228 !important;
    border-color: #1a2048 !important;
}


/* ════════════════════════════════════════════
   36. AURORA EDGE — Bottom viewport glow
   ════════════════════════════════════════════ */

/* Animated aurora gradient at the bottom of the game body */
body.theme-midnight .game-body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent,
        var(--midnight-aurora-1),
        var(--midnight-aurora-2),
        var(--midnight-accent),
        var(--midnight-aurora-3),
        var(--midnight-aurora-1),
        transparent
    );
    background-size: 300% 100%;
    animation: midnight-aurora 12s ease-in-out infinite;
    opacity: 0.4;
    z-index: 100;
    pointer-events: none;
}


/* ════════════════════════════════════════════
   37. RESPONSIVE — Mobile Adjustments
   ════════════════════════════════════════════ */
@media (max-width: 768px) {
    body.theme-midnight .topbar::before {
        /* Reduce star count on mobile for performance */
        background:
            radial-gradient(1px 1px at 10% 40%, rgba(200,220,255,0.5), transparent),
            radial-gradient(1px 1px at 40% 60%, rgba(180,200,255,0.4), transparent),
            radial-gradient(1px 1px at 70% 30%, rgba(200,220,255,0.5), transparent),
            radial-gradient(1px 1px at 90% 55%, rgba(180,210,255,0.4), transparent) !important;
    }

    body.theme-midnight .viewport::after {
        /* Fewer viewport stars on mobile */
        background:
            radial-gradient(1px 1px at 15% 20%, var(--midnight-star), transparent),
            radial-gradient(1px 1px at 50% 40%, rgba(180,200,255,0.5), transparent),
            radial-gradient(1px 1px at 80% 65%, rgba(200,220,255,0.4), transparent),
            radial-gradient(2px 2px at 35% 75%, rgba(140,180,232,0.6), transparent) !important;
    }

    /* Disable scan line on mobile */
    body.theme-midnight .viewport .vp-center::before {
        display: none;
    }

    /* Disable shooting stars on mobile */
    body.theme-midnight::before,
    body.theme-midnight::after {
        display: none;
    }
}


/* ════════════════════════════════════════════
   39. CHATBOX — Borders, Inner, Splitter
   ════════════════════════════════════════════ */
body.theme-midnight .chatbox {
    border: 8px solid #1a2048 !important;
    border-top: 10px solid #141838 !important;
    box-shadow: inset 0 0 0 2px #2a3468, 0 0 0 3px #0a0e22 !important;
}
body.theme-midnight .chatbox-inner {
    background: linear-gradient(180deg, #0c0f24, #08091a) !important;
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.5) !important;
}
body.theme-midnight .chat-line {
    color: var(--white) !important;
}
body.theme-midnight .chatbox-splitter {
    background: #08091a !important;
}
body.theme-midnight .chatbox-splitter::after {
    background: #2a3468 !important;
}
body.theme-midnight .chatbox-splitter:hover::after,
body.theme-midnight .chatbox-splitter:active::after {
    background: var(--midnight-accent) !important;
}


/* ════════════════════════════════════════════
   40. TIMER HUB — Borders + Interior
   ════════════════════════════════════════════ */
body.theme-midnight .timer-hub {
    background: var(--chat-bg) !important;
    border: 8px solid #1a2048 !important;
    border-top: 10px solid #141838 !important;
    border-left: none !important;
    box-shadow: inset 0 0 0 2px #2a3468, 0 0 0 3px #0a0e22 !important;
}
body.theme-midnight .timer-hub-header {
    background: linear-gradient(180deg, #141838, #0e1228, #0a0e22) !important;
    border-bottom: 2px solid #08091a !important;
    color: var(--midnight-accent) !important;
}
body.theme-midnight .timer-hub-body {
    background: linear-gradient(180deg, #0a0e22, #08091a) !important;
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.5) !important;
}


/* ════════════════════════════════════════════
   41. EQUIPMENT — Slots, Grid, Tools, Styles
   ════════════════════════════════════════════ */
body.theme-midnight .equip-grid {
    background: var(--cell-bg) !important;
}
body.theme-midnight .eq-slot {
    background: #08091a !important;
    border: 2px solid #1a2048 !important;
}
body.theme-midnight .eq-slot:hover {
    border-color: var(--midnight-accent) !important;
}
body.theme-midnight .eq-slot.filled {
    border-color: #2a3468 !important;
    background: #0c0f24 !important;
}

/* Section headers (Tools, Special Attack, etc.) */
/* Equipment panel — must match body.rebrand [data-panel="equipment"] specificity (0,3,0) */
body.theme-midnight [data-panel="equipment"] .rc-panel-head {
    background: linear-gradient(180deg, #141838, #0e1228) !important;

    border: 1px solid #0a0e22 !important;
    border-radius: 0 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
}
body.theme-midnight [data-panel="equipment"] .rc-panel-tabs,
body.theme-midnight [data-panel="equipment"] .rc-panel-tab {
    background: linear-gradient(180deg, #121630, #0a0e22) !important;

}
body.theme-midnight [data-panel="equipment"] .rc-panel-tab:hover {
    background: linear-gradient(180deg, #1a2048, #121630) !important;

    color: var(--white) !important;
}
body.theme-midnight [data-panel="equipment"] .rc-panel-tab.active {
    background: linear-gradient(180deg, #1e2458, #141838) !important;

    border-color: rgba(140,180,232,0.3) !important;
    color: var(--midnight-accent) !important;
}
body.theme-midnight [data-panel="equipment"] .rl-tabs--raised .rl-tab {
    background: linear-gradient(180deg, #121630, #0a0e22) !important;

    color: var(--midnight-accent) !important;
}
body.theme-midnight [data-panel="equipment"] .rl-tabs--raised .rl-tab:hover {
    background: linear-gradient(180deg, #1a2048, #121630) !important;

}
body.theme-midnight [data-panel="equipment"] .rl-tabs--raised .rl-tab.active {
    background: linear-gradient(180deg, #1e2458, #141838) !important;

    border-color: rgba(140,180,232,0.3) !important;
}

body.theme-midnight .eq-section-head {
    background: linear-gradient(180deg, #141838, #0e1228) !important;
    border: 1px solid #0a0e22 !important;
    border-radius: 0 !important;
    color: var(--midnight-accent) !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}

/* Tools bar */
body.theme-midnight .equip-tools {
    background: var(--cell-bg) !important;
}

/* Equipment stats */
body.theme-midnight .equip-stats {
    background: var(--cell-bg) !important;
    border-top-color: #1a2048 !important;
}
body.theme-midnight .eq-stat-row {
    border-bottom-color: #1a2048 !important;
}
body.theme-midnight .eq-stat-title {
    color: var(--midnight-accent) !important;
}

/* Combat style buttons */
body.theme-midnight .equip-style-row {
    background: var(--cell-bg) !important;
}
body.theme-midnight .equip-style-btn {
    background: #08091a !important;
    border: 1px solid #1a2048 !important;
}
body.theme-midnight .equip-style-btn:hover {
    background: #0c0f24 !important;
    border-color: #2a3468 !important;
}
body.theme-midnight .equip-style-btn.active {
    background: #0c0f24 !important;
    border-color: var(--midnight-accent) !important;
    color: var(--midnight-accent) !important;
    box-shadow: inset 0 0 8px rgba(140,180,232,0.1) !important;
}

/* Prayer buttons in equipment */
body.theme-midnight .equip-prayer-row {
    background: var(--cell-bg) !important;
}
body.theme-midnight .equip-prayer-btn {
    background: #08091a !important;
    border: 1px solid #1a2048 !important;
}
body.theme-midnight .equip-prayer-btn:hover {
    background: #0c0f24 !important;
    border-color: #2a3468 !important;
}
body.theme-midnight .equip-prayer-btn.active {
    background: #0c0f24 !important;
    border-color: var(--midnight-aurora-2) !important;
    color: var(--midnight-aurora-2) !important;
    box-shadow: inset 0 0 8px rgba(106,102,255,0.1) !important;
}


/* ════════════════════════════════════════════
   42. LOADOUT CONTROLS
   ════════════════════════════════════════════ */
body.theme-midnight .loadout-controls {
    background: var(--cell-bg) !important;
    border-top-color: #1a2048 !important;
}
body.theme-midnight .loadout-btn {
    background: linear-gradient(180deg, #1e2860, #14204a) !important;
    border-color: rgba(140,180,232,0.3) !important;
    color: var(--midnight-accent) !important;
}
body.theme-midnight .loadout-btn:hover {
    background: linear-gradient(180deg, #2a3470, #1e2860) !important;
}
body.theme-midnight .loadout-del {
    background: linear-gradient(180deg, #4a1a30, #3a1020) !important;
    border-color: #2a0818 !important;
}
body.theme-midnight .loadout-del:hover {
    background: linear-gradient(180deg, #5a2040, #4a1830) !important;
}
body.theme-midnight .loadout-input {
    background: #08091a !important;
    border-color: #1a2048 !important;
}
body.theme-midnight .loadout-input:focus {
    border-color: var(--midnight-accent) !important;
}
body.theme-midnight .loadout-activity-row {
    border-top-color: #1a2048 !important;
}
body.theme-midnight .loadout-prompt {
    border-top-color: #1a2048 !important;
}


/* ════════════════════════════════════════════
   43. OSRS BUTTONS — Bank Sell/Sort/Alch etc
   ════════════════════════════════════════════ */
body.theme-midnight .osrs-btn {
    background: linear-gradient(180deg, #1e2860, #14204a) !important;
    border-color: #0a0e28 !important;
    box-shadow: inset 1px 1px 0 #2a3468, inset -1px -1px 0 #08091a !important;
    color: var(--midnight-accent) !important;
}
body.theme-midnight .osrs-btn:hover {
    background: linear-gradient(180deg, #2a3470, #1e2860) !important;
}
body.theme-midnight .osrs-btn:active {
    box-shadow: inset -1px -1px 0 #2a3468, inset 1px 1px 0 #08091a !important;
    background: linear-gradient(180deg, #14204a, #2a3468) !important;
}
body.theme-midnight .osrs-btn.danger {
    background: linear-gradient(180deg, #4a1a30, #2e0e1a) !important;
    box-shadow: inset 1px 1px 0 #6a2a40, inset -1px -1px 0 #1a0810 !important;
    color: var(--red) !important;
}
body.theme-midnight .osrs-btn.danger:hover {
    background: linear-gradient(180deg, #5a2040, #3a1428) !important;
}


/* ════════════════════════════════════════════
   44. RL PANEL HEADERS (shop hub, etc.)
   ════════════════════════════════════════════ */
body.theme-midnight .rl-panel {
    background: var(--darkest) !important;
    border-color: #0a0e22 !important;
}
body.theme-midnight .rl-panel-header {
    background: linear-gradient(180deg, #141838, #0e1228) !important;
    border-bottom-color: #0a0e22 !important;
    color: var(--midnight-accent) !important;
}
body.theme-midnight .rl-panel-header .rl-panel-title {
    color: var(--midnight-accent) !important;
}
body.theme-midnight .rl-panel-close {
    color: var(--muted) !important;
}
body.theme-midnight .rl-panel-close:hover {
    color: var(--white) !important;
}


/* ════════════════════════════════════════════
   46. SKILL HUB — Full Viewport Skill Dashboard
   ════════════════════════════════════════════ */
body.theme-midnight .skill-hub {
    background: #08091a !important;
    background-image:
        radial-gradient(ellipse 800px 400px at 50% 0%, rgba(60,80,180,0.05) 0%, transparent 100%),
        radial-gradient(ellipse 600px 300px at 50% 100%, rgba(80,60,160,0.03) 0%, transparent 100%) !important;
}
body.theme-midnight .skill-hub::before {
    background: linear-gradient(90deg, transparent, var(--midnight-accent), transparent) !important;
}

/* Hub header */
body.theme-midnight .hub-header {
    background: linear-gradient(180deg, #10142e 0%, #0c0f24 100%) !important;
    border-bottom-color: #0a0e22 !important;
}
body.theme-midnight .hub-skill-icon {
    background: #141838 !important;
    border-color: #2a3468 !important;
}
body.theme-midnight .hub-skill-name {
    color: var(--midnight-accent) !important;
}
body.theme-midnight .hub-level {
    color: var(--midnight-accent) !important;
}
body.theme-midnight .hub-xp-bar-wrap {
    border-color: rgba(42,52,104,0.4) !important;
}
body.theme-midnight .hub-xp-bar-fill {
    background: linear-gradient(90deg, #2a5090, var(--midnight-accent)) !important;
    box-shadow: 0 0 4px rgba(140,180,232,0.3) !important;
}
body.theme-midnight .hub-stats {
    color: var(--muted) !important;
}
body.theme-midnight .hub-stat-sep {
    color: #2a3468 !important;
}
body.theme-midnight .hub-xp-text {
    color: var(--muted) !important;
}
body.theme-midnight .hub-swap {
    background: rgba(100,140,220,0.08) !important;
    border-color: rgba(140,180,232,0.2) !important;
}
body.theme-midnight .hub-swap:hover {
    background: rgba(100,140,220,0.15) !important;
    border-color: var(--midnight-accent) !important;
    box-shadow: 0 0 8px rgba(140,180,232,0.15) !important;
}

/* Tier strip */
body.theme-midnight .tier-strip {
    background: #0a0e22 !important;
    border-bottom-color: #08091a !important;
}
body.theme-midnight .tier-node {
    color: var(--muted) !important;
}
body.theme-midnight .tier-node.active {
    color: var(--midnight-accent) !important;
}
body.theme-midnight .tier-node.locked {
    color: #2a3060 !important;
}


/* ════════════════════════════════════════════
   47. SLAYER HUB — Full Slayer System
   ════════════════════════════════════════════ */
body.theme-midnight .slayer-hub-header,
body.theme-midnight .slayer-tab-bar,
body.theme-midnight .slayer-hub-content {
    background-color: #08091a !important;
}
body.theme-midnight .slayer-hub-header {
    background: linear-gradient(180deg, rgba(14,18,40,0.95) 0%, rgba(10,14,30,0.85) 100%) !important;
    border-bottom-color: #1a2048 !important;
}

/* Slayer stat boxes */
body.theme-midnight .slayer-stat-box {
    background: rgba(100,140,220,0.08) !important;
    border-color: #1a2048 !important;
}
body.theme-midnight .slayer-stat-val {
    color: var(--midnight-accent) !important;
}
body.theme-midnight .slayer-stat-label {
    color: var(--muted) !important;
}

/* Active task card */
body.theme-midnight .slayer-active-task {
    background: rgba(100,140,220,0.06) !important;
    border-color: rgba(140,180,232,0.2) !important;
}
body.theme-midnight .slayer-task-name {
    color: var(--midnight-accent) !important;
}
body.theme-midnight .slayer-task-count {
    color: var(--muted) !important;
}
body.theme-midnight .slayer-task-meta {
    color: #3a4a6a !important;
}
body.theme-midnight .slayer-task-meta b {
    color: var(--muted) !important;
}

/* Slayer task bar */
body.theme-midnight .slayer-task-bar-wrap {
    background: #08091a !important;
    border-color: #1a2048 !important;
}
body.theme-midnight .slayer-task-bar {
    background: linear-gradient(90deg, #2a5090, var(--midnight-accent)) !important;
    box-shadow: 0 0 6px rgba(140,180,232,0.3) !important;
}

/* Slayer tab bar */
body.theme-midnight .slayer-tab-bar {
    background: #0a0e22 !important;
    border-bottom-color: #1a2048 !important;
}
body.theme-midnight .slayer-tab {
    color: var(--muted) !important;
}
body.theme-midnight .slayer-tab:hover {
    color: var(--white) !important;
    background: rgba(100,140,220,0.04) !important;
}
body.theme-midnight .slayer-tab.active {
    color: var(--midnight-accent) !important;
    border-bottom-color: var(--midnight-accent) !important;
    background: rgba(100,140,220,0.06) !important;
}

/* Slayer content area */
body.theme-midnight .slayer-hub-content {
    scrollbar-color: #2a3468 transparent !important;
}

/* Empty task state */
body.theme-midnight .slayer-empty-title {
    color: #3a4a6a !important;
}
body.theme-midnight .slayer-empty-hint {
    color: #2a3a5a !important;
}

/* Task focus card */
body.theme-midnight .st-monster-name {
    color: var(--midnight-accent) !important;
    text-shadow: 0 1px 4px rgba(100,140,220,0.4) !important;
}
body.theme-midnight .icon-slayer-focus {
    filter: drop-shadow(0 2px 8px rgba(100,140,220,0.3)) !important;
}

/* Slayer master cards */
body.theme-midnight .slayer-master-card {
    background: #10142e !important;
    border-color: rgba(42,52,104,0.3) !important;
}
body.theme-midnight .slayer-master-card:hover:not(.locked) {
    border-color: rgba(140,180,232,0.3) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 15px rgba(100,140,220,0.08) !important;
}
body.theme-midnight .smc-portrait {
    border-color: #2a3468 !important;
    box-shadow: 0 0 14px rgba(100,140,220,0.15), inset 0 0 10px rgba(0,0,0,0.5) !important;
    background: #08091a !important;
}
body.theme-midnight .slayer-master-card:hover:not(.locked) .smc-portrait {
    border-color: var(--midnight-accent) !important;
    box-shadow: 0 0 22px rgba(140,180,232,0.3), inset 0 0 10px rgba(0,0,0,0.5) !important;
}
body.theme-midnight .smc-name {
    color: var(--midnight-accent) !important;
}
body.theme-midnight .slayer-master-card.locked .smc-name {
    color: #3a4a6a !important;
}
body.theme-midnight .smc-flavor {
    color: #3a4a6a !important;
}

/* Slayer task header overlay */
body.theme-midnight .sto-header { background: rgba(4,6,16,0.92) !important; border-bottom-color: rgba(140,180,232,0.15) !important; }
body.theme-midnight .sto-task-name { color: var(--midnight-accent) !important; }
body.theme-midnight .sto-task-count { color: #8cb4e8 !important; }
body.theme-midnight .sto-action-btn { border-color: rgba(140,180,232,0.15) !important; background: rgba(140,180,232,0.05) !important; color: #6a8ab0 !important; }
body.theme-midnight .sto-action-btn:hover { border-color: var(--midnight-accent) !important; color: var(--midnight-accent) !important; }

/* Slayer task target highlight on method rows */
body.theme-midnight .method-row.slayer-task-target {
    border-color: var(--midnight-accent) !important;
    box-shadow: 0 0 8px rgba(140,180,232,0.15) !important;
}

/* Slayer task buttons */
body.theme-midnight .slayer-task-btns .osrs-btn {
    background: linear-gradient(180deg, #1e2860, #14204a) !important;
    color: var(--midnight-accent) !important;
}


/* ════════════════════════════════════════════
   49. FULL-PAGE HUB DEEP OVERRIDES
   Skill hub, slayer hub, prestige hub internals
   ════════════════════════════════════════════ */

/* ── Skill Hub — tabs, grid, method cards, supply chain, tiers ── */
body.theme-midnight .hub-tabs { background: #0a0e22 !important; border-bottom-color: #08091a !important; }
body.theme-midnight .hub-grid-scroll { scrollbar-color: #2a3468 transparent !important; }
body.theme-midnight .hub-grid-scroll::-webkit-scrollbar-thumb { background: #2a3468 !important; }
body.theme-midnight .hub-grid-scroll::-webkit-scrollbar-thumb:hover { background: #3a4478 !important; }
body.theme-midnight .method-card { background: #141838 !important; border-color: #2a3468 !important; }
body.theme-midnight .method-card:hover { background: #1a2048 !important; box-shadow: 0 3px 10px rgba(40,60,120,0.35) !important; border-color: rgba(140,180,232,0.25) !important; }
body.theme-midnight .method-card.active { background: #1a2048 !important; border-color: var(--midnight-accent) !important; box-shadow: inset 0 0 8px rgba(100,140,220,0.1), 0 0 12px rgba(100,140,220,0.06) !important; }
body.theme-midnight .method-card.active::before { background: var(--midnight-accent) !important; }
body.theme-midnight .mc-play { background: linear-gradient(180deg, #1e2860, #14204a) !important; border-color: rgba(140,180,232,0.3) !important; color: var(--midnight-accent) !important; }
body.theme-midnight .mc-play:hover { background: linear-gradient(180deg, #2a3470, #1e2860) !important; border-color: var(--midnight-accent) !important; }
body.theme-midnight .hub-patches-header { color: var(--midnight-accent) !important; border-bottom-color: #1a2048 !important; }
body.theme-midnight .hub-patch-card { background: rgba(100,140,220,0.04) !important; border-color: rgba(140,180,232,0.12) !important; }
body.theme-midnight .hub-patch-bar { background: #08091a !important; }
body.theme-midnight .hub-patch-fill { background: linear-gradient(90deg, var(--midnight-accent), #a0d0ff) !important; }
body.theme-midnight .hub-empty { color: var(--muted) !important; }
body.theme-midnight .tier-connector { background: #1a2048 !important; }
body.theme-midnight .tier-connector.unlocked { background: linear-gradient(90deg, rgba(140,180,232,0.3), rgba(140,180,232,0.1)) !important; }
body.theme-midnight .tier-node.special-tier .tier-name { color: var(--midnight-accent) !important; }
body.theme-midnight .tier-node.special-tier.active { background: rgba(100,140,220,0.08) !important; border-color: var(--midnight-accent) !important; }
body.theme-midnight .supply-chain { background: linear-gradient(180deg, #08091a 0%, rgba(10,14,32,0.6) 100%) !important; border-bottom-color: #0a0e22 !important; }
body.theme-midnight .supply-node { background: #10142e !important; border-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .supply-arrow { color: var(--muted) !important; }
body.theme-midnight .hub-tab { color: var(--muted) !important; }
body.theme-midnight .hub-tab:hover { color: var(--white) !important; }
body.theme-midnight .hub-tab.active { color: var(--midnight-accent) !important; border-bottom-color: var(--midnight-accent) !important; }

/* ── Slayer Hub — buttons, task focus, rooms, drops ── */
body.theme-midnight .slayer-btn { background: #10142e !important; border-color: #2a3468 !important; color: var(--midnight-accent) !important; }
body.theme-midnight .slayer-btn:hover { background: #1a2048 !important; border-color: var(--midnight-accent) !important; color: #e0f0ff !important; }
body.theme-midnight .slayer-btn-sub { color: var(--muted) !important; }
body.theme-midnight .slayer-btn-primary { background: linear-gradient(180deg, var(--midnight-accent), #5a7aaa) !important; color: #08091a !important; border-color: var(--midnight-accent) !important; }
body.theme-midnight .slayer-btn-primary:hover { background: linear-gradient(180deg, #a0d0ff, var(--midnight-accent)) !important; }
body.theme-midnight .slayer-room { background: #08091a !important; }
body.theme-midnight .st-bar-wrap { background: #08091a !important; border-color: #1a2048 !important; }
body.theme-midnight .st-bar { background: linear-gradient(90deg, #2a5090, var(--midnight-accent), #a0d0ff) !important; box-shadow: 0 0 8px rgba(140,180,232,0.4) !important; }
body.theme-midnight .st-progress-pct { color: var(--muted) !important; }
body.theme-midnight .st-stat-label { color: var(--muted) !important; }
body.theme-midnight .st-drops-label { color: var(--muted) !important; }
body.theme-midnight .st-drop { background: rgba(100,140,220,0.03) !important; border-color: #1a2048 !important; }
body.theme-midnight .st-drop:hover { border-color: #2a3468 !important; background: rgba(100,140,220,0.06) !important; }

/* ── Prestige Hub — header, tabs, body, buttons, sections ── */
body.theme-midnight .p-fs-header { background: linear-gradient(180deg, #10142e 0%, #0c0f24 100%) !important; border-bottom-color: #0a0e22 !important; }
body.theme-midnight .p-fs-title { color: var(--midnight-accent) !important; }
body.theme-midnight .p-fs-close { background: rgba(100,140,220,0.08) !important; border-color: rgba(140,180,232,0.2) !important; color: var(--midnight-accent) !important; }
body.theme-midnight .p-fs-close:hover { background: rgba(100,140,220,0.15) !important; border-color: var(--midnight-accent) !important; }
body.theme-midnight .p-hs-label { color: var(--muted) !important; }
body.theme-midnight .p-hs-val { color: var(--midnight-accent) !important; }
body.theme-midnight .p-hs-currency { color: var(--midnight-accent) !important; }
body.theme-midnight .p-hs-dim { color: var(--muted) !important; }
body.theme-midnight .p-hs-sep { color: #2a3468 !important; }
body.theme-midnight .p-body { scrollbar-color: #2a3468 transparent !important; }
body.theme-midnight .p-body::-webkit-scrollbar-thumb { background: #2a3468 !important; }
body.theme-midnight .p-body::-webkit-scrollbar-thumb:hover { background: #3a4478 !important; }
body.theme-midnight .p-tabs { background: #0a0e22 !important; border-bottom-color: #08091a !important; }
body.theme-midnight .p-tab { color: var(--muted) !important; }
body.theme-midnight .p-tab:hover { color: var(--white) !important; }
body.theme-midnight .p-tab.active { color: var(--midnight-accent) !important; border-bottom-color: var(--midnight-accent) !important; }
body.theme-midnight .p-stone-head { border-bottom-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .p-stone-title { color: var(--muted) !important; }
body.theme-midnight .p-detail-section + .p-detail-section { border-top-color: #0a0e22 !important; }
body.theme-midnight .p-bv-btn { color: var(--midnight-accent) !important; background: linear-gradient(180deg, #1e2860, #14204a) !important; border-color: rgba(140,180,232,0.3) !important; }
body.theme-midnight .p-bv-btn:hover { background: linear-gradient(180deg, #2a3470, #1e2860) !important; border-color: var(--midnight-accent) !important; }
body.theme-midnight .p-bv-btn.primary { background: linear-gradient(180deg, var(--midnight-accent), #5a7aaa) !important; color: #08091a !important; }
body.theme-midnight .p-bv-btn.primary:hover { background: linear-gradient(180deg, #a0d0ff, var(--midnight-accent)) !important; }
body.theme-midnight .p-prest-section + .p-prest-section { border-top-color: #0a0e22 !important; }
body.theme-midnight .p-prest-tier-num { color: var(--midnight-accent) !important; }
body.theme-midnight .p-prest-section-title.earn { color: var(--midnight-accent) !important; }

/* ── Prestige Bingo Card ── */
body.theme-midnight .p-stone { background: var(--panel-bg) !important; border-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .p-stone-body { background: var(--dark-bg) !important; }
body.theme-midnight .p-bingo-tile { background: var(--cell-bg) !important; background-image: none !important; border-color: rgba(42,52,104,0.4) !important; box-shadow: none !important; }
body.theme-midnight .p-bingo-tile:hover { background: var(--cell-hover) !important; border-color: rgba(60,72,140,0.5) !important; }
body.theme-midnight .p-bingo-tile.active { border-color: var(--gold) !important; box-shadow: 0 0 8px rgba(106,138,255,0.2) !important; }
body.theme-midnight .p-bingo-tile.complete { background: var(--cell-bg) !important; border-color: rgba(106,184,64,0.4) !important; }
body.theme-midnight .p-bingo-tile.in-line { border-color: rgba(106,138,255,0.4) !important; }
body.theme-midnight .p-bingo-tile.reroll-target { border-color: var(--red) !important; box-shadow: 0 0 8px rgba(204,56,56,0.2) !important; }
body.theme-midnight .p-bingo-tile.ext-tile { border-color: rgba(106,138,255,0.25) !important; }
body.theme-midnight .p-bingo-tile.empty-slot { background: var(--dark-bg) !important; border-color: rgba(42,52,104,0.2) !important; }
body.theme-midnight .p-bt-id { color: var(--muted) !important; }
body.theme-midnight .p-bt-obj { color: var(--white) !important; }
body.theme-midnight .p-bt-check { color: var(--green) !important; }
body.theme-midnight .p-bt-prog-text { color: var(--muted) !important; }
body.theme-midnight .p-prog-bar { background: var(--darkest) !important; border-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .p-prog-fill { background: linear-gradient(90deg, #3a4a80, #6a8aff) !important; box-shadow: none !important; }
body.theme-midnight .p-prog-fill.green { background: linear-gradient(90deg, #3a5a2a, #6ab840) !important; }
body.theme-midnight .p-bingo-lines { border-top-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .p-bingo-line { color: var(--muted) !important; }
body.theme-midnight .p-bingo-line.done { color: var(--green) !important; }
body.theme-midnight .p-bingo-footer { background: var(--dark-bg) !important; border-top-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .p-board-reset-row { border-top-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .p-board-reset-info { color: var(--muted) !important; }
body.theme-midnight .p-reroll-banner { background: rgba(204,56,56,0.08) !important; border-color: rgba(204,56,56,0.2) !important; }
body.theme-midnight .p-pick-btn { background: linear-gradient(180deg, rgba(42,52,104,0.4), rgba(30,40,80,0.4)) !important; color: var(--gold) !important; border-color: rgba(42,52,104,0.4) !important; }
body.theme-midnight .p-pick-btn:hover { background: linear-gradient(180deg, rgba(50,62,120,0.5), rgba(42,52,104,0.4)) !important; border-color: var(--gold) !important; }

/* ── Prestige Boosts ── */
body.theme-midnight .p-boosts-section { background: var(--panel-bg) !important; }
body.theme-midnight .p-boosts-cat { color: var(--gold) !important; border-bottom-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .p-boosts-desc { color: var(--muted) !important; }
body.theme-midnight .p-boost-row { background: var(--cell-bg) !important; border-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .p-boost-row:hover { background: var(--cell-hover) !important; border-color: rgba(60,72,140,0.4) !important; }
body.theme-midnight .p-boost-label { color: var(--white) !important; }
body.theme-midnight .p-boost-level { color: var(--gold) !important; }
body.theme-midnight .p-boost-bar { background: var(--darkest) !important; }
body.theme-midnight .p-boost-bar-fill { background: linear-gradient(90deg, #3a4a80, #6a8aff) !important; }
body.theme-midnight .p-boost-buy { background: linear-gradient(180deg, rgba(42,52,104,0.4), rgba(30,40,80,0.4)) !important; color: var(--gold) !important; border-color: rgba(42,52,104,0.4) !important; }
body.theme-midnight .p-boost-buy:hover { background: linear-gradient(180deg, rgba(50,62,120,0.5), rgba(42,52,104,0.4)) !important; border-color: var(--gold) !important; }
body.theme-midnight .p-boost-buy.disabled { background: var(--dark-bg) !important; color: #333 !important; border-color: rgba(42,52,104,0.2) !important; }

/* ── Prestige Completed ── */
body.theme-midnight .p-completed-section { background: var(--panel-bg) !important; }
body.theme-midnight .p-completed-head { color: var(--gold) !important; border-bottom-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .p-completed-tile { background: var(--cell-bg) !important; border-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .p-completed-tile:hover { background: var(--cell-hover) !important; }
body.theme-midnight .p-completed-name { color: var(--white) !important; }
body.theme-midnight .p-completed-reward { color: var(--muted) !important; }
body.theme-midnight .p-completed-upgrade-badge { background: rgba(106,138,255,0.1) !important; color: var(--gold) !important; }
body.theme-midnight .p-completed-upgrade-info { color: var(--muted) !important; }

/* ── Prestige content area + scrollbar (texture leak fix) ── */
body.theme-midnight .ph-content {
    background: var(--darkest) !important;
}
body.theme-midnight .ph-hub .slayer-tab-bar {
    background: var(--panel-bg) !important;
}
body.theme-midnight .p-body {
    scrollbar-color: rgba(140,180,232,0.25) transparent;
}
body.theme-midnight .p-body::-webkit-scrollbar-thumb {
    background: rgba(140,180,232,0.25) !important;
}
body.theme-midnight .p-body::-webkit-scrollbar-thumb:hover {
    background: rgba(140,180,232,0.4) !important;
}
body.theme-midnight .p-stone-head {
    border-bottom-color: rgba(140,180,232,0.1) !important;
}
body.theme-midnight .p-stone-title {
    color: var(--muted) !important;
}
body.theme-midnight .p-tier-node { background: var(--cell-bg) !important; border: 1px solid rgba(140,180,232,0.12) !important; }
body.theme-midnight .p-tier-node.current { border-color: var(--midnight-accent) !important; }
body.theme-midnight .p-tier-node.current .p-tier-num,
body.theme-midnight .p-tier-node.current .p-tier-label { color: var(--midnight-accent) !important; }
body.theme-midnight .p-dash-pill { color: var(--muted) !important; }
body.theme-midnight .p-dash-pill.active { color: var(--midnight-accent) !important; border-bottom-color: var(--midnight-accent) !important; }
body.theme-midnight .p-monster-group-label { color: var(--midnight-accent) !important; }
body.theme-midnight .p-boss-check { color: var(--midnight-accent) !important; }
body.theme-midnight .p-prest-num { color: var(--midnight-accent) !important; }
body.theme-midnight .p-prest-content { color: var(--white) !important; }
body.theme-midnight .p-bar-fill { background: linear-gradient(90deg, #5a7aaa, #8cb4e8) !important; }
body.theme-midnight .p-frozen-warn { color: var(--red) !important; border-color: rgba(255,85,102,0.2) !important; background: rgba(255,85,102,0.05) !important; }
body.theme-midnight .p-reroll-btn { background: linear-gradient(180deg, rgba(42,52,104,0.4), rgba(30,40,80,0.4)) !important; color: var(--gold) !important; border-color: rgba(42,52,104,0.4) !important; }
body.theme-midnight .p-reroll-btn:hover { border-color: var(--gold) !important; }

/* ── Tile detail overlay ── */
body.theme-midnight .p-tile-det { background: var(--panel-bg) !important; border-color: rgba(140,180,232,0.15) !important; }
body.theme-midnight .p-tile-det-head { background: linear-gradient(180deg, #141838, #0e1228) !important; border-bottom-color: #0a0e22 !important; }
body.theme-midnight .p-tile-det-title { color: var(--midnight-accent) !important; }
body.theme-midnight .p-tile-det-desc { color: var(--muted) !important; }
body.theme-midnight .p-tile-det-req { color: var(--white) !important; }
body.theme-midnight .p-tile-det-reward { color: var(--midnight-accent) !important; }
body.theme-midnight .p-tile-det-close { color: var(--muted) !important; }
body.theme-midnight .p-tile-det-close:hover { color: var(--white) !important; }

/* ── Pool picker ── */
body.theme-midnight .p-pick-grid { background: var(--darkest) !important; }
body.theme-midnight .p-pick-tile { background: var(--cell-bg) !important; border-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .p-pick-tile:hover { border-color: rgba(60,72,140,0.5) !important; background: var(--cell-hover) !important; }
body.theme-midnight .p-pick-tile.selected { border-color: var(--midnight-accent) !important; }
body.theme-midnight .p-pick-tile-name { color: var(--white) !important; }

/* ── Confirm screen ── */
body.theme-midnight .p-confirm { background: var(--panel-bg) !important; }
body.theme-midnight .p-confirm-title { color: var(--midnight-accent) !important; }
body.theme-midnight .p-confirm-desc { color: var(--muted) !important; }

/* ── Prestige Dashboard ── */
body.theme-midnight .p-dashboard { background: var(--dark-bg) !important; }
body.theme-midnight .p-dash-left { background: var(--panel-bg) !important; border-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .p-dash-right { background: var(--panel-bg) !important; border-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .p-dash-footer { background: var(--dark-bg) !important; border-top-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .p-dash-label { color: var(--gold) !important; }
body.theme-midnight .p-dash-label-sub { color: var(--muted) !important; }
body.theme-midnight .p-dash-pill { background: var(--cell-bg) !important; border-color: rgba(42,52,104,0.3) !important; color: var(--white) !important; }
body.theme-midnight .p-dash-sep { border-color: rgba(42,52,104,0.3) !important; }

/* ── Prestige Detail ── */
body.theme-midnight .p-detail-label { color: var(--muted) !important; }
body.theme-midnight .p-detail-obj { color: var(--white) !important; }
body.theme-midnight .p-detail-prog-row { color: var(--white) !important; }
body.theme-midnight .p-detail-footer { background: var(--dark-bg) !important; border-top-color: rgba(42,52,104,0.3) !important; }

/* ── Production Chips ── */
body.theme-midnight .prod-chip { color: var(--white) !important; }
body.theme-midnight .prod-chip.res-ok { color: var(--green) !important; }
body.theme-midnight .prod-chip.res-no { color: var(--red) !important; }
body.theme-midnight .prod-chip.prod-output { color: var(--gold) !important; }
body.theme-midnight .prod-arrow { color: var(--muted) !important; }
body.theme-midnight .prod-can-make { color: var(--muted) !important; }
body.theme-midnight .prod-line { border-color: rgba(42,52,104,0.3) !important; }

/* ── Skill Hub ── */
body.theme-midnight .hub-materials { background: var(--panel-bg) !important; border-color: rgba(42,52,104,0.3) !important; color: var(--white) !important; }
body.theme-midnight .hub-chest { background: transparent !important; border-color: transparent !important; }
body.theme-midnight .hub-chest:hover { background: transparent !important; border-color: transparent !important; }

/* ── MARKETPLACE ── */
body.theme-midnight .marketplace-header { background: linear-gradient(180deg, #141838, #0e1228) !important; border-bottom-color: var(--darkest) !important; }
body.theme-midnight .marketplace-header::after { background: linear-gradient(90deg, transparent, rgba(106,138,255,0.15), transparent) !important; }
body.theme-midnight .marketplace-title { color: var(--gold) !important; }
body.theme-midnight .marketplace-slots-count { color: var(--muted) !important; }
body.theme-midnight .marketplace-offer-row { background: linear-gradient(180deg, var(--cell-bg), var(--dark-bg)) !important; border-color: rgba(42,52,104,0.4) !important; }
body.theme-midnight .marketplace-offer-row:hover { border-color: rgba(60,72,140,0.5) !important; }
body.theme-midnight .marketplace-offer-icon { background: rgba(0,0,0,0.3) !important; border-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .marketplace-offer-name { color: var(--gold) !important; }
body.theme-midnight .marketplace-offer-detail { color: var(--muted) !important; }
body.theme-midnight .marketplace-offer-progress { background: var(--darkest) !important; border-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .marketplace-empty-text { color: var(--muted) !important; }
body.theme-midnight .marketplace-empty-hint { color: #333 !important; }
body.theme-midnight .marketplace-btn { background: linear-gradient(180deg, rgba(42,52,104,0.4), rgba(30,40,80,0.4)) !important; color: var(--white) !important; box-shadow: none !important; border-color: rgba(42,52,104,0.4) !important; }
body.theme-midnight .marketplace-btn:hover { background: linear-gradient(180deg, rgba(50,62,120,0.5), rgba(42,52,104,0.4)) !important; border-color: rgba(60,72,140,0.5) !important; }
body.theme-midnight .marketplace-btn-confirm { background: linear-gradient(180deg, #4a6ae0, #3a4a80) !important; color: #fff !important; border-color: #6a8aff !important; }
body.theme-midnight .marketplace-collect-banner { background: rgba(106,138,255,0.06) !important; border-color: rgba(106,138,255,0.15) !important; }
body.theme-midnight .marketplace-collect-banner-text { color: var(--gold) !important; }
body.theme-midnight .marketplace-browse-row { background: var(--cell-bg) !important; border-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .marketplace-browse-row:hover { background: var(--cell-hover) !important; border-color: rgba(60,72,140,0.4) !important; }
body.theme-midnight .marketplace-browse-name { color: var(--white) !important; }
body.theme-midnight .marketplace-browse-detail { color: var(--muted) !important; }
body.theme-midnight .marketplace-browse-search-wrap { background: var(--darkest) !important; border-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .marketplace-browse-sort-select { background: var(--darkest) !important; color: var(--white) !important; border-color: rgba(42,52,104,0.4) !important; }
body.theme-midnight .marketplace-browse-sort-label { color: var(--muted) !important; }
body.theme-midnight .marketplace-category-pill { background: var(--cell-bg) !important; color: var(--muted) !important; border-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .marketplace-category-pill:hover { color: var(--white) !important; }
body.theme-midnight .marketplace-category-pill-active { color: var(--gold) !important; background: var(--cell-hover) !important; border-color: rgba(60,72,140,0.4) !important; }
body.theme-midnight .marketplace-create-body { background: var(--panel-bg) !important; }
body.theme-midnight .marketplace-create-close { color: var(--muted) !important; }
body.theme-midnight #marketplace-panel-body { background: var(--panel-bg) !important; }

/* ── RL CONTROLS (quests, methods, all list headers) ── */
body.theme-midnight .rl-controls { background: linear-gradient(180deg, #141838, #0e1228) !important; border-bottom-color: var(--darkest) !important; }
body.theme-midnight .rl-search { background: var(--darkest) !important; color: var(--white) !important; border-color: rgba(42,52,104,0.4) !important; }
body.theme-midnight .rl-search::placeholder { color: var(--muted) !important; }
body.theme-midnight .rl-search:focus { outline-color: var(--gold) !important; border-color: var(--gold) !important; }
body.theme-midnight .rl-select { background: var(--darkest) !important; color: var(--gold) !important; border-color: rgba(42,52,104,0.4) !important; }
body.theme-midnight .rl-pill { background: var(--cell-bg) !important; color: var(--muted) !important; border-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .rl-pill:hover { color: var(--white) !important; background: var(--cell-hover) !important; }
body.theme-midnight .rl-pill.active { color: var(--gold) !important; background: linear-gradient(180deg, rgba(42,52,104,0.5), rgba(30,40,80,0.4)) !important; box-shadow: 0 0 6px rgba(106,138,255,0.1) !important; }
body.theme-midnight .rl-stat-bar { color: var(--muted) !important; border-bottom-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .rl-stat-val { color: var(--gold) !important; }
body.theme-midnight .rl-search-wrap { border-bottom-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .rl-reset-btn { background: var(--darkest) !important; color: var(--gold) !important; border-color: rgba(42,52,104,0.4) !important; }

/* ── FORGE PROGRESS (Skill Hub) ── */
body.theme-midnight .forge-progress { background: linear-gradient(180deg, var(--panel-bg), var(--dark-bg)) !important; border-bottom-color: var(--darkest) !important; }
body.theme-midnight .forge-progress::before { background: radial-gradient(ellipse 300px 80px at 50% 100%, rgba(106,138,255,0.04) 0%, transparent 100%), radial-gradient(ellipse 200px 60px at 50% 0%, rgba(106,138,255,0.03) 0%, transparent 100%) !important; }
body.theme-midnight .forge-icon-wrap { background: var(--cell-hover) !important; border-color: rgba(42,52,104,0.4) !important; }
body.theme-midnight .forge-item-name { color: var(--gold) !important; }
body.theme-midnight .forge-item-detail { color: var(--muted) !important; }
body.theme-midnight .forge-output-chip { color: var(--gold) !important; }
body.theme-midnight .forge-arrow { color: var(--muted) !important; }
body.theme-midnight .forge-stat-label { color: var(--muted) !important; }
body.theme-midnight .forge-bar-wrap { background: var(--darkest) !important; border-color: rgba(42,52,104,0.3) !important; }
body.theme-midnight .forge-bar-fill { background: linear-gradient(90deg, #3a4a80, #6a8aff) !important; box-shadow: 0 0 8px rgba(106,138,255,0.2) !important; }
body.theme-midnight .forge-bar-time { color: var(--muted) !important; }
body.theme-midnight .forge-session { color: var(--muted) !important; }
body.theme-midnight .forge-session-val { color: var(--white) !important; }
body.theme-midnight .forge-stop { background: linear-gradient(180deg, #2a1420, #1a0e14) !important; border-color: rgba(204,56,56,0.3) !important; }
body.theme-midnight .forge-stop:hover { background: linear-gradient(180deg, #3a2430, #2a1420) !important; border-color: var(--red) !important; }
body.theme-midnight .forge-idle-msg { color: var(--muted) !important; }


/* ════════════════════════════════════════════
   50. REDUCED MOTION — Accessibility
   ════════════════════════════════════════════ */
/* ── MOBILE NAV BARS ── */
@media (max-width: 768px) {
    body.theme-midnight .mobile-tab-strip,
    body.theme-midnight #mobile-tab-strip {
        background: linear-gradient(180deg, #141838, #0e1228 50%, #0a0e1e) !important;
    }
    body.theme-midnight .mobile-tab-strip-top {
        background: linear-gradient(180deg, #141838, #0c1028) !important;
        border-bottom-color: #0a0e22 !important;
    }
    body.theme-midnight .mts-btn.active::after {
        background: var(--midnight-accent) !important;
        box-shadow: 0 0 6px 2px rgba(140,180,232,0.5) !important;
    }
    body.theme-midnight .mobile-tab-strip-top .mts-btn.active {
        border-bottom-color: var(--midnight-accent) !important;
    }
}

/* ════════════════════════════════════════════════════════════
   MIDNIGHT — FULL MANIFEST COVERAGE
   Every selector from theme-authoring-guide.md that was missing.
   ════════════════════════════════════════════════════════════ */

/* ── Texture-leaking surfaces (brown parchment bleed-through) ── */
body.theme-midnight .friends-panel-body {
    background: var(--panel-bg) !important;

}
body.theme-midnight .rc-panel-search {
    background: #0e1228 !important;
    border-bottom-color: #080c1e !important;
}
body.theme-midnight .rc-modal-body {
    background: var(--panel-bg) !important;

}
body.theme-midnight .equip-actions {
    background: var(--cell-bg) !important;

}
body.theme-midnight .rl-panel-body {
    background: var(--darkest) !important;

}

/* ── Foundation: scrollbar corner + Firefox scrollbar ── */
body.theme-midnight ::-webkit-scrollbar-corner {
    background: var(--darkest);
}
body.theme-midnight * {
    scrollbar-color: rgba(140,180,232,0.25) var(--darkest);
}

/* ── Topbar extras ── */
body.theme-midnight .topbar > * { position: relative; z-index: 1; }
body.theme-midnight .topbar-logo { filter: drop-shadow(0 0 6px rgba(140,180,232,0.25)); }
body.theme-midnight .topbar-online { color: var(--muted); }
body.theme-midnight .server-dot.connected { background: var(--midnight-aurora-1); box-shadow: 0 0 4px rgba(64,221,170,0.5); }
body.theme-midnight .topbar-stats { color: var(--muted); }
body.theme-midnight .stat-val { color: var(--white); }
body.theme-midnight .stat-val.gold { color: var(--midnight-accent); }
body.theme-midnight .topbar-coin-icon { filter: drop-shadow(0 0 3px rgba(140,180,232,0.3)); }
body.theme-midnight .topbar-cloud-save,
body.theme-midnight .topbar-roadmap { color: var(--muted); }
body.theme-midnight .topbar-cloud-save:hover,
body.theme-midnight .topbar-roadmap:hover { background: rgba(140,180,232,0.08); color: var(--white); }
body.theme-midnight .pause-btn { color: var(--muted); }
body.theme-midnight .pause-btn:hover { background: rgba(140,180,232,0.08); color: var(--white); }
body.theme-midnight .pause-btn.paused { background: rgba(140,180,232,0.15); color: var(--midnight-accent); }
body.theme-midnight .topbar-char-btn { color: var(--muted); }
body.theme-midnight .topbar-char-btn:hover { background: rgba(140,180,232,0.08); }
body.theme-midnight .topbar-char-icon { color: var(--muted); }
body.theme-midnight .topbar-support { opacity: 0.7; }
body.theme-midnight .topbar-support img { height: 28px; }
body.theme-midnight .topbar-rolling-text { color: var(--muted); }
body.theme-midnight .topbar-rolling-banner { background: rgba(140,180,232,0.06); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .topbar-rolling-link:hover .topbar-rolling-text { color: var(--midnight-accent); }

/* ── Viewport extras ── */
body.theme-midnight .action-status { color: var(--muted); }
body.theme-midnight .action-icon { position: relative; z-index: 1; }
body.theme-midnight .action-method-name { color: rgba(200,210,240,0.6); }
body.theme-midnight .action-xp { color: var(--midnight-aurora-1); }
body.theme-midnight .action-cost { color: var(--muted); }
body.theme-midnight .weapon-display { color: rgba(200,210,240,0.5); }
body.theme-midnight .spec-attack-wrap { background: var(--cell-bg) !important; background-image: none !important; }
body.theme-midnight .spec-counter-text { color: var(--midnight-accent); }
body.theme-midnight .dps-meter { color: var(--muted); }
body.theme-midnight .monster-hp-label { color: var(--white); }
body.theme-midnight #monster-name { color: var(--white); }
body.theme-midnight #monster-hp-text { color: var(--muted); }

/* ── Chatbox extras ── */
body.theme-midnight .chatbox::before { background: linear-gradient(90deg, transparent, rgba(140,180,232,0.15), transparent); }
body.theme-midnight .chatbox-tab:last-child { border-right: none; }
body.theme-midnight .chatbox-tab .tab-state { color: var(--midnight-aurora-1); }
body.theme-midnight .chat-line .log-clan-tag { color: var(--midnight-accent); }
body.theme-midnight .chat-input::placeholder { color: rgba(140,180,232,0.3); }

/* ── Sidebar extras ── */
body.theme-midnight .sidebar-inner { background: var(--darkest); }

/* ── Skill grid extras ── */
body.theme-midnight .sk-icon { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
body.theme-midnight .skill-cell.maxed::after { display: none; }

/* ── RL bar extras ── */
body.theme-midnight .rl-bar-btn { border: 1px solid transparent; }
body.theme-midnight .rl-bar-btn img { opacity: 0.6; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.5)); }
body.theme-midnight .rl-bar-btn:hover img { opacity: 0.85; }
body.theme-midnight .rl-bar-btn.active img { opacity: 1; }
body.theme-midnight .rl-panel-close { color: var(--muted); }
body.theme-midnight .rl-panel-close:hover { color: var(--white); }

/* ── RC panel extras ── */
body.theme-midnight .rc-panel-head-info { color: var(--muted); }
body.theme-midnight .rc-panel-foot { background: var(--darkest) !important; background-image: none !important; color: var(--muted); }
body.theme-midnight [data-panel="bank"] > .rc-panel-body { background: var(--darkest) !important; background-image: none !important; }

/* ── RC modal extras ── */
body.theme-midnight .rc-modal-close { color: var(--muted); }
body.theme-midnight .rc-modal-close:hover { color: var(--white); }
body.theme-midnight .rc-modal-head::after {
    content: ''; position: absolute; bottom: -4px; left: 50%;
    width: 6px; height: 6px; transform: translateX(-50%) rotate(45deg);
    background: linear-gradient(135deg, #8cb4e8, #5a7aaa);
    box-shadow: 0 0 6px rgba(140,180,232,0.4); z-index: 1;
}
body.theme-midnight .rc-modal-head-right { color: var(--muted); }

/* ── Method list extras ── */
body.theme-midnight .method-row.locked .meth-name { color: var(--muted); }
body.theme-midnight .meth-name { color: var(--white); }
body.theme-midnight .meth-stats { color: var(--muted); }
body.theme-midnight .meth-icon { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4)); }
body.theme-midnight .detail-label { color: var(--muted); }
body.theme-midnight .detail-value { color: var(--white); }
body.theme-midnight .detail-value.green { color: var(--midnight-aurora-1); }
body.theme-midnight .detail-value.gold { color: var(--midnight-accent); }
body.theme-midnight .detail-value.red { color: var(--red); }
body.theme-midnight .md-section { background: rgba(0,0,0,0.3); border: 1px solid rgba(140,180,232,0.12); }
body.theme-midnight .md-section-title { color: var(--midnight-accent); }
body.theme-midnight .mon-level { color: var(--midnight-accent); }
body.theme-midnight .method-detail-btn {
    color: var(--midnight-accent); background: linear-gradient(180deg, rgba(140,180,232,0.12), rgba(0,0,0,0.3));
    border: 1px solid rgba(140,180,232,0.3); border-radius: 3px;
}
body.theme-midnight .method-detail-btn:hover { border-color: rgba(140,180,232,0.5); }
body.theme-midnight .method-shortcut-btn { background: rgba(140,180,232,0.06); border: 1px solid rgba(140,180,232,0.15); color: var(--white); }
body.theme-midnight .method-shortcut-btn:hover { border-color: rgba(140,180,232,0.3); }
body.theme-midnight .method-detail-reqs { background: rgba(255,85,102,0.06); border: 1px solid rgba(255,85,102,0.15); }
body.theme-midnight .mi-section { background: rgba(0,0,0,0.25); border: 1px solid rgba(140,180,232,0.12); }
body.theme-midnight .mi-section-title { color: var(--midnight-accent); }
body.theme-midnight .mi-cell-val { color: var(--white); }
body.theme-midnight .mi-cell-label { color: var(--muted); }
body.theme-midnight .mi-loot-row { border-bottom: 1px solid rgba(140,180,232,0.06); }
body.theme-midnight .mi-loot-name { color: var(--white); }
body.theme-midnight .mi-loot-rate { color: var(--muted); }
body.theme-midnight .mi-loot-unique .mi-loot-name { color: var(--midnight-accent); }
body.theme-midnight .monster-info-panel-left { background: var(--cell-bg); }
body.theme-midnight .method-list-subhead { color: var(--midnight-accent); }
body.theme-midnight .prod-chip.prod-output { color: var(--midnight-accent); }

/* ── Bank extras ── */
body.theme-midnight .bi-qty { color: var(--midnight-accent); }
body.theme-midnight .bi-qty.qty-white { color: #fff; }
body.theme-midnight .bi-qty.qty-green { color: var(--midnight-aurora-1); }
body.theme-midnight .bank-tier-badge { color: var(--midnight-accent); background: rgba(0,0,0,0.75); border: 1px solid rgba(140,180,232,0.2); }
body.theme-midnight .bank-grid.sell-mode { background: rgba(255,85,102,0.08); }
body.theme-midnight .bank-lock { opacity: 0.6; }
body.theme-midnight .bank-sort-btn { color: var(--muted); background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.12); }
body.theme-midnight .bank-sort-btn:hover { color: var(--white); border-color: rgba(140,180,232,0.3); }
body.theme-midnight .bank-value-bar { color: var(--muted); background: var(--darkest); border-top: 1px solid rgba(0,0,0,0.5); }
body.theme-midnight .bank-item.clue-scroll { border-color: var(--midnight-accent); }

/* ── Equipment extras ── */
body.theme-midnight .eq-name { color: rgba(200,210,240,0.6); }
body.theme-midnight .prayer-points-footer { color: var(--white); background: var(--darkest); }

/* ── Character select ── */
body.theme-midnight .charslot { background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.12); }
body.theme-midnight .charslot:hover { border-color: rgba(140,180,232,0.3); background: var(--cell-hover); }
body.theme-midnight .charslot-active { border-color: var(--midnight-accent); }
body.theme-midnight .charslot-name { color: var(--white); }
body.theme-midnight .charslot-name.charslot-empty { color: var(--muted); }
body.theme-midnight .charslot-playing { color: var(--midnight-aurora-1); }
body.theme-midnight .charslot-stats { color: var(--muted); }
body.theme-midnight .charslot-create-form { background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.12); }
body.theme-midnight .charslot-create-title { color: var(--midnight-accent); }
body.theme-midnight .charslot-create-label { color: var(--muted); }
body.theme-midnight .charslot-name-input { color: var(--white); background: var(--darkest); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .charslot-name-input:focus { border-color: var(--midnight-accent); }
body.theme-midnight .charslot-delete-warn { color: var(--red); }
body.theme-midnight .charslot-customize { color: var(--midnight-accent) !important; }
body.theme-midnight .charslot-load,
body.theme-midnight .charslot-create,
body.theme-midnight .charslot-confirm { background: linear-gradient(180deg, #2a4080, #1a2860); color: #d0daf0; border-color: #1a2048; }
body.theme-midnight .charslot-load:hover,
body.theme-midnight .charslot-create:hover,
body.theme-midnight .charslot-confirm:hover { background: linear-gradient(180deg, #3a50a0, #2a3870); }
body.theme-midnight .charslot-cancel,
body.theme-midnight .charslot-export { color: var(--muted); background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .charslot-cancel:hover,
body.theme-midnight .charslot-export:hover { color: var(--white); border-color: rgba(140,180,232,0.3); }
body.theme-midnight .charslot-delete { background: linear-gradient(180deg, #802040, #601830); color: #fcc; border-color: #401020; }
body.theme-midnight .charselect-signout-btn { color: var(--muted); background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .charselect-close { color: var(--muted); }
body.theme-midnight .charselect-close:hover { color: var(--white); }
body.theme-midnight .charselect-footer-email { color: rgba(200,210,240,0.3); }
body.theme-midnight .cloud-section { background: rgba(0,0,0,0.15); border: 1px solid rgba(140,180,232,0.1); }
body.theme-midnight .cloud-user-email { color: var(--muted); }
body.theme-midnight .cloud-hint { color: var(--muted); }
body.theme-midnight .cloud-signout-btn { color: var(--muted); }
body.theme-midnight .login-welcome { color: var(--midnight-accent); }
body.theme-midnight .login-screen-body { background: var(--cell-bg); }
body.theme-midnight .login-separator { background: linear-gradient(90deg, transparent, rgba(140,180,232,0.15), transparent); }
body.theme-midnight .login-separator-text { color: var(--muted); }
body.theme-midnight .login-hint { color: var(--muted); }
body.theme-midnight .login-guest-btn { color: var(--muted); background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .login-guest-btn:hover { color: var(--white); border-color: rgba(140,180,232,0.3); }

/* ── Clue scroll ── */
body.theme-midnight .clue-scroll-grid { background: var(--darkest); }
body.theme-midnight .clue-reward-item { background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.08); }
body.theme-midnight .clue-reward-item:hover { background: var(--cell-hover); border-color: rgba(140,180,232,0.25); }
body.theme-midnight .clue-scroll-value { background: var(--cell-bg); border-top: 1px solid rgba(140,180,232,0.1); color: var(--muted); }
body.theme-midnight .clue-item-tooltip { background: var(--darkest); border: 1px solid rgba(140,180,232,0.2); color: var(--midnight-accent); }
body.theme-midnight .clue-sell-all { color: var(--midnight-accent); background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.2); }
body.theme-midnight .clue-sell-all:hover { border-color: rgba(140,180,232,0.4); }

/* ── Settings (entire section) ── */
body.theme-midnight .settings-title,
body.theme-midnight .settings-section-title { color: var(--midnight-accent); }
body.theme-midnight .settings-label { color: var(--white); }
body.theme-midnight .settings-description { color: var(--muted); }
body.theme-midnight .settings-body { background: var(--panel-bg); }
body.theme-midnight .settings-row { border-bottom: 1px solid rgba(140,180,232,0.05); }
body.theme-midnight .settings-row:hover { background: rgba(140,180,232,0.03); }
body.theme-midnight .settings-row-label { color: var(--white); }
body.theme-midnight .settings-row-icon { color: var(--muted); }
body.theme-midnight .settings-chevron-right,
body.theme-midnight .settings-chevron-left { color: var(--muted); }
body.theme-midnight .settings-submenu-row:hover .settings-chevron-right,
body.theme-midnight .settings-submenu-row:hover .settings-chevron-left { border-color: var(--midnight-accent); }
body.theme-midnight .settings-divider { background: linear-gradient(90deg, transparent, rgba(140,180,232,0.12), transparent); }
body.theme-midnight .settings-group { background: rgba(0,0,0,0.15); border: 1px solid rgba(140,180,232,0.1); }
body.theme-midnight .settings-btn,
body.theme-midnight .settings-discord-btn { color: var(--white); background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .settings-btn:hover,
body.theme-midnight .settings-discord-btn:hover { border-color: rgba(140,180,232,0.3); }
body.theme-midnight .settings-delete-account-btn { background: rgba(255,85,102,0.1); border: 1px solid rgba(255,85,102,0.25); color: var(--red); }
body.theme-midnight .settings-broadcast-name { color: var(--white); background: var(--darkest); border: 1px solid rgba(140,180,232,0.12); }
body.theme-midnight .settings-broadcast-name:focus { border-color: var(--midnight-accent); }
body.theme-midnight .settings-eat-value { color: var(--midnight-accent); }
body.theme-midnight .settings-eat-slider { accent-color: var(--midnight-accent); }
body.theme-midnight .settings-tab { color: var(--muted); background: linear-gradient(180deg, #121630, #0a0e22); border: 1px solid rgba(0,0,0,0.4); }
body.theme-midnight .settings-tab:hover { color: var(--white); background: linear-gradient(180deg, #1a2048, #121630); }
body.theme-midnight .settings-tab.active { color: var(--midnight-accent); background: linear-gradient(180deg, #1e2458, #141838); border-color: rgba(140,180,232,0.3); }
body.theme-midnight .settings-vol-icon { filter: drop-shadow(0 1px 1px rgba(0,0,0,0.5)); }
body.theme-midnight .settings-range { accent-color: var(--midnight-accent); }

/* ── Global search extras ── */
body.theme-midnight .global-search-dropdown { background: var(--panel-bg) !important; background-image: none !important; border: 2px solid #000; }
body.theme-midnight .gs-result-row { color: var(--white); border-bottom: 1px solid rgba(140,180,232,0.05); }
body.theme-midnight .gs-result-row:hover { background: rgba(140,180,232,0.06); }
body.theme-midnight .gs-result-name { color: var(--white); }
body.theme-midnight .gs-result-detail { color: var(--muted); }
body.theme-midnight .gs-empty { color: var(--muted); }
body.theme-midnight .gs-chain-node.gs-chain-current { border-color: var(--midnight-accent); }

/* ── Disconnect ── */
body.theme-midnight .disconnect-notice { background: var(--panel-bg); border: 1px solid rgba(140,180,232,0.2); color: var(--white); }
body.theme-midnight .disconnect-spinner { border-color: rgba(140,180,232,0.2); border-top-color: var(--midnight-accent); }

/* ── Hiscores (entire section) ── */
body.theme-midnight .hiscores-panel { background: var(--panel-bg); }
body.theme-midnight .hiscores-table th { color: var(--muted); background: var(--cell-bg); border-bottom: 1px solid rgba(140,180,232,0.1); }
body.theme-midnight .hiscores-table td { color: var(--white); border-bottom: 1px solid rgba(0,0,0,0.15); }
body.theme-midnight .hiscores-table tr:hover td { background: rgba(140,180,232,0.04); }
body.theme-midnight .hiscores-rank { color: var(--midnight-accent); }
body.theme-midnight .hiscores-me .hiscores-name { color: var(--midnight-accent); }
body.theme-midnight .hiscores-name-link:hover { color: var(--midnight-accent); }
body.theme-midnight .hiscores-sticky-header { color: var(--midnight-accent); background: var(--cell-bg); }
body.theme-midnight .hiscores-filter-cb { accent-color: var(--midnight-accent); }
body.theme-midnight .hiscores-select:focus,
body.theme-midnight .hiscores-search:focus { outline: 1px solid var(--midnight-accent); }

/* ── Friends (entire section) ── */
body.theme-midnight .friends-tab { color: var(--muted); background: linear-gradient(180deg, #121630, #0a0e22); border: 1px solid rgba(0,0,0,0.4); }
body.theme-midnight .friends-tab:hover { color: var(--white); background: linear-gradient(180deg, #1a2048, #121630); }
body.theme-midnight .friends-tab.active { color: var(--midnight-accent); border-bottom-color: var(--midnight-accent); }
body.theme-midnight .friends-add-btn { border-color: var(--midnight-accent); color: var(--midnight-accent); }
body.theme-midnight .friends-add-btn:hover { border-color: rgba(140,180,232,0.6); }
body.theme-midnight .friends-panel-header { color: var(--midnight-accent); }
body.theme-midnight .friends-add-input:focus { outline: 1px solid var(--midnight-accent); }

/* ── Profile ── */
body.theme-midnight .profile-back-btn { color: var(--muted); }
body.theme-midnight .profile-back-btn:hover { color: var(--midnight-accent); }
body.theme-midnight .profile-player-name { color: var(--midnight-accent); }
body.theme-midnight .profile-rank { color: var(--midnight-accent); }

/* ── Quest panel (entire section) ── */
body.theme-midnight .quest-search-wrap { background: var(--darkest); }
body.theme-midnight .quest-search { color: var(--white); background: var(--darkest); border: 1px solid rgba(140,180,232,0.12); }
body.theme-midnight .quest-search::placeholder { color: rgba(140,180,232,0.3); }
body.theme-midnight .quest-back-btn { color: var(--muted); }
body.theme-midnight .quest-back-btn:hover { color: var(--midnight-accent); }
body.theme-midnight .quest-detail-title { color: var(--midnight-accent); }
body.theme-midnight .quest-detail-name { color: var(--white); }
body.theme-midnight .quest-detail-diff { color: var(--muted); }
body.theme-midnight .quest-detail-status { }
body.theme-midnight .quest-detail-section { background: rgba(0,0,0,0.2); border: 1px solid rgba(140,180,232,0.1); }
body.theme-midnight .quest-section-title { color: var(--midnight-accent); }
body.theme-midnight .quest-req { color: var(--white); }
body.theme-midnight .quest-reward { color: var(--white); }
body.theme-midnight .quest-complete-btn { color: #d0daf0; background: linear-gradient(180deg, #2a4080, #1a2860); border: 1px solid rgba(140,180,232,0.3); }
body.theme-midnight .quest-cancel-btn { color: var(--muted); background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .quest-lore-block { color: rgba(200,210,240,0.6); border-left: 2px solid rgba(140,180,232,0.3); }
body.theme-midnight .quest-lore-title { color: var(--midnight-accent); }
body.theme-midnight .quest-lore-text { color: rgba(200,210,240,0.6); }
body.theme-midnight .quest-lore-toggle { color: var(--muted); }
body.theme-midnight .quest-lore-toggle:hover { color: var(--midnight-accent); }
body.theme-midnight .quest-detail-timer { background: rgba(0,0,0,0.2); border: 1px solid rgba(140,180,232,0.1); }
body.theme-midnight .quest-timer-name { color: var(--white); }
body.theme-midnight .quest-timer-bar { background: var(--darkest); border: 1px solid rgba(0,0,0,0.4); }
body.theme-midnight .quest-timer-fill { background: linear-gradient(90deg, #5a7aaa, #8cb4e8); }
body.theme-midnight .quest-timer-time { color: var(--muted); }
body.theme-midnight .quest-timer-divider { background: linear-gradient(90deg, transparent, rgba(140,180,232,0.12), transparent); }

/* ── Marketplace extras ── */
body.theme-midnight .marketplace-actions { }
body.theme-midnight .marketplace-action-btn { color: var(--white); background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .marketplace-action-btn:hover { border-color: rgba(140,180,232,0.3); }
body.theme-midnight .marketplace-empty-state { }
body.theme-midnight .marketplace-offer-list { }
body.theme-midnight .marketplace-offer-type-badge { }
body.theme-midnight .marketplace-badge-buy { background: rgba(64,221,170,0.1); color: var(--midnight-aurora-1); border: 1px solid rgba(64,221,170,0.2); }
body.theme-midnight .marketplace-badge-sell { background: rgba(255,85,102,0.1); color: var(--red); border: 1px solid rgba(255,85,102,0.15); }
body.theme-midnight .marketplace-offer-progress-fill { background: linear-gradient(90deg, #5a7aaa, #8cb4e8); }
body.theme-midnight .marketplace-offer-actions { }
body.theme-midnight .marketplace-btn-collect { background: linear-gradient(180deg, #2a4080, #1a2860); color: #d0daf0; border: 1px solid rgba(140,180,232,0.3); }
body.theme-midnight .marketplace-btn-cancel { color: var(--muted); background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .marketplace-create-overlay { background: rgba(6,8,20,0.7); backdrop-filter: blur(3px); }
body.theme-midnight .marketplace-create-panel { background: #1a2048; border: 2px solid #000; }
body.theme-midnight .marketplace-create-panel-inner { background: var(--panel-bg); border: 1px solid rgba(140,180,232,0.1); }
body.theme-midnight .marketplace-create-title { color: var(--midnight-accent); }
body.theme-midnight .marketplace-create-close { color: var(--muted); }
body.theme-midnight .marketplace-create-close:hover { color: var(--white); }
body.theme-midnight .marketplace-search-input:focus { border-color: var(--midnight-accent); }
body.theme-midnight .marketplace-selected-name { color: var(--midnight-accent); }
body.theme-midnight .marketplace-btn-change { color: var(--muted); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .marketplace-btn-change:hover { color: var(--midnight-accent); border-color: var(--midnight-accent); }
body.theme-midnight .marketplace-price-guide-title { color: var(--midnight-accent); }
body.theme-midnight .marketplace-input:focus { border-color: var(--midnight-accent); }
body.theme-midnight .marketplace-qty-preset { color: var(--muted); }
body.theme-midnight .marketplace-qty-preset:hover { color: var(--midnight-accent); }
body.theme-midnight .marketplace-item-name-header { color: var(--midnight-accent); }

/* ── Prestige hub extras ── */
body.theme-midnight .ph-sw-ember { background: linear-gradient(135deg, #5a7aaa, #8cb4e8); }
body.theme-midnight .prestige-badge:hover { background: rgba(140,180,232,0.1); border-color: var(--midnight-accent); }
body.theme-midnight .prestige-btn,
body.theme-midnight .prestige-confirm { color: var(--white); }
body.theme-midnight .prestige-card { background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.12); }
body.theme-midnight .prestige-tier { color: var(--midnight-accent); }
body.theme-midnight .p-tier-node { background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.12); }
body.theme-midnight .p-tier-node.current { border-color: var(--midnight-accent); color: var(--midnight-accent); }
body.theme-midnight .p-tier-node.current .p-tier-num,
body.theme-midnight .p-tier-node.current .p-tier-label { color: var(--midnight-accent); }
body.theme-midnight .p-dash-pill.active { color: var(--midnight-accent); border-bottom-color: var(--midnight-accent); }
body.theme-midnight .p-bar-fill { background: linear-gradient(90deg, #5a7aaa, #8cb4e8); }
body.theme-midnight .p-monster-group-label { color: var(--midnight-accent); }
body.theme-midnight .p-boss-check { color: var(--midnight-accent); }
body.theme-midnight .p-prest-num { color: var(--midnight-accent); }
body.theme-midnight .p-prest-content { color: var(--white); }
body.theme-midnight .p-prest-section-title { color: var(--midnight-accent); }
body.theme-midnight .p-reroll-btn { color: var(--white); background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .p-reroll-btn:hover { border-color: var(--midnight-accent); }

/* ── Slayer hub extras ── */
body.theme-midnight .slayer-hub { background: var(--panel-bg); }
body.theme-midnight .slayer-hub-stats { color: var(--muted); }
body.theme-midnight .slayer-task-focus { color: var(--white); background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .slayer-task-focus:hover { border-color: var(--midnight-accent); }

/* ── Raid hub (entire section) ── */
body.theme-midnight .raid-hub { background: var(--panel-bg); }
body.theme-midnight .raid-hub-title { color: var(--midnight-accent); }
body.theme-midnight .raid-hub-label { color: var(--muted); }
body.theme-midnight .raid-hub-req { color: rgba(200,210,240,0.4); }
body.theme-midnight .raid-tab { background: linear-gradient(180deg, #121630, #0a0e22); border: 1px solid rgba(0,0,0,0.5); color: var(--muted); }
body.theme-midnight .raid-tab:hover { color: var(--white); border-color: rgba(140,180,232,0.2); }
body.theme-midnight .raid-tab.active { background: var(--cell-bg); border-color: var(--midnight-accent); color: var(--midnight-accent); }
body.theme-midnight .raid-weapon-style { color: var(--midnight-accent); }
body.theme-midnight .raid-weapon-slot { background: var(--darkest); border: 2px solid rgba(140,180,232,0.15); }
body.theme-midnight .raid-weapon-slot:hover { border-color: var(--midnight-accent); }
body.theme-midnight .raid-weapon-name { color: var(--muted); }
body.theme-midnight .raid-weapon-count { color: rgba(200,210,240,0.4); }
body.theme-midnight .raid-loadout-panel { background: var(--cell-bg); border: 1px solid var(--midnight-accent); }
body.theme-midnight .raid-eq-slot { background: var(--darkest); border: 2px solid rgba(140,180,232,0.15); }
body.theme-midnight .raid-eq-slot:hover { border-color: rgba(140,180,232,0.35); }
body.theme-midnight .raid-eq-slot.filled { border-color: rgba(140,180,232,0.25); background: var(--cell-bg); }
body.theme-midnight .raid-eq-slot.weapon-slot { border-color: var(--midnight-accent); box-shadow: 0 0 4px rgba(140,180,232,0.2); }
body.theme-midnight .raid-action-btn { color: var(--muted); background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .raid-action-btn:hover { border-color: var(--midnight-accent); color: var(--midnight-accent); }
body.theme-midnight .raid-action-clear { color: rgba(255,85,102,0.7); }
body.theme-midnight .raid-action-clear:hover { border-color: rgba(255,85,102,0.4); color: var(--red); }
body.theme-midnight .raid-enter-btn { background: linear-gradient(180deg, rgba(140,180,232,0.12), rgba(0,0,0,0.3)); border: 2px solid var(--midnight-accent); color: var(--midnight-accent); }
body.theme-midnight .raid-enter-btn:hover { background: linear-gradient(180deg, rgba(140,180,232,0.2), rgba(0,0,0,0.2)); }
body.theme-midnight .raid-auto-label { color: var(--midnight-accent); }
body.theme-midnight .raid-text { color: var(--white); }
body.theme-midnight .raid-lineup-icon { border-color: rgba(140,180,232,0.15); background: rgba(0,0,0,0.3); }
body.theme-midnight .raid-lineup-label { color: rgba(200,210,240,0.4); }
body.theme-midnight .raid-cancel-repeat { background: rgba(255,85,102,0.08); border: 1px solid rgba(255,85,102,0.2); color: var(--red); }
body.theme-midnight .raid-adv-lo-btn.active,
body.theme-midnight .raid-adv-style-btn.active { border-color: var(--midnight-accent); color: var(--midnight-accent); }
body.theme-midnight .raid-prayer-opt:hover { border-color: var(--midnight-accent); }
body.theme-midnight .raid-prayer-opt.active { border-color: var(--midnight-accent); color: var(--midnight-accent); }
body.theme-midnight .raid-weapon-option:hover,
body.theme-midnight .raid-weapon-option.selected { border-color: var(--midnight-accent); }
body.theme-midnight .raid-picker-section-head { color: var(--midnight-accent); }
body.theme-midnight .raid-ad.targeted { border-color: var(--midnight-accent); }

/* ── Events hub extras ── */
body.theme-midnight .events-header { color: var(--midnight-accent); }
body.theme-midnight .events-hub-grid { }
body.theme-midnight .events-hub-item-icon { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
body.theme-midnight .events-hub-item-name { color: var(--white); }
body.theme-midnight .events-hub-item-status { color: var(--muted); }
body.theme-midnight .events-hub-item-badge { }
body.theme-midnight .event-banner { border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .event-title { color: var(--midnight-accent); }
body.theme-midnight .event-subtitle { color: var(--muted); }
body.theme-midnight .event-progress-wrap { background: var(--darkest); border: 1px solid rgba(0,0,0,0.4); }
body.theme-midnight .event-progress-fill { background: linear-gradient(90deg, #5a7aaa, #8cb4e8); }
body.theme-midnight .event-progress-text { color: var(--white); }
body.theme-midnight .event-flavor { color: var(--muted); }
body.theme-midnight .event-egg-row { border-bottom: 1px solid rgba(140,180,232,0.06); }
body.theme-midnight .event-egg-name { color: var(--white); }
body.theme-midnight .event-egg-claimer { color: var(--midnight-accent); }
body.theme-midnight .event-egg-source { color: var(--muted); }
body.theme-midnight .event-egg-available { color: var(--midnight-aurora-1); }
body.theme-midnight .event-egg-icon-wrap { background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.12); }
body.theme-midnight .badge-active { background: rgba(140,180,232,0.1); border: 1px solid rgba(140,180,232,0.2); color: var(--midnight-accent); }
body.theme-midnight .badge-complete { background: rgba(64,221,170,0.08); border: 1px solid rgba(64,221,170,0.2); color: var(--midnight-aurora-1); }
body.theme-midnight .status-claimed { color: var(--muted); }
body.theme-midnight .status-available { color: var(--midnight-aurora-1); }

/* ── Context menu ── */
body.theme-midnight .ctx-menu { background: var(--panel-bg); border: 2px solid #000; }
body.theme-midnight .ctx-option { color: var(--white); }
body.theme-midnight .ctx-option:hover { background: rgba(140,180,232,0.08); color: var(--midnight-accent); }
body.theme-midnight .ctx-head { color: var(--midnight-accent); }

/* ── Shop ── */
body.theme-midnight .shop-item:hover { background: rgba(140,180,232,0.06); box-shadow: inset 0 0 0 1px rgba(140,180,232,0.15); }
body.theme-midnight .shop-item .bi-qty { color: var(--midnight-accent); }
body.theme-midnight .shop-hub-item { background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.12); }
body.theme-midnight .shop-hub-item:hover { border-color: rgba(140,180,232,0.3); background: var(--cell-hover); }
body.theme-midnight .shop-hub-item-name { color: var(--midnight-accent); }
body.theme-midnight .shop-hub-item-desc { color: var(--muted); }
body.theme-midnight .shop-hub-item-arrow { color: var(--muted); }
body.theme-midnight .shop-hub-section-label { color: var(--muted); }
body.theme-midnight .shop-hub-gold { color: var(--midnight-accent); }
body.theme-midnight .shop-section-header { color: var(--midnight-accent); }

/* ── POH ── */
body.theme-midnight .poh-title { color: var(--midnight-accent); }
body.theme-midnight .poh-grid { background: var(--darkest); }
body.theme-midnight .poh-room-card { background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.12); }
body.theme-midnight .poh-room-card:hover { border-color: rgba(140,180,232,0.3); }
body.theme-midnight .poh-room-card-name { color: var(--midnight-accent); }
body.theme-midnight .poh-room-card-desc { color: var(--muted); }
body.theme-midnight .poh-room-card-max { color: var(--muted); }
body.theme-midnight .poh-room-card-req { color: var(--red); }
body.theme-midnight .poh-tier-btn { color: var(--white); background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .poh-tier-btn:hover { border-color: var(--midnight-accent); }
body.theme-midnight .poh-room-header { background: var(--cell-bg); }
body.theme-midnight .poh-room-header-name { color: var(--midnight-accent); }
body.theme-midnight .poh-room-header-tier { color: var(--muted); }
body.theme-midnight .poh-room-header-base { color: var(--muted); }
body.theme-midnight .poh-cell { background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.1); }
body.theme-midnight .poh-cell:hover { border-color: var(--midnight-accent); }
body.theme-midnight .poh-cell-name { color: var(--midnight-accent); }
body.theme-midnight .poh-back { color: var(--muted); }
body.theme-midnight .poh-back:hover { color: var(--midnight-accent); }
body.theme-midnight .poh-section-title { color: var(--midnight-accent); }
body.theme-midnight .poh-module-slot { background: var(--darkest); border: 1px solid rgba(140,180,232,0.1); }
body.theme-midnight .poh-module-slot:hover { border-color: var(--midnight-accent); }
body.theme-midnight .poh-module-name { color: var(--midnight-accent); }
body.theme-midnight .poh-module-pick-name { color: var(--midnight-accent); }

/* ── Bell warden ── */
body.theme-midnight .bell-warden-title { color: var(--midnight-accent); }
body.theme-midnight .bell-warden-bells { }
body.theme-midnight .resonant-bell-icon { filter: drop-shadow(0 0 4px rgba(140,180,232,0.3)); }
body.theme-midnight .spec-debuff-warn { color: var(--red); }

/* ── Season / reward track ── */
body.theme-midnight .reward-track-title { color: var(--midnight-accent); }
body.theme-midnight .ep-wrap { background: var(--panel-bg); }
body.theme-midnight .ep-hero-title { color: var(--midnight-accent); }
body.theme-midnight .ep-hero-sub { color: var(--muted); }
body.theme-midnight .ep-hero-days { color: var(--muted); }
body.theme-midnight .ep-hero-rule { background: linear-gradient(90deg, transparent, rgba(140,180,232,0.2), transparent); }
body.theme-midnight .ep-hero-pre { color: var(--muted); }
body.theme-midnight .ep-hero-bar { background: var(--darkest); border: 1px solid rgba(0,0,0,0.4); }
body.theme-midnight .ep-hero-xp { color: var(--muted); }
body.theme-midnight .ep-x { color: var(--muted); }
body.theme-midnight .ep-x:hover { color: var(--white); }
body.theme-midnight .ep-track-wrap { background: var(--darkest); border: 1px solid rgba(140,180,232,0.1); }
body.theme-midnight .ep-ch-label { color: var(--muted); }
body.theme-midnight .ep-node { background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.12); }
body.theme-midnight .ep-node:hover { border-color: rgba(140,180,232,0.3); }
body.theme-midnight .ep-node-day { color: var(--muted); }
body.theme-midnight .ep-node.claimed .ep-node-ico { border-color: var(--midnight-accent); }
body.theme-midnight .ep-conn { background: rgba(140,180,232,0.15); }
body.theme-midnight .ep-claim-zone { background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.3); }
body.theme-midnight .ep-cz-day { color: var(--muted); }
body.theme-midnight .ep-notif-dot { background: var(--midnight-accent); box-shadow: 0 0 6px rgba(140,180,232,0.5); }
body.theme-midnight .ep-cz-loot-item[role="button"]:focus-visible { border-color: var(--midnight-accent); }
body.theme-midnight .ep-cz-loot-item--selected { border-color: var(--midnight-accent); }
body.theme-midnight .ep-bg-pos-save { background: linear-gradient(180deg, #8cb4e8, #5a7aaa); }
body.theme-midnight .ep-det-type { color: var(--midnight-accent); }
body.theme-midnight .ep-det-stat-val { color: var(--midnight-accent); }

/* ── Lamp overlay ── */
body.theme-midnight #lamp-overlay .rc-modal-body { background: var(--panel-bg); }

/* ── Sidebar bottom bar ── */
body.theme-midnight .sidebar-bottom-bar { background: var(--darkest); border-top: 1px solid rgba(0,0,0,0.5); }

/* ── Superior / burst toggle ── */
body.theme-midnight .superior-toggle,
body.theme-midnight .burst-toggle-wrap { color: var(--muted); }

/* ── OSRS checkbox ── */
body.theme-midnight .osrs-checkbox { background: var(--darkest); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .osrs-checkbox.checked,
body.theme-midnight .osrs-checkbox .checkmark { color: var(--midnight-accent); }

/* ── Awakened toggle ── */
body.theme-midnight .awakened-toggle.active { background: rgba(140,180,232,0.12); box-shadow: 0 0 4px rgba(140,180,232,0.15); }
body.theme-midnight .awakened-count { color: var(--muted); }
body.theme-midnight .awakened-toggle.active .awakened-count { color: var(--midnight-accent); }

/* ── PM badge ── */
body.theme-midnight .pm-badge { background: var(--red); color: #fff; }

/* ── Forge bar ── */
body.theme-midnight .forge-bar-track { background: var(--darkest); border: 1px solid rgba(0,0,0,0.4); }

/* ── Loot tracker ── */
body.theme-midnight .rl-loot-boss-row { color: var(--white); border-bottom: 1px solid rgba(140,180,232,0.06); }
body.theme-midnight .rl-loot-boss-row:hover { background: rgba(140,180,232,0.04); }

/* ── Collection log ── */
body.theme-midnight .clog-item { background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.08); }
body.theme-midnight .clog-item:hover { border-color: rgba(140,180,232,0.25); background: var(--cell-hover); }
body.theme-midnight .clog-item.obtained { border-color: rgba(64,221,170,0.2); }
body.theme-midnight .clog-source-partial .clog-source-name { color: var(--midnight-accent); }

/* ── XP bar / XP tracker (entire section) ── */
body.theme-midnight #xp-bar-float { background: var(--panel-bg); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .xp-bar-wrap { background: var(--darkest); border: 1px solid rgba(0,0,0,0.4); }
body.theme-midnight .xp-bar-fill { background: linear-gradient(90deg, #5a7aaa, #8cb4e8); }
body.theme-midnight .xp-bar-label { color: var(--white); }
body.theme-midnight .xpb-icon { filter: drop-shadow(0 1px 1px rgba(0,0,0,0.5)); }
body.theme-midnight .xpb-info { }
body.theme-midnight .xpb-labels { color: var(--muted); }
body.theme-midnight .xpb-track { background: var(--darkest); border: 1px solid rgba(0,0,0,0.4); }
body.theme-midnight .xpb-fill { background: linear-gradient(90deg, #5a7aaa, #8cb4e8); }
body.theme-midnight .xpt-wrap { background: var(--panel-bg); }
body.theme-midnight .xpt-head { color: var(--midnight-accent); }
body.theme-midnight .xpt-btn-label { color: var(--muted); }
body.theme-midnight .xpt-empty { color: var(--muted); }
body.theme-midnight .xpt-list { background: var(--darkest); }
body.theme-midnight .xpt-row { border-bottom: 1px solid rgba(140,180,232,0.06); }
body.theme-midnight .xpt-row:hover { background: rgba(140,180,232,0.04); }
body.theme-midnight .xpt-name { color: var(--white); }
body.theme-midnight .xpt-skill-name { color: var(--midnight-accent); }
body.theme-midnight .xpt-detail { color: var(--muted); }
body.theme-midnight .xpt-rate { color: var(--midnight-aurora-1); }
body.theme-midnight .xpt-remaining { color: var(--muted); }
body.theme-midnight .xpt-ttl { color: var(--muted); }
body.theme-midnight .xpt-canvas-label { color: var(--muted); }
body.theme-midnight .xpt-reset,
body.theme-midnight .xpt-reset-all { color: var(--muted); }
body.theme-midnight .xpt-reset:hover,
body.theme-midnight .xpt-reset-all:hover { color: var(--white); }
body.theme-midnight .xpt-click-row { color: var(--muted); }

/* ── Chat / custom tab / player ctx ── */
body.theme-midnight .custom-tab-config-title { color: var(--midnight-accent); }
body.theme-midnight .custom-tab-config-row input[type="checkbox"] { accent-color: var(--midnight-accent); }
body.theme-midnight .player-ctx-title { color: var(--midnight-accent); }

/* ── Bank tooltip ── */
body.theme-midnight .bt-name { color: var(--midnight-accent); }
body.theme-midnight .claimer-name { color: var(--midnight-accent); }

/* ── Background picker ── */
body.theme-midnight .bg-picker-btn,
body.theme-midnight .bg-browser-btn { color: var(--white); background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .bg-picker-btn:hover,
body.theme-midnight .bg-browser-btn:hover { border-color: rgba(140,180,232,0.3); }
body.theme-midnight .bg-picker-btn.active,
body.theme-midnight .bg-browser-btn.active { border-color: var(--midnight-accent); color: var(--midnight-accent); }

/* ── Boss phase / MI phase ── */
body.theme-midnight .boss-phase-check.active { border-color: var(--midnight-accent); color: var(--midnight-accent); }
body.theme-midnight .mi-phase-tab.active { border-color: var(--midnight-accent); color: var(--midnight-accent); }

/* ── Progress fills ── */
body.theme-midnight .hub-patch-fill { background: linear-gradient(90deg, #5a7aaa, #8cb4e8); }
body.theme-midnight .sto-fill { background: linear-gradient(90deg, #5a7aaa, #8cb4e8); }
body.theme-midnight .session-fill { background: linear-gradient(90deg, #5a7aaa, #8cb4e8); }

/* ── Focus states ── */
body.theme-midnight .sell-junk-input:focus { border-color: var(--midnight-accent); }

/* ── Global form elements ── */
body.theme-midnight input[type="checkbox"] { accent-color: var(--midnight-accent); }
body.theme-midnight input[type="range"] { accent-color: var(--midnight-accent); }
body.theme-midnight select { color: var(--white); background: var(--darkest); border: 1px solid rgba(140,180,232,0.12); }
body.theme-midnight select:focus { border-color: var(--midnight-accent); outline: none; }

/* ── RL shared components ── */
body.theme-midnight .rl-row { color: var(--white); border-bottom: 1px solid rgba(140,180,232,0.06); }
body.theme-midnight .rl-row:hover { background: rgba(140,180,232,0.04); }
body.theme-midnight .rl-tab { color: var(--muted); background: linear-gradient(180deg, #121630, #0a0e22); border: 1px solid rgba(0,0,0,0.4); }
body.theme-midnight .rl-tab:hover { color: var(--white); background: linear-gradient(180deg, #1a2048, #121630); }
body.theme-midnight .rl-tab.active { color: var(--midnight-accent); background: linear-gradient(180deg, #1e2458, #141838); border-color: rgba(140,180,232,0.3); }
body.theme-midnight .rl-tabs--raised .rl-tab { color: var(--midnight-accent); background: linear-gradient(180deg, #121630, #0a0e22); }
body.theme-midnight .rl-tabs--raised .rl-tab:hover { background: linear-gradient(180deg, #1a2048, #121630); }
body.theme-midnight .rl-tabs--raised .rl-tab.active { background: linear-gradient(180deg, #1e2458, #141838); border-color: rgba(140,180,232,0.3); }
body.theme-midnight .rl-btn { color: var(--white); background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .rl-btn:hover { border-color: rgba(140,180,232,0.3); }
body.theme-midnight .rl-pill { color: var(--muted); background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.12); }
body.theme-midnight .rl-pill.active { color: var(--midnight-accent); border-color: var(--midnight-accent); background: rgba(140,180,232,0.08); }
body.theme-midnight .rl-head { color: var(--midnight-accent); }
body.theme-midnight .rl-progress { background: var(--darkest); border: 1px solid rgba(0,0,0,0.4); }
body.theme-midnight .rl-controls { background: var(--darkest); border-top: 1px solid rgba(0,0,0,0.4); }
body.theme-midnight .rl-search { color: var(--white); background: var(--darkest); border: 1px solid rgba(140,180,232,0.12); }
body.theme-midnight .rl-search::placeholder { color: rgba(140,180,232,0.3); }
body.theme-midnight .rl-search:focus { border-color: var(--midnight-accent); }
body.theme-midnight .rl-shop-header { color: var(--midnight-accent); }
body.theme-midnight .rl-xpt-name { color: var(--midnight-accent); }

/* ── Data tooltips ── */
body.theme-midnight .sidebar-top-tab::after,
body.theme-midnight .sidebar-tab::after,
body.theme-midnight .rl-bar-btn::after { color: var(--midnight-accent) !important; background: var(--panel-bg) !important; border: 1px solid rgba(140,180,232,0.2) !important; }

/* ── Autocast / spellbook extras ── */
body.theme-midnight .autocast-picker-title { color: var(--midnight-accent); }
body.theme-midnight .autocast-spell-btn.active { border-color: var(--midnight-accent); }
body.theme-midnight .weapon-picker-btn { background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.12); }
body.theme-midnight .weapon-picker-btn:hover { border-color: var(--midnight-accent); }
body.theme-midnight .weapon-picker-name { color: var(--midnight-accent); }
body.theme-midnight .spellbook-section-label { color: var(--midnight-accent); }
body.theme-midnight .spell-tooltip { background: var(--panel-bg); border: 1px solid rgba(140,180,232,0.2); color: var(--white); }
body.theme-midnight .spell-tooltip .st-name { color: var(--midnight-accent); }
body.theme-midnight .combat-tab-btn.autocast-btn.active { border-color: var(--midnight-accent); }
body.theme-midnight .ac-multi { background: var(--midnight-accent); }

/* ── Ironman ── */
body.theme-midnight .ironman-toggle { }
body.theme-midnight .ironman-banner-icon { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }

/* ── Idle compound ── */
body.theme-midnight .viewport .action-status { opacity: 0.7; }

/* ── Ember level-up (corrected prefix) ── */
body.theme-midnight .ember-levelup { }
body.theme-midnight .ember-lu-backdrop { background: radial-gradient(ellipse at center, rgba(140,180,232,0.1), transparent 50%), rgba(6,8,20,0.8); }
body.theme-midnight .ember-lu-ring { border-color: rgba(140,180,232,0.3); box-shadow: 0 0 30px rgba(140,180,232,0.15); }
body.theme-midnight .ember-lu-shockwave { border-color: rgba(140,180,232,0.3); }
body.theme-midnight .ember-lu-icon { filter: drop-shadow(0 0 12px rgba(140,180,232,0.4)); }
body.theme-midnight .ember-lu-title { color: var(--midnight-accent); }
body.theme-midnight .ember-lu-mastery { color: var(--midnight-accent); }
body.theme-midnight .ember-lu-skill { color: var(--midnight-accent); }
body.theme-midnight .ember-lu-flavor { color: var(--muted); }

/* ── Timer hub ── */
body.theme-midnight .timer-hub { background: var(--darkest); }
body.theme-midnight .timer-hub-header { color: var(--muted); }

/* ── Skilling chest / skill hub extras ── */
body.theme-midnight .skilling-chest-header { color: var(--midnight-accent); }
body.theme-midnight .skill-hub { background: var(--panel-bg); }
body.theme-midnight .skill-hub::before { background: linear-gradient(90deg, transparent, var(--midnight-accent), transparent); }
body.theme-midnight .hub-skill-name { color: var(--midnight-accent); }
body.theme-midnight .tier-node { background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.12); }
body.theme-midnight .tier-node.active { border-color: var(--midnight-accent); }
body.theme-midnight .tier-node.active .tier-name { color: var(--midnight-accent); }
body.theme-midnight .supply-output-name { color: var(--midnight-accent); }
body.theme-midnight .forge-item-name { color: var(--midnight-accent); }
body.theme-midnight .forge-output-chip { color: var(--midnight-accent); }
body.theme-midnight .mc-play { color: var(--midnight-accent); border: 1px solid rgba(140,180,232,0.15); }
body.theme-midnight .mc-play:hover { border-color: var(--midnight-accent); }
body.theme-midnight .method-card.active { border-color: var(--midnight-accent); }
body.theme-midnight .hub-mini-indicator:hover { border-color: var(--midnight-accent); }

/* ── Mobile drawer ── */
body.theme-midnight .rc-drawer { background: var(--panel-bg); }
body.theme-midnight .rc-drawer-title { color: var(--midnight-accent); }
body.theme-midnight .rc-drawer-section { color: var(--muted); }
body.theme-midnight .rc-drawer-tile { background: var(--cell-bg); border: 1px solid rgba(140,180,232,0.1); }
body.theme-midnight .rc-drawer-tile:hover { border-color: rgba(140,180,232,0.3); }
body.theme-midnight .rc-drawer-tile-label { color: var(--muted); }
body.theme-midnight .rc-drawer-scrim { background: rgba(6,8,20,0.6); }
body.theme-midnight .rc-drawer-close { color: var(--muted); }
body.theme-midnight .rc-drawer-close:hover { color: var(--white); }
body.theme-midnight .mts-btn { color: var(--muted); }
body.theme-midnight .mts-label { }


/* ============ LOOTING BAG ============ */
body.theme-midnight .looting-bag-overlay {
    background: linear-gradient(145deg, #1a1a30 0%, #10102a 50%, #0a0a1e 100%);
    border-color: #2a2a50;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.9), 0 3px 10px rgba(0,0,0,0.7), inset 0 1px 0 rgba(100,120,200,0.08);
}
body.theme-midnight .looting-bag-overlay:hover {
    border-color: #404070;
}
body.theme-midnight .looting-bag-overlay.has-unique {
    border-color: #7070cc;
    animation: lbag-breathe-mid 1.6s ease-in-out infinite;
}
body.theme-midnight .looting-bag-overlay.has-unique::before {
    background: radial-gradient(circle, rgba(110,120,220,0.35) 0%, rgba(110,120,220,0) 70%);
    animation: lbag-aura-mid 1.6s ease-in-out infinite;
}
@keyframes lbag-breathe-mid {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 1px rgba(0,0,0,0.9), 0 0 8px rgba(110,120,220,0.4), 0 0 20px rgba(110,120,220,0.15), inset 0 1px 0 rgba(130,140,255,0.1);
        border-color: #6060b0;
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 0 0 1px rgba(0,0,0,0.9), 0 0 16px rgba(110,120,220,0.7), 0 0 32px rgba(110,120,220,0.3), 0 0 48px rgba(140,130,255,0.1), inset 0 1px 0 rgba(130,140,255,0.18);
        border-color: #8080dd;
    }
}
@keyframes lbag-aura-mid {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.15); }
}
body.theme-midnight .lbag-item {
    background: rgba(16,16,36,0.6);
    border-color: #222240;
}
body.theme-midnight .lbag-item-unique {
    border-color: #5858a0;
    box-shadow: 0 0 6px rgba(110,120,220,0.3), inset 0 0 6px rgba(110,120,220,0.06);
}

@media (prefers-reduced-motion: reduce) {
    body.theme-midnight,
    body.theme-midnight *,
    body.theme-midnight *::before,
    body.theme-midnight *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
