:root {
    --bg: #0a0a0f;
    --panel: #12121a;
    --accent: #00d9ff;
    --accent-glow: rgba(0, 217, 255, 0.3);
    --error: #ff3366;
    --success: #00ff88;
    --text: #e8e8f0;
    --text-dim: #7a7a8e;
    --border: #2a2a3e;
    --card-bg: #1a1a28;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
    color: var(--text);
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    display: flex;
    height: 100vh;
    width: 100vw;
    margin: 0;
    overflow: hidden;
    user-select: none;
    position: relative;
    transition: background 0.5s ease;
    cursor: url('../ui/cursor.png') 0 0, auto
}

button, .btn-round, .shop-card, .slot-card, .char-card, .diff-card,
.slider-track-container, input, .theme-card, input[type=range]:hover, input[type=range]:hover::-webkit-slider-thumb, #db-brand-select, #boot-splash, .glitch-card {
    cursor: url('../ui/cursor-hover.png') 0 0, pointer !important;
}

select {
    appearance: base-select;
    anchor-name: --select-anchor;
}

select::picker(select) {
    position-anchor: --select-anchor;
    position-area: bottom;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 100%);
    z-index: 1;
    pointer-events: none;
    opacity: 0.85;
    transition: background 0.5s ease;
}

body::before {
    content: '';
    position: fixed;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 217, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes gridMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(50px); }
}

body.boss-mode::after {
    background: linear-gradient(135deg, #1a0505 0%, #2a0a0a 100%);
}

body.boss-mode::before {
    background-image: 
        linear-gradient(rgba(255, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 0, 0.05) 1px, transparent 1px);
}

body.shop-mode::after {
    background: linear-gradient(135deg, #051a05 0%, #0a2e0a 100%);
}

body.shop-mode::before {
    background-image: linear-gradient(rgba(0, 255, 0, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 255, 0, 0.05) 1px, transparent 1px);
}

#audio-visualizer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.15; 
    mix-blend-mode: lighten;
}

#main-container {
    display: flex; 
    flex: 1;
    height: 100%;
    width: 100%; 
    position: relative;
    z-index: 10;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 calc(20px * var(--audio-pulse, 1)) var(--accent-glow);
    transition: box-shadow 0.1s;
}

#game-area {
    flex: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px;
    border: 2px solid var(--accent);
    border-radius: 12px;
    box-shadow: 0 0 20px var(--accent-glow), inset 0 0 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    height: 100%;
    transition: box-shadow 0.1s, background-color 1.0s ease; 
}

#game-area::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 2px;
    background: linear-gradient(to bottom, 
        transparent, 
        var(--accent) 50%, 
        transparent);
    animation: scanline 3s ease-in-out infinite;
}

@keyframes scanline {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

#sidebar {
    flex: 1;
    background: var(--panel);
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 
        inset 5px 0 20px rgba(0, 0, 0, 0.5),
        -5px 0 30px rgba(0, 217, 255, 0.1);
    border-left: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    z-index: 1;
    opacity: 0.7;
}

#sidebar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 217, 255, 0.05) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.6; }
}

#timer {
    position: relative;
    width: 300px;
    margin: 0 auto 15px auto;
    padding: 10px 0;
    
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    color: #fff;
    letter-spacing: 2px;
    z-index: 10;
    
    background: rgba(10, 10, 15, 0.6);
    border: 2px solid var(--accent);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    
    overflow: visible !important; 
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}

#timer-mult {
    position: absolute;
    top: 6px;
    right: -45px;

    width: 52px;
    height: 52px;
    border-radius: 50%;
    
    display: flex;
    justify-content: center;
    align-items: center;

    background: #000;
    border: 2px solid #444;
    z-index: 20;

    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -1px;
    
    transition: color 0.1s, border-color 0.1s, box-shadow 0.1s, transform 0.05s;
}

.mult-fast {
    color: #ff0055 !important;
    border-color: #ff0055 !important;
    background: radial-gradient(circle, rgba(255,0,85,0.2) 0%, #000 70%);
    text-shadow: 0 0 5px #fff, 0 0 10px #ff0055;
    box-shadow: 
        0 0 15px rgba(255, 0, 85, 0.6), 
        inset 0 0 10px rgba(255, 0, 85, 0.3) !important;
}
.mult-fast::before { background: #ff0055; }

.mult-slow {
    color: #00d9ff !important;
    border-color: #00d9ff !important;
    background: radial-gradient(circle, rgba(0,217,255,0.2) 0%, #000 70%);
    text-shadow: 0 0 5px #fff, 0 0 10px #00d9ff;
    box-shadow: 
        0 0 15px rgba(0, 217, 255, 0.6), 
        inset 0 0 10px rgba(0, 217, 255, 0.3) !important;
}
.mult-slow::before { background: #00d9ff; }

.mult-normal {
    color: #666 !important;
    border-color: #333 !important;
    background: #0a0a0f;
    box-shadow: none !important;
}
.mult-normal::before { background: #333; }

#timer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--timer-width, 100%);
    background: var(--accent);
    opacity: 0.3;
    z-index: -1;
    transition: background-color 0.2s; 
}

#timer::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 10px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: bold;
    letter-spacing: 1px;
}

#timer.timer-safe {
    --accent: #00d9ff;
    text-shadow: 0 0 15px #00d9ff;
}

#timer.timer-warn {
    --accent: #ffd700;
    color: #ffd700;
    text-shadow: 0 0 15px #ffd700;
    border-color: #ffd700;
}

#timer.timer-critical {
    --accent: #ff0040;
    color: #ff0040;
    text-shadow: 0 0 20px #ff0000;
    border-color: #ff0000;
    animation: panicPulse 0.5s infinite alternate;
}

@keyframes panicPulse {
    0% { box-shadow: 0 0 10px #ff0000; transform: scale(1); }
    100% { box-shadow: 0 0 30px #ff0000; transform: scale(1.02); }
}

#word-display {
    font-size: 3rem;
    letter-spacing: 4px;
    margin: 10px 0 20px;
    font-weight: 900;
    color: #fff;
    min-height: 60px;
    text-align: center;
    text-shadow: 
        0 0 30px var(--accent-glow),
        0 0 60px var(--accent-glow),
        0 5px 15px rgba(0, 0, 0, 0.7);
    position: relative;
    animation: wordGlow 2s ease-in-out infinite;
    transform: scale(var(--audio-pulse, 1));
    transition: transform 0.1s, color 1.0s ease, text-shadow 1.0s ease; 
}

@keyframes wordGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

#word-display::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--accent), 
        transparent);
    box-shadow: 0 0 10px var(--accent);
}

body.boot-state #input-box{
    width: 400px !important;
}

#input-box {
    width: 100%;
    max-width: 800px;
    padding: 15px 20px;
    margin-top: 20px;
    
    /* Typography */
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 4px;
    text-align: center;
    color: var(--accent);
    text-transform: uppercase;
    
    /* Visuals - Glassmorphism + Neon */
    background: rgba(10, 10, 15, 0.85);
    border: 2px solid var(--border);
    border-radius: 4px;
    outline: none;
    
    /* Effects */
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.8), /* Deep shadow */
        inset 0 0 20px rgba(0, 0, 0, 0.8), /* Inner depth */
        0 0 0 1px rgba(255, 255, 255, 0.05); /* Subtle rim */
        
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#input-box:focus {
    border-color: var(--accent);
    color: #fff;
    
    /* Neon Glow */
    box-shadow: 
        0 0 20px var(--accent-glow),
        inset 0 0 15px var(--accent-glow),
        0 10px 40px rgba(0, 0, 0, 0.8);
        
    transform: scale(1.02); /* Slight pop */
}

#input-box.error-shake {
    border-color: var(--error);
    color: var(--error);
    box-shadow: 0 0 30px rgba(255, 51, 102, 0.4), inset 0 0 20px rgba(255, 51, 102, 0.2);
    animation: shake 0.15s ease-in-out;
}

/* Placeholder Styling */
#input-box::placeholder {
    color: rgba(0, 217, 255, 0.3);
    font-style: normal;
    letter-spacing: 6px;
    text-shadow: none;
    transition: color 0.3s ease;
}

#input-box:focus::placeholder {
    color: rgba(0, 217, 255, 0.1);
    letter-spacing: 10px;
}

/* Sidebar Styling */
.side-title {
    color: var(--accent);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 12px;
    font-weight: 900;
    position: relative;
    text-shadow: 0 0 10px var(--accent-glow);
    z-index: 1;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    color: var(--text-dim);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    border-left: 3px solid var(--border);
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.stat-row:hover {
    background: rgba(0, 217, 255, 0.05);
    border-left-color: var(--accent);
    transform: translateX(5px);
}

.stat-val { 
    color: #fff; 
    font-weight: 900;
    font-size: 1.2rem;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.bonus-tag {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(0, 255, 136, 0.05) 100%);
    color: var(--success);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 900;
    border: 1px solid rgba(0, 255, 136, 0.3);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

/* ========================================= */
/* SHOP OVERLAY SYSTEM - FIXED FOR VISUALIZER */
/* ========================================= */
#shop-screen {
    justify-content: center;
    border: 2px solid var(--accent);
    border-radius: 16px;
    height: 100%;
}

#shop-left {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    align-items: center;
}

#shop-right {
    flex: 0 0 auto;
    width: 100%;
    max-width: 800px;
    background: linear-gradient(135deg, rgba(10, 10, 15, 0.75) 0%, rgba(26, 26, 40, 0.75) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px solid var(--border);
    border-radius: 12px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    overflow: hidden;
}

#shop-items-list {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 1000px;
    margin: 30px 0px;
}

.shop-card {
    position: relative;
    width: 200px;
    height: 250px;
    margin: 0;
    cursor: pointer;
    overflow: visible;
    z-index: 10;
}

.card-bg {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    
    background-image: 
        linear-gradient(180deg, rgba(26, 26, 40, 0.95) 0%, rgba(26, 26, 40, 0.60) 100%), 
        var(--bg-img);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden; /* Clips the shine effect inside */
    transition: all 0.3s ease, background-image 0.3s ease;
}

/* Shine Effect (Applied to Inner) */
.card-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0, 217, 255, 0.1), 
        transparent);
    transition: left 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.shop-card:hover .card-bg::before {
    left: 100%;
}

.shop-card:hover .card-bg {
    background-image: 
        linear-gradient(180deg, rgba(26, 26, 40, 0.85) 0%, rgba(26, 26, 40, 0.20) 100%), 
        var(--bg-img);
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.15);
}

.shop-card.rarity-common,
.unlock-card.rarity-common,
.unlock-card.standard {
    border-color: #444;
}

.unlock-card.unlocked .unlock-name { 
    color: var(--accent); 
    text-shadow: 0 0 15px rgba(0, 217, 255, 0.6);
}

/* RARE (Blue) */
.shop-card.rarity-rare .card-title-container,
.unlock-card.rarity-rare .unlock-name {
    color: #00d9ff;
    text-shadow: 0 0 5px rgba(0, 217, 255, 0.5);
}

.shop-card.rarity-rare .card-title-container,
.unlock-card.rarity-rare .unlock-name {
    color: #00d9ff;
    text-shadow: 0 0 5px rgba(0, 217, 255, 0.5);
}

/* EPIC (Purple) */
.shop-card.rarity-epic,
.unlock-card.rarity-epic {
    border-color: #bd00ff;
    box-shadow: 0 0 15px rgba(189, 0, 255, 0.2);
}
.shop-card.rarity-epic .card-title-container,
.unlock-card.rarity-epic .unlock-name {
    color: #bd00ff;
    text-shadow: 0 0 8px rgba(189, 0, 255, 0.6);
}

/* LEGENDARY (Gold) */
.shop-card.rarity-legendary,
.unlock-card.rarity-legendary {
    border-color: #ffd700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}
.shop-card.rarity-legendary .card-title-container,
.unlock-card.rarity-legendary .unlock-name {
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.shop-badge {
    position: absolute;
    /* Adjusted top value, might need slight tweaks based on font rendering */
    top: 15px; 
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 4px;
    letter-spacing: 1px;
    z-index: 5;
    
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
}

.badge-rank {
    left: 15px; /* Adjusted left */
    color: #888;
    border-left: 2px solid var(--accent);
}

.badge-price {
    right: 15px; /* Adjusted right */
    border-right: 2px solid var(--success);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.4);
}


.card-title-container {
    flex-grow: 1; 
    display: flex;
    align-items: center; 
    justify-content: center;
    width: 100%;
    z-index: 2;
    padding-top: 0;
    font-weight: 900;
    font-size: 1.4rem;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 1);
    line-height: 1.1;
    text-align: center;
}

.buy-button {
    width: 100%;
    margin-top: 15px; 
    padding: 10px 0;
    
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
    
    font-family: 'Rajdhani', sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 5;
}

.buy-button:hover:not(.disabled) {
    background: var(--success);
    color: #000;
    box-shadow: 0 0 20px var(--success);
    transform: translateY(-2px);
}

.buy-button.disabled {
    background: rgba(50, 50, 50, 0.5);
    border-color: #555;
    color: #777;
    cursor: not-allowed;
    box-shadow: none;
}

.buy-button:active {
    transform: translateY(0);
}

.no-money {
    color: var(--error) !important;
    animation: flash-red 0.5s ease;
}

@keyframes flash-red {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); color: #ff3366; text-shadow: 0 0 20px #ff3366; }
}

.btn-round {
    margin-top: 0;
    width: 100%;
    min-width: 170px;
    max-width: 500px; 
    white-space: nowrap; 
    padding: 20px;
    background: linear-gradient(135deg, var(--accent) 0%, #00b8d4 100%);
    color: #000;
    border: none;
    font-weight: 900;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    box-shadow: 
        0 10px 40px rgba(0, 217, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-round::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-round:hover::before {
    width: 300px;
    height: 300px;
}

.btn-round:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 50px rgba(0, 217, 255, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-round:active {
    transform: translateY(-1px);
}

#shop-detail-content {
    background: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
    width: 100%;
    text-align: center;
}

#shop-detail-content h2 {
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.6);
    font-size: 2rem;
    margin-top: 0;
}

#shop-detail-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Animations */
.error-shake {
    border-color: var(--error) !important;
    background: linear-gradient(135deg, #2b1111 0%, #1f0808 100%) !important;
    animation: shake 0.15s ease-in-out, errorGlow 0.5s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-15px); }
    75% { transform: translateX(15px); }
}

@keyframes errorGlow {
    0% { box-shadow: 0 0 0 0 rgba(255, 51, 102, 0.7); }
    100% { box-shadow: 0 0 0 20px rgba(255, 51, 102, 0); }
}

/* Volume Slider */
input[type=range] { 
    width: 100%; 
    height: 6px;
    background: linear-gradient(to right, var(--border) 0%, var(--accent) 100%);
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-glow);
    transition: all 0.2s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    box-shadow: 0 0 20px var(--accent-glow);
}

input[type=range]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--accent);
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 10px var(--accent-glow);
    transition: all 0.2s ease;
}

input[type=range]::-moz-range-thumb:hover {
    transform: scale(1.3);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* Options Button */
#options-btn {
    position: relative;
    z-index: 100;
    pointer-events: auto;
}

#options-btn:hover {
    background: #252540 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.3);
}

#close-options-btn, #close-achievements-btn, #close-unlocks-btn,
#close-themes-btn,
#close-challenges-btn,
#close-stats-btn,
#close-slot-selection-btn, #close-jukebox-btn, #close-bios-btn, #close-manual-btn, #close-bios-summary-btn, #close-sounds-btn, #close-leaderboard-btn
 {
transition: all 0.3s ease
}

#close-options-btn:hover, #close-achievements-btn:hover, #close-unlocks-btn:hover,
#close-themes-btn:hover,
#close-challenges-btn:hover,
#close-stats-btn:hover,
#close-slot-selection-btn:hover,
#close-jukebox-btn:hover, #close-bios-btn:hover, #close-manual-btn:hover, #close-bios-summary-btn:hover, #close-sounds-btn:hover
 {
    background: rgba(0, 217, 255, 0.3) !important;
    transform: rotate(90deg);
}

/* Confirmation Dialog */
#confirmation-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

#confirmation-content {
    background: linear-gradient(135deg, #1a1a28 0%, #0f0f18 100%);
    padding: 30px; /* Adjusted padding */
    border-radius: 12px;
    border: 2px solid var(--error);
    box-shadow: 0 0 50px rgba(255, 51, 102, 0.4);
    max-width: 450px;
    width: 90%;
    text-align: center;
    animation: dropIn 0.3s ease-out;
}

#confirmation-content h3 {
    color: var(--error);
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 15px;
    text-shadow: 0 0 15px rgba(255, 51, 102, 0.6);
}

#confirmation-content p {
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.4;
}

.confirm-btn {
    padding: 12px 25px;
    margin: 0 8px; /* Spacing between buttons */
    font-family: 'Courier New', monospace;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    text-transform: uppercase;
    transition: all 0.2s ease;
    display: inline-block;
    min-width: 120px;
}

.confirm-btn.yes {
    background: var(--error);
    color: #fff;
    border: 1px solid var(--error);
}

.confirm-btn.yes:hover {
    background: #ff0033;
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.6);
    transform: translateY(-2px);
}

.confirm-btn.no {
    background: transparent;
    color: var(--text);
    border: 1px solid #555;
}

.confirm-btn.no:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-2px);
}

/* ========================================= */
/* ACHIEVEMENTS SYSTEM                       */
/* ========================================= */
#achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); 
    gap: 12px;
    width: 100%;
    overflow-y: auto;
    padding: 10px;
    margin-top: 10px;
}

.ach-block {
    min-height: 140px; 
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; 
    padding: 12px 8px;
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden; 
}

.ach-block.locked {
    opacity: 0.4;
    filter: grayscale(1);
}

.ach-block.locked .ach-block-icon {
    font-size: 3rem;
    opacity: 0.2;
}

.ach-block.unlocked {
    border-color: var(--success);
    background: linear-gradient(135deg, #16213e 0%, #1a2a3a 100%);
    box-shadow: 
        0 2px 10px rgba(0, 0, 0, 0.3),
        inset 0 0 10px rgba(0, 255, 136, 0.05);
}

.ach-block.unlocked:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 255, 136, 0.15);
    z-index: 10;
}

.ach-block-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ach-block-title {
    font-weight: 800;
    font-size: 0.75rem; 
    margin-bottom: 4px;
    color: #fff;
    line-height: 1.2;
    min-height: auto; 
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word; 
    hyphens: auto;
    width: 100%;
}

.ach-block-desc {
    font-size: 0.6rem;
    color: #888;
    line-height: 1.3;
    word-break: break-word;
    width: 100%;
}

.achievement-popup {
    position: fixed;
    bottom: 30px;
    right: -350px;
    width: 300px;
    background: rgba(16, 20, 25, 0.95);
    border-left: 4px solid var(--success);
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 5000;
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    transition: right 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.achievement-popup.show {
    right: 30px;
}

.achievement-popup .ach-icon {
    width: 60px;
    height: 60px;
}

.achievement-popup .ach-title {
    color: var(--success);
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.achievement-popup .ach-name {
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
}

/* --- CURSE SYSTEM STYLES --- */
#curse-warning {
    display: none;
    background: rgba(40, 10, 10, 0.9);
    border: 1px solid #ff3366;
    border-left: 5px solid #ff3366;
    color: #ff3366;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.5);
    width: 100%;
    max-width: 700px;
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.1);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; text-shadow: 0 0 10px rgba(255,51,102,0.8); }
    50% { opacity: 0.7; text-shadow: 0 0 20px rgba(255,51,102,1); }
}

.curse-fade {
    animation: curseFadeLoop 11s infinite ease-in-out !important;
}

@keyframes curseFadeLoop {
    0% { opacity: 1; filter: blur(0px); }
    15% { opacity: 1; filter: blur(0px); }
    40% { opacity: 0; filter: blur(15px); }
    70% { opacity: 0; filter: blur(15px); }
    85% { opacity: 1; filter: blur(0px); } 
    100% { opacity: 1; filter: blur(0px); } 
}

#word-display.curse-glitch {
    animation: glitchSkew 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite !important;
    position: relative;
    color: inherit;
}

@keyframes glitchSkew {
    0% {
        transform: translate(0) skew(0deg);
        text-shadow: -2px 0 #ff00c1, 2px 0 #00fff9;
        opacity: 1;
    }
    10% {
        transform: translate(-4px, -2px) skew(-20deg);
        text-shadow: -4px 0 #ff00c1, 4px 0 #00fff9;
        opacity: 1;
    }
    20% {
        transform: translate(4px, 2px) skew(20deg);
        text-shadow: 4px -2px #ff00c1, -4px 2px #00fff9;
        opacity: 0.7; 
    }
    30% {
        transform: translate(-6px, 0) skew(-10deg);
        text-shadow: -8px 0 #ff00c1, 8px 0 #00fff9;
        opacity: 0.2; 
    }
    40% {
        transform: translate(0, 8px) skew(5deg);
        text-shadow: 0 0 transparent;
        opacity: 1;
    }
    50% {
        transform: translate(5px, -5px) skew(-40deg);
        text-shadow: 10px 0 #ff00c1, -10px 0 #00fff9;
        opacity: 0.1;
    }
    60% {
        transform: translate(-2px, 2px) skew(10deg);
        text-shadow: -2px 0 #ff00c1, 2px 0 #00fff9;
        opacity: 1;
    }
    70% {
        transform: translate(0, -10px) skew(-5deg);
        text-shadow: -5px 0 #ff00c1, 5px 0 #00fff9;
        opacity: 0.8;
    }
    80% {
        transform: translate(15px, 0) skew(15deg);
        text-shadow: 3px 3px #ff00c1, -3px -3px #00fff9;
        opacity: 1;
    }
    90% {
        transform: translate(-5px, 5px) skew(-10deg);
        text-shadow: 0 0 transparent;
        opacity: 0.4;
    }
    100% {
        transform: translate(0) skew(0deg);
        text-shadow: -2px 0 #ff00c1, 2px 0 #00fff9;
        opacity: 1;
    }
}

.curse-invert {
    transform: rotate(180deg) !important;
    transition: transform 0.5s ease !important;
}

.curse-gravity-char {
    display: inline-block !important;
    animation: gravityDrop 2s infinite linear;
    transform-origin: center !important;
}
@keyframes gravityDrop {
    0% { transform: translateY(-50px) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(150px) rotate(45deg); opacity: 0; }
}

.curse-snake-char {
    display: inline-block !important;
    animation: snakeWave 1.5s infinite ease-in-out;
}
@keyframes snakeWave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.curse-shuffle-char { display: inline-block; transition: all 0.1s; }
.curse-shuffle-first { color: #00ff00 !important; text-shadow: 0 0 10px #00ff00; font-weight: bold; }
.curse-shuffle-last { color: #ff0000 !important; text-shadow: 0 0 10px #ff0000; font-weight: bold; }
.curse-shuffle-mid { color: #888; }

.curse-hydra-active {
    position: relative; 
    transition: top 0.1s, left 0.1s;
}

/* BOSS UI */
#boss-container {
    width: 100%;
    max-width: 700px;
    margin-bottom: 10px;
    text-align: center;
    animation: dropIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#boss-name {
    /* Layout & Font */
    margin: 0 0 8px 0;
    font-family: 'Orbitron', monospace; /* Tech/Sci-fi Font */
    font-size: 2.2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em; /* Wide spacing looks more cinematic */
    line-height: 1;
    position: relative;
    z-index: 5;
    
    /* Fallback Color */
    color: #ff3333; 
    
    /* Metallic Gradient Fill */
    background: linear-gradient(
        180deg, 
        #ffffff 0%, 
        #ff3333 30%, 
        #b30000 60%, 
        #440000 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    
    /* Neon Glow Filters */
    filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.8))
            drop-shadow(0 0 15px rgba(255, 0, 0, 0.4));
            
    /* Breathing Animation */
    animation: bossNameBreath 3s ease-in-out infinite;
}

@keyframes bossNameBreath {
    0%, 100% { 
        filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.8));
        transform: scale(1);
    }
    50% { 
        filter: drop-shadow(0 0 15px rgba(255, 0, 0, 1)) drop-shadow(0 0 25px rgba(255, 0, 0, 0.5));
        transform: scale(1.02);
    }
}

.boss-bar-bg {
    width: 100%;
    height: 15px; 
    background: #1a0000;
    border: 1px solid #ff3333;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.2);
}

#boss-hp-bar {
    width: 100%;
    height: 100%;
    /* More vibrant HP bar gradient */
    background: linear-gradient(90deg, #ff0000, #ff5555, #ff0000);
    background-size: 200% 100%;
    animation: hpBarFlow 2s linear infinite; /* Subtle movement */
    transition: width 0.2s ease-out;
}

@keyframes hpBarFlow {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

#boss-hp-text {
    color: #ffcccc;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    margin-top: 4px;
    font-size: 0.9rem;
    text-shadow: 0 0 5px #ff0000;
    letter-spacing: 1px;
}

body.boss-mode {
    background: linear-gradient(135deg, #1a0505 0%, #2a0a0a 100%);
}

body.boss-mode #timer {
    color: #ff3333;
    text-shadow: 0 0 20px #ff0000;
}

@keyframes dropIn {
    0% { transform: translateY(-100px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

#main-container, 
#shop-screen, 
#achievements-screen {
    position: relative;
    z-index: 10;
    transition: opacity 0.5s ease-in-out;
}

.word-clone {
    position: absolute; /* Will be positioned via JS */
    color: #fff;
    font-size: 6rem;
    font-weight: 900;
    letter-spacing: 16px;
    pointer-events: none;
    z-index: 1000;
    text-shadow: 0 0 30px rgba(0, 217, 255, 0.5);
    white-space: nowrap;
}

.fly-off-left {
    animation: flyLeft 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.fly-off-right {
    animation: flyRight 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes flyLeft {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0.8; }
    100% { transform: translate(-300px, -50px) rotate(-25deg); opacity: 0; }
}

@keyframes flyRight {
    0% { transform: translate(0, 0) rotate(0deg); opacity: 0.8; }
    100% { transform: translate(300px, -50px) rotate(25deg); opacity: 0; }
}

/* Floating Timer Popups */
.floating-feedback {
    position: fixed;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 1.5rem; 
    pointer-events: none;
    z-index: 10000;
    
    background: rgba(0, 0, 0, 0.9); 
    padding: 8px 16px;
    border-radius: 4px;
    border: 1px solid currentColor; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);

    white-space: nowrap;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);

    opacity: 0;
    will-change: transform, opacity;
    animation: floatUpFade 2.5s ease-out forwards;
}

@keyframes floatUpFade {
    0% { 
        transform: translateY(0) scale(0.9); 
        opacity: 0; 
    }
    10% {
        transform: translateY(-5px) scale(1); 
        opacity: 1;
    }
    80% {
        transform: translateY(-40px) scale(1); 
        opacity: 1;
    }
    100% { 
        transform: translateY(-60px) scale(1); 
        opacity: 0;
    }
}

.unlock-card {
    width: 185px;
    height: 230px;
    background: #12121a;
    border: 1px solid #333;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; 
    padding: 20px 15px; 
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.unlock-card.standard .unlock-name { color: #eee; }
.unlock-status.standard { background: #333; color: #aaa; border: 1px solid #555; }

.unlock-card.locked {
    background: repeating-linear-gradient(
        45deg, #08080c, #08080c 10px, #0f0f14 10px, #0f0f14 20px
    );
    border-color: #331111;
    justify-content: center; 
}
.unlock-status.locked { background: #500; color: #fff; border: 1px solid #f00; box-shadow: 0 0 10px rgba(255,0,0,0.2); }
.lock-icon { font-size: 3rem; margin: 10px 0; opacity: 0.5; text-shadow: 0 0 20px rgba(255,0,0,0.5); }

.unlock-card.unlocked {
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
}
.unlock-card.unlocked:hover {
    transform: translateY(-5px);
    border-color: #fff;
}
.unlock-status.unlocked { 
    background: rgba(0, 217, 255, 0.1); 
    color: var(--accent); 
    border: 1px solid var(--accent);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.2);
}

.unlock-card.unlocked.rarity-rare {
    box-shadow: inset 0 0 50px rgba(0, 217, 255, 0.05);
}
.unlock-card.unlocked.rarity-epic {
    box-shadow: inset 0 0 50px rgba(189, 0, 255, 0.05);
}
.unlock-card.unlocked.rarity-legendary {
    box-shadow: inset 0 0 50px rgba(255, 215, 0, 0.05);
}

/* SHARED ELEMENTS */
.unlock-status {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.5rem;
    padding: 4px 8px;
    font-weight: 900;
    border-radius: 4px;
    letter-spacing: 1px;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.unlock-name {
    font-weight: 900;
    font-size: 1.2rem;
    margin-top: 25px;
    margin-bottom: 5px;
    text-transform: uppercase;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,1), 0 0 20px rgba(0,0,0,0.8); 
    line-height: 1.1;
}

.unlock-desc {
    font-size: 0.85rem;
    color: #ccc;
    line-height: 1.4;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,1); 
    margin-bottom: auto;
    padding: 0 5px;
}

.unlock-req {
    font-size: 0.7rem;
    margin-top: 15px;
    padding-top: 10px;
    font-weight: bold;
    position: relative;
    z-index: 2;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 5px;
    border-radius: 0 0 8px 8px;
    text-shadow: 0 1px 2px black;
}

/* ========================================= */
/* CYBERPUNK SCROLLBARS                      */
/* ========================================= */

#achievements-grid::-webkit-scrollbar,
#theme-grid::-webkit-scrollbar,
#unlocks-grid::-webkit-scrollbar,
#unlock-scroller::-webkit-scrollbar,
#visualizer-list::-webkit-scrollbar,
#bios-grid::-webkit-scrollbar,
#jukebox-list::-webkit-scrollbar {
    width: 16px;
    background: #000;
}

#achievements-grid::-webkit-scrollbar-track,
#unlocks-grid::-webkit-scrollbar-track,
#theme-grid::-webkit-scrollbar-track,
#unlock-scroller::-webkit-scrollbar-track,
#visualizer-list::-webkit-scrollbar-track,
#bios-grid::-webkit-scrollbar-track,
#jukebox-list::-webkit-scrollbar-track {
    background-color: #031003; 
    border: 1px solid var(--success); 
    
    background-image: 
        linear-gradient(90deg, 
            transparent 50%, 
            rgba(0, 255, 136, 0.1) 50%
        ),
        linear-gradient(0deg, 
            transparent 50%, 
            rgba(0, 255, 136, 0.1) 50%
        );
    background-size: 4px 4px;
    box-shadow: inset 0 0 10px rgba(0, 255, 136, 0.1);
}

#achievements-grid::-webkit-scrollbar-thumb,
#unlocks-grid::-webkit-scrollbar-thumb,
#theme-grid::-webkit-scrollbar-thumb,
#unlock-scroller::-webkit-scrollbar-thumb,
#visualizer-list::-webkit-scrollbar-thumb,
#bios-grid::-webkit-scrollbar-thumb,
#jukebox-list::-webkit-scrollbar-thumb {
    background-color: #051a05; 
    border: 2px solid var(--success);
    
    box-shadow: 
        inset 0 0 10px rgba(0, 255, 136, 0.5), 
        0 0 10px rgba(0, 255, 136, 0.3);
    
    background-image: repeating-linear-gradient(
        180deg,
        transparent,
        transparent 3px,
        rgba(0, 255, 136, 0.4) 3px,
        rgba(0, 255, 136, 0.4) 5px
    );
}

#difficulty-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(10, 15, 20, 0.95) 0%, #000 100%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    animation: screenFadeIn 0.3s ease-out;
}

#difficulty-screen h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 6px;
    margin-bottom: 40px;
    text-shadow: 0 0 20px var(--accent);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
}

#difficulty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
    max-width: 1100px;
    width: 90%;
    padding: 10px;
}

/* --- THE CARD --- */
.diff-card {
    background: linear-gradient(180deg, rgba(20, 25, 35, 0.95) 0%, rgba(5, 5, 10, 0.98) 100%);
    border: 1px solid #333;
    /* Default top border (will be overridden by inline styles in JS for color) */
    border-top: 4px solid #444; 
    border-radius: 4px;
    padding: 25px 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 260px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Hover Effect: Lift and Glow */
.diff-card:not(.locked):hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.8),
        inset 0 0 30px rgba(255, 255, 255, 0.05);
    z-index: 10;
}

/* LOCKED STATE */
.diff-card.locked {
    opacity: 0.6;
    filter: grayscale(100%);
    background: repeating-linear-gradient(
        45deg,
        #080808,
        #080808 10px,
        #111 10px,
        #111 20px
    );
    border-color: #333 !important;
    cursor: not-allowed;
}

.diff-card.locked::after {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    opacity: 0.2;
}

/* --- TYPOGRAPHY & STATS --- */

.diff-title {
    font-family: 'Courier New', monospace;
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px currentColor; 
}

/* Stats Styling - Data Terminal Look */
.diff-rounds, .diff-time, .diff-penalty {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 8px;
    display: block;
    text-align: left;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.4);
    border-left: 2px solid #333;
    letter-spacing: 0.5px;
}

/* Individual Stat Colors (Pop) */
.diff-rounds {
    color: #ccc;
    border-left-color: #aaa;
}

.diff-time {
    color: var(--success);
    border-left-color: var(--success);
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.3);
}

.diff-penalty {
    color: var(--error);
    border-left-color: var(--error);
    text-shadow: 0 0 5px rgba(255, 51, 102, 0.3);
}

.diff-desc {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    color: #889;
    font-style: italic;
    line-height: 1.4;
}

/* BACK BUTTON - Match Main Menu Style */
#diff-back-btn {
    height: 70px;
    background: transparent;
    border: 2px solid #555;
    color: #888;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 3px;
    padding: 12px 40px;
    border-radius: 4px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

#diff-back-btn:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* VICTORY SCREEN */
#victory-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 10, 15, 0.95); 
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: victoryFadeIn 0.5s ease-out;
}

/* Simplified background grid */
#victory-screen::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
}

@keyframes victoryFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes victoryGridPulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.02); }
}

/* Main content wrapper */
#victory-screen > * {
    position: relative;
    z-index: 10;
}

/* SYSTEM COMPROMISED title */
.victory-title {
    font-size: 4.5rem; 
    color: var(--success);
    text-shadow: 0 0 20px var(--success);
    margin: 0 0 20px 0;
    font-weight: 900;
    letter-spacing: 8px;
    text-transform: uppercase;
    text-align: center;
    animation: victoryTitlePulse 3s ease-in-out infinite;
}

@keyframes victoryTitlePulse {
    0%, 100% { transform: scale(1); text-shadow: 0 0 20px var(--success); }
    50% { transform: scale(1.02); text-shadow: 0 0 30px var(--success); }
}

.victory-desc {
    font-size: 1.5rem;
    letter-spacing: 8px;
    margin-bottom: 50px;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
}

#victory-rewards {
    background: rgba(0, 255, 136, 0.05);
    border: 2px solid var(--success);
    border-radius: 12px;
    padding: 30px 50px;
    margin-bottom: 40px;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
    text-align: center;
    min-width: 400px;
}

/* Unlock message */
#unlock-msg {
    color: var(--success);
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.6);
    position: relative;
    z-index: 1;
    animation: unlockBlink 1.5s ease-in-out infinite;
}

@keyframes unlockBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

#victory-stats {
    color: #ccc;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
}

/* Return button enhanced */
#victory-continue-btn {
    animation: victoryButtonFloat 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

#victory-continue-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

#victory-continue-btn:hover::after {
    width: 400px;
    height: 400px;
}

@keyframes victoryButtonFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.diff-time {
    color: var(--accent);
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
    text-shadow: 0 0 5px rgba(0, 217, 255, 0.3);
}

.diff-rounds {
    margin-bottom: 2px; 
}

.diff-penalty {
    color: var(--error);
    font-weight: bold;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-shadow: 0 0 5px rgba(255, 51, 102, 0.4);
}

/* THE WATCHER ABILITY */
body.paranoia-mode #game-area {
    background: #000;
}
body.paranoia-mode #word-display {
    color: #000;
    text-shadow: none;
    transition: filter 0.2s;
}
body.paranoia-mode #word-display.visible {
    text-shadow: 0 0 20px #ff0000;
}

/* PRECOGNITION ITEM UI */
#next-word-preview {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #444;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 5px;
    pointer-events: none;
    text-transform: uppercase;
}

.shop-card.maxed {
    border-color: #444 !important;
    opacity: 0.8;
    cursor: not-allowed;
}

.side-separator {
    height: 1px;
    background: var(--border);
    margin: 10px 0 10px 0;
    box-shadow: 0 1px 0 rgba(0,0,0,0.5);
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    padding-right: 5px;
}

.stats-list::-webkit-scrollbar { width: 4px; }
.stats-list::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

.stat-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    border-left: 2px solid transparent;
}

.stat-entry .stat-label {
    color: #aaa;
    font-weight: 600;
    text-transform: uppercase;
}

.stat-entry .stat-val {
    font-weight: 900;
    font-family: 'Courier New', monospace;
}

.stat-entry .val-good { color: var(--success); text-shadow: 0 0 8px rgba(0, 255, 136, 0.3); }
.stat-entry .val-bad { color: var(--error); text-shadow: 0 0 8px rgba(255, 51, 102, 0.3); }
.stat-entry .val-neutral { color: var(--accent); }

.stat-entry:hover {
    background: rgba(255, 255, 255, 0.07);
}

/* --- NEW SIDEBAR ELEMENTS --- */

.side-title-small {
    color: #888;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-transform: uppercase;
    border-left: 2px solid var(--border);
    padding-left: 8px;
}

.hardware-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 5px;
    overflow-y: auto;
}

.hardware-list::-webkit-scrollbar { width: 4px; }
.hardware-list::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }

/* ========================================= */
/* IMPROVED BAN CONFIRMATION DIALOG          */
/* ========================================= */

#ban-confirm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 4000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

/* Make the box sharper and cleaner */
.confirm-content {
    background: #0a0a0f; /* Very dark background */
    border: 1px solid #ff3366; /* Thin, sharp red border */
    padding: 40px;
    border-radius: 4px; /* Slight radius, not too round */
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 
        0 0 30px rgba(255, 51, 102, 0.15),
        inset 0 0 20px rgba(255, 51, 102, 0.05);
    animation: popIn 0.2s ease-out;
}

/* Typography Improvements */
.confirm-content h3 {
    font-family: 'Orbitron', monospace; /* Tech font */
    color: #ff3366;
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(255, 51, 102, 0.6);
}

.confirm-content p {
    color: #e8e8f0;
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 10px;
}

/* Specific styling for the item name to make it pop */
#ban-item-name {
    color: #fff;
    font-weight: 900;
    font-family: 'Courier New', monospace;
    border-bottom: 1px solid #555;
    padding-bottom: 2px;
}

/* --- BUTTONS FIX --- */
/* We reset the button styles specifically for this modal to avoid the "blob" look */

.confirm-content button {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 12px 30px;
    margin: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    min-width: 140px;
    
    /* Fixes clipping issues from the screenshot */
    height: auto; 
    line-height: normal;
    background-image: none; 
}

/* Confirm Button: Ghost style (Outline) -> Solid on Hover */
#btn-confirm-ban {
    background: transparent;
    border: 1px solid #ff3366;
    color: #ff3366;
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.1);
}

#btn-confirm-ban:hover {
    background: #ff3366;
    color: #000; /* Black text on red bg is high contrast */
    box-shadow: 0 0 25px rgba(255, 51, 102, 0.6);
    transform: translateY(-2px);
}

/* Cancel Button: Muted Gray */
#btn-cancel-ban {
    background: transparent;
    border: 1px solid #444;
    color: #888;
}

#btn-cancel-ban:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

/* Animation */
@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.ban-button {
    position: absolute;
    top: -17px;
    left: 50%;
    transform: translateX(-50%);
    
    width: 32px;
    height: 32px;
    
    background: rgba(20, 10, 10, 0.9);
    border: 2px solid #ff3366;
    color: #ff3366;
    
    border-radius: 50%;
    cursor: pointer;
    font-family: sans-serif;
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 1;
    
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.lock-button {
    position: absolute;
    top: -17px;
    right: 50%;
    transform: translateX(180%); /* Places it to the right of the Ban button */
    
    width: 32px;
    height: 32px;
    
    background: rgba(10, 10, 20, 0.9);
    border: 2px solid #00d9ff;
    color: #00d9ff;
    
    border-radius: 50%;
    cursor: pointer;
    
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    padding: 0;
}

.lock-button:hover {
    background: #00d9ff;
    color: #000;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.6);
    transform: translateX(180%) scale(1.15);
}

.lock-button.active {
    border-color: #ffd700;
    color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.lock-icon-svg {
    width: 16px;
    height: 16px;
    display: block;
}
.ban-button:hover {
    background: #ff3366;
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.6);
    transform: translateX(-50%) scale(1.15) rotate(90deg); /* Spin effect on hover */
}

/* Optional: Make it pulse slightly to draw attention */
.ban-button {
    animation: banPulse 3s infinite;
}

@keyframes banPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 51, 102, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(255, 51, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 51, 102, 0); }
}

#options-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease-out;
}

/* The Main Panel Box */
#options-panel {
    background: #0f0f16;
    border: 2px solid var(--accent);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    width: 100%;
    height: 100%;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    border-radius: 12px;
}

/* Header Area */
.opt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 5px;
}

.opt-header h2 {
    color: var(--accent);
    font-size: 1.4rem;
    margin: 0;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

/* Section Labels */
.opt-label-group {
    font-size: 0.7rem;
    color: #555;
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.slider-grid {
    display: grid;
    grid-template-columns: minmax(100px, auto) 1fr 45px; 
    gap: 10px 15px;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #222;
}

.slider-label {
    color: #aaa;
    font-size: 0.85rem;
    font-weight: bold;
    text-align: right;
}

.slider-value {
    color: var(--accent);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: right;
}

/* --- MENU BUTTONS ROW --- */
.menu-btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.opt-menu-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    color: #ccc;
    padding: 12px 5px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: bold;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 4px;
    min-height: 48px;
    word-break: break-word;
    text-align: center;
}

.opt-menu-btn span { margin-bottom: 2px; }

.opt-menu-btn:hover { background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }

/* specific border colors */
.success-border:hover { border-color: var(--success); color: var(--success); box-shadow: 0 0 10px rgba(0, 255, 136, 0.1); }
.accent-border:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 10px rgba(0, 217, 255, 0.1); }
.warn-border:hover { border-color: #ffaa00; color: #ffaa00; box-shadow: 0 0 10px rgba(255, 170, 0, 0.1); }

/* --- FOOTER / SYSTEM --- */
.opt-footer {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid #222;
}

.opt-sys-btn {
    flex: 1;
    padding: 12px 5px;
    background: transparent;
    border: 1px solid #444;
    color: #888;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.opt-sys-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 217, 255, 0.05);
}

.opt-sys-btn.danger {
    border-color: #522;
    color: #a44;
}

.opt-sys-btn.danger:hover {
    background: #311;
    border-color: #f36;
    color: #f36;
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

.language-selector {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 8px;
}

.lang-btn, .dict-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 4px !important;
    min-height: 40px !important;
    font-size: 0.9rem !important;
    background: rgba(255, 255, 255, 0.02) !important;
}

.flag-icon {
    width: 24px;
    height: 16px;
    display: inline-block;
    background-size: cover;
    background-position: center;
    border-radius: 2px;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
    filter: grayscale(0.8);
    transition: all 0.2s ease;
}

/* Base64 SVGs for Flags - Works offline and on Windows */
.flag-en {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2MCAzMCI+PHBhdGggZmlsbD0iIzAxMjE2OSIgZD0iTTAgMGg2MHYzMEgwXSIvPjxwYXRoIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSI2IiBkPSJNMCAwbDYwIDMwTTAgMzBsNjAtMzAiLz48cGF0aCBzdHJva2U9IiNjODEwMmUiIHN0cm9rZS13aWR0aD0iNCIgZD0iTTAgMzBsNjAtMzBNMCAwbDYwIDMwIi8+PHBhdGggc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjEwIiBkPSJNMzAgMHYzME0wIDE1aDYwIi8+PHBhdGggc3Ryb2tlPSIjYzgxMDJlIiBzdHJva2Utd2lkdGg9IjYiIGQ9Ik0zMCAwdjMwTTAgMTVoNjAiLz48L3N2Zz4=');
}

.flag-es {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA3NTAgNTAwIj48cGF0aCBmaWxsPSIjYzYwYjFlIiBkPSJNMCAwaDc1MHY1MDBIMHoiLz48cGF0aCBmaWxsPSIjZmZjNDAwIiBkPSJNMCAxMjVoNzUwdjI1MEgwXSIvPjwvc3ZnPg==');
}

.flag-fr {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNjAwIj48cGF0aCBmaWxsPSIjRUQyOTM5IiBkPSJNNjAwIDBoMzAwdjYwMEg2MDB6Ii8+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTMwMCAwaDMwMHY2MDBIMzAweiIvPjxwYXRoIGZpbGw9IiMwMDIzOTUiIGQ9Ik0wIDBoMzAwdjYwMEgwXSIvPjwvc3ZnPg==');
}

.flag-de {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1IDMiPjxwYXRoIGQ9Ik0wIDBoNXYzSDB6Ii8+PHBhdGggZmlsbD0iI2QwMCIgZD0iTTAgMWg1djJIMHoiLz48cGF0aCBmaWxsPSIjZmZjZTAwIiBkPSJNMCAyaDV2MUgwXSIvPjwvc3ZnPg==');
}

.flag-zh {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNjAwIj48cGF0aCBmaWxsPSIjZGUyOTEwIiBkPSJNMCAwaDkwMHY2MDBIMHoiLz48cGF0aCBmaWxsPSIjZmZkZTAwIiBkPSJNMTE4LjcgMTY5LjRMMzUgMTk3bDYzLjYtNDYuMy0yNC4zLTc0LjggMjQuMyA3NC44TDYzLjYgMTA1IDEzOS43IDEzMi42IDYxIDE1OC4yem01Ni40IDJsLTIuNiA4LjItNy44LTQuNCA1LjQgNy4xLTUuNCA3LjEgNy44LTQuNCAyLjYgOC4yIDIuNi04LjIgNy44IDQuNC01LjQtNy4xIDUuNC03LjEtNy44IDQuNHptMjkuMyA1Ny4zbC0yLjYgOC4yLTcuOC00LjQgNS40IDcuMS01LjQgNy4xIDcuOC00LjQgMi42IDguMiAyLjYtOC4yIDcuOCA0LjQtNS40LTcuMSA1LjQtNy4xLTcuOCA0LjR6bS0xMS43IDY5LjVsLTIuNiA4LjItNy44LTQuNCA1LjQgNy4xLTUuNCA3LjEgNy44LTQuNCAyLjYgOC4yIDIuNi04LjIgNy44IDQuNC01LjQtNy4xIDUuNC03LjEtNy44IDQuNHptLTU4LjYgMjZsLTIuNiA4LjItNy44LTQuNCA1LjQgNy4xLTUuNCA3LjEgNy44LTQuNCAyLjYgOC4yIDIuNi04LjIgNy44IDQuNC01LjQtNy4xIDUuNC03LjEtNy44IDQuNHoiLz48L3N2Zz4=');
}

/* Japan */
.flag-ja {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNjAwIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDkwMHY2MDBIMHoiLz48Y2lyY2xlIGZpbGw9IiNiYzAwMmQiIGN4PSI0NTAiIGN5PSIzMDAiIHI9IjE4MCIvPjwvc3ZnPg==');
}

/* Turkey */
.flag-tr {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjAwIDgwMCI+CjxyZWN0IHdpZHRoPSIxMjAwIiBoZWlnaHQ9IjgwMCIgZmlsbD0iI0UzMEExNyIvPgo8Y2lyY2xlIGN4PSI0MDAiIGN5PSI0MDAiIHI9IjIwMCIgZmlsbD0iI2ZmZiIvPgo8Y2lyY2xlIGN4PSI0NTAiIGN5PSI0MDAiIHI9IjE2MCIgZmlsbD0iI0UzMEExNyIvPgo8cG9seWdvbiBwb2ludHM9IjgxNi42NjcsNDAwIDYzNS43NjYsNDU4Ljc3OSA3NDcuNTY1LDMwNC44OTQgNzQ3LjU2NSw0OTUuMTA2IDYzNS43NjYsMzQxLjIyMSIgZmlsbD0iI2ZmZiIvPgo8L3N2Zz4=');
}

/* Russia */
.flag-ru {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5MDAgNjAwIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDkwMHYyMDBIMHoiLz48cGF0aCBmaWxsPSIjMDAzOWE2IiBkPSJNMCAyMDBoOTAwdjIwMEgwXSIvPjxwYXRoIGZpbGw9IiNkNTJiMWUiIGQ9Ik0wIDQwMGg5MDB2MjAwSDB6Ii8+PC9zdmc+');
}

.flag-br {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDAwIDcwMCI+PHBhdGggZmlsbD0iIzAwOTcyMyIgZD0iTTAgMGgxMDAwdjcwMEgwXSIvPjxwYXRoIGZpbGw9IiNmZWQxMDUiIGQ9Ik01MDAgNjUzTDUzIDM1MCA1MDAgNDdsNDQ3IDMwM3oiLz48Y2lyY2xlIGZpbGw9IiMwMDcyYmMiIGN4PSI1MDAiIGN5PSIzNTAiIHI9IjE3NSIvPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik01MDAgMzM1bDQ5IC0xOSAzNCAzMCAzNiAtNyAtOTAgNDJ6IiBvcGFjaXR5PSIwIi8+PHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjZmZmIiBzdHJva2Utd2lkdGg9IjE0IiBkPSJNMzMxIDM0N2MzMi0zMCAxNjAtNTggMzQ0IDE1Ii8+PC9zdmc+');
}

/* South Korea (ko) */
.flag-ko {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5MDAiIGhlaWdodD0iNjAwIiB2aWV3Qm94PSItNDUwIC0zMDAgOTAwIDYwMCI+PHJlY3QgZmlsbD0iI2ZmZiIgeD0iLTQ1MCIgeT0iLTMwMCIgd2lkdGg9IjkwMCIgaGVpZ2h0PSI2MDAiLz48ZyB0cmFuc2Zvcm09InJvdGF0ZSgtMzMuNjkpIj48Y2lyY2xlIHI9IjE1MCIgZmlsbD0iIzAwNDdhMCIvPjxwYXRoIGZpbGw9IiNjZDJlM2EiIGQ9Ik0tMTUwLDAgQTE1MCwxNTAgMCAwLDEgMTUwLDAgQTc1LDc1IDAgMCwxIDAsMCBBNzUsNzUgMCAwLDAgLTE1MCwwIFoiLz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjg4LCAtNzUpIj48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMjUiIGhlaWdodD0iMTUwIiBmaWxsPSIjMDAwIi8+PHJlY3QgeD0iMzcuNSIgeT0iMCIgd2lkdGg9IjI1IiBoZWlnaHQ9IjE1MCIgZmlsbD0iIzAwMCIvPjxyZWN0IHg9Ijc1IiB5PSIwIiB3aWR0aD0iMjUiIGhlaWdodD0iMTUwIiBmaWxsPSIjMDAwIi8+PC9nPjxnIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE4OCwgLTc1KSI+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjI1IiBoZWlnaHQ9IjY5IiBmaWxsPSIjMDAwIi8+PHJlY3QgeD0iMCIgeT0iODEiIHdpZHRoPSIyNSIgaGVpZ2h0PSI2OSIgZmlsbD0iIzAwMCIvPjxyZWN0IHg9IjM3LjUiIHk9IjAiIHdpZHRoPSIyNSIgaGVpZ2h0PSI2OSIgZmlsbD0iIzAwMCIvPjxyZWN0IHg9IjM3LjUiIHk9IjgxIiB3aWR0aD0iMjUiIGhlaWdodD0iNjkiIGZpbGw9IiMwMDAiLz48cmVjdCB4PSI3NSIgeT0iMCIgd2lkdGg9IjI1IiBoZWlnaHQ9IjY5IiBmaWxsPSIjMDAwIi8+PHJlY3QgeD0iNzUiIHk9IjgxIiB3aWR0aD0iMjUiIGhlaWdodD0iNjkiIGZpbGw9IiMwMDAiLz48L2c+PGcgdHJhbnNmb3JtPSJyb3RhdGUoOTApIHRyYW5zbGF0ZSgtMjg4LCAtNzUpIj48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMjUiIGhlaWdodD0iNjkiIGZpbGw9IiMwMDAiLz48cmVjdCB4PSIwIiB5PSI4MSIgd2lkdGg9IjI1IiBoZWlnaHQ9IjY5IiBmaWxsPSIjMDAwIi8+PHJlY3QgeD0iMzcuNSIgeT0iMCIgd2lkdGg9IjI1IiBoZWlnaHQ9IjE1MCIgZmlsbD0iIzAwMCIvPjxyZWN0IHg9Ijc1IiB5PSIwIiB3aWR0aD0iMjUiIGhlaWdodD0iNjkiIGZpbGw9IiMwMDAiLz48cmVjdCB4PSI3NSIgeT0iODEiIHdpZHRoPSIyNSIgaGVpZ2h0PSI2OSIgZmlsbD0iIzAwMCIvPjwvZz48ZyB0cmFuc2Zvcm09InJvdGF0ZSgtOTApIHRyYW5zbGF0ZSgtMjg4LCAtNzUpIj48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMjUiIGhlaWdodD0iMTUwIiBmaWxsPSIjMDAwIi8+PHJlY3QgeD0iMzcuNSIgeT0iMCIgd2lkdGg9IjI1IiBoZWlnaHQ9IjY5IiBmaWxsPSIjMDAwIi8+PHJlY3QgeD0iMzcuNSIgeT0iODEiIHdpZHRoPSIyNSIgaGVpZ2h0PSI2OSIgZmlsbD0iIzAwMCIvPjxyZWN0IHg9Ijc1IiB5PSIwIiB3aWR0aD0iMjUiIGhlaWdodD0iMTUwIiBmaWxsPSIjMDAwIi8+PC9nPjwvZz48L3N2Zz4=');
}

/* Poland (pl) */
.flag-pl {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxMCI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTAgMGgxNnYxMEgwVjB6Ii8+PHBhdGggZmlsbD0iI2RjMTQzYyIgZD0iTTAgNWgxNnY1SDBWNXoiLz48L3N2Zz4=');
}

/* Italy (it) */
.flag-it {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNTAwIDEwMDAiPjxwYXRoIGZpbGw9IiMwMDkyNDYiIGQ9Ik0wIDBoNTAwdjEwMDBIMHoiLz48cGF0aCBmaWxsPSIjZmZmIiBkPSJNNTAwIDBoNTAwdjEwMDBINTAweiIvPjxwYXRoIGZpbGw9IiNjZTJiMzciIGQ9Ik0xMDAwIDBoNTAwdjEwMDBIMTAwMHoiLz48L3N2Zz4=');
}

/* Hover State */
.lang-btn:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

.lang-btn:hover .flag-icon {
    filter: grayscale(0);
    transform: scale(1.1);
}

/* Active Selected State */
.lang-btn.active {
    background: rgba(0, 217, 255, 0.1) !important;
    border-color: var(--success) !important;
    color: var(--success) !important;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.1);
}

.lang-btn.active .flag-icon {
    filter: grayscale(0);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* --- MODIFIER STYLES --- */

/* RISK: HACK_ */
.word-hack-active {
    color: #ff0040 !important;
    text-shadow: 2px 0 #fff, -2px 0 #000;
    font-weight: bold;
    animation: glitch-anim 0.3s infinite;
}

/* SAFE: {SECURE} */
.word-secure-active {
    color: #00ffaa !important;
    text-shadow: 0 0 10px #00ffaa;
    border: 1px solid #00ffaa;
    padding: 0 8px;
    border-radius: 4px;
}

/* LINK: HTTPS:// */
.word-protocol-active {
    color: #00d9ff !important;
    text-shadow: 0 0 8px rgba(0, 217, 255, 0.6);
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

/* ADMIN: SUDO -P */
.word-sudo-active {
    color: #ffd700 !important;
    background-color: #222;
    padding: 0 5px;
    border-left: 4px solid #ffd700;
    font-weight: 900;
    letter-spacing: 1px;
}

/* EXEC: init_...exe */
.word-exec-active {
    color: #39ff14 !important;
    font-family: 'Courier New', monospace;
    border: 1px dashed #39ff14;
    text-shadow: 0 0 5px #39ff14;
}

@keyframes glitch-anim {
    0% { transform: translate(0) }
    20% { transform: translate(-2px, 2px) }
    40% { transform: translate(-2px, -2px) }
    60% { transform: translate(2px, 2px) }
    80% { transform: translate(2px, -2px) }
    100% { transform: translate(0) }
}
#manual-screen {
    background: radial-gradient(circle at center, rgba(16, 20, 30, 0.98) 0%, #050508 100%);
    backdrop-filter: blur(10px);
    animation: manualFadeIn 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes manualFadeIn {
    from { opacity: 0; transform: scale(0.98) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

#manual-screen h1 {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 4px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    width: 100%;
    max-width: 900px;
    text-align: center;
    text-shadow: 0 0 15px var(--accent-glow);
}

/* The Grid Container */
.manual-grid {
    display: grid;
    /* Adjusted columns: Syntax gets space, Desc gets space, Cost is fixed width */
    grid-template-columns: 1.5fr 2fr 150px; 
    width: 100%;
    max-width: 1000px;
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 0; /* Padding handled by rows */
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
    margin-top: 20px;
    overflow: hidden;
}

/* Headers */
.manual-header {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 15px 20px;
    border-bottom: 2px solid #444;
    text-shadow: 0 0 10px var(--accent-glow);
    display: flex;
    align-items: center;
}

/* Row Styling */
.manual-row {
    display: contents;
}

/* Alternating Row Backgrounds for readability */
.manual-row > div {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    font-size: 1rem;
    transition: background 0.2s;
}

.manual-row:hover > div {
    background: rgba(0, 217, 255, 0.03);
}

/* Manual Navigation */
.manual-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 900px;
    border-bottom: 1px solid #333;
}

.manual-tab {
    background: transparent;
    border: none;
    color: #666;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.manual-tab:hover {
    color: #fff;
    background: rgba(255,255,255,0.05);
}

.manual-tab.active {
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
    text-shadow: 0 0 10px var(--accent-glow);
}

.options-header button, #close-manual-btn, #close-options-btn {
    width: 40px; height: 40px;
    background: rgba(255,0,0,0.1);
    border: 1px solid #ff3366;
    color: #ff3366;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

.options-header button:hover {
    background: #ff3366;
    color: #000;
}

/* Tab Content */
.manual-content {
    display: none; /* Hidden by default */
    width: 100%;
    max-width: 900px;
    animation: fadeIn 0.3s ease;
}

.manual-content.active {
    display: block;
}

/* Brand Grid */
.manual-brands-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.brand-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid #333;
    padding: 15px;
    border-radius: 4px;
}

.brand-name {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.brand-desc {
    color: #aaa;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.brand-syn {
    font-size: 0.8rem;
    color: #fff;
    background: rgba(0,0,0,0.3);
    padding: 5px;
    border-left: 2px solid var(--success);
}

/* Mechanics List */
.manual-flex-row {
    display: flex;
    gap: 30px;
}

.manual-col {
    flex: 1;
    background: rgba(0,0,0,0.3);
    padding: 20px;
    border: 1px solid #333;
}

.manual-section-title {
    color: var(--accent);
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
    margin-bottom: 15px;
    font-weight: bold;
}

.manual-list {
    list-style: none;
    padding: 0;
    color: #ccc;
    line-height: 1.8;
}

.manual-list li::before {
    content: "> ";
    color: #666;
}

.manual-note {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
}

.combo-example {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 4px;
    border-left: 3px solid var(--accent);
}

.combo-recipe {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 2px;
}

.combo-result {
    color: #fff;
    font-weight: bold;
    font-size: 0.95rem;
    margin-bottom: 2px;
    text-shadow: 0 0 5px var(--accent);
}

.combo-detail {
    font-size: 0.8rem;
    color: var(--accent);
    font-style: italic;
}

/* --- COLUMN 1: SYNTAX --- */
.cmd-syntax {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
}

/* --- COLUMN 2: EFFECT (Make it readable) --- */
.cmd-desc {
    display: flex;
    gap: 8px;
    color: #e0e0e0; /* Brighter than before */
    font-family: 'Rajdhani', sans-serif;
    font-weight: 500;
    position: relative;
    padding-left: 20px !important; /* Space for the arrow */
    border-left: 1px solid #333; /* Vertical divider */
}

/* --- COLUMN 3: COST (Make it a Badge) --- */
.cmd-cost {
    font-family: 'Courier New', monospace;
    font-weight: 900;
    justify-content: center;
    text-align: center;
    background: rgba(0, 0, 0, 0.3); /* Dark background box */
    margin: 8px; /* Pull it away from edges */
    padding: 8px !important;
    border-radius: 4px;
    border: 1px solid #333;
    font-size: 0.85rem;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    height: auto;
    align-self: center;
}

/* Specific Syntax Highlighting */
.hint-hack { color: #ff0040; text-shadow: 2px 0 rgba(255,255,255,0.2), -1px 0 #000; }
.hint-secure { color: #00ffaa; text-shadow: 0 0 8px rgba(0, 255, 170, 0.4); }
.hint-proto { color: #00d9ff; text-decoration: underline; text-underline-offset: 4px; text-shadow: 0 0 8px rgba(0, 217, 255, 0.4); }
.hint-sudo { color: #ffd700; text-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
.hint-exec { color: #39ff14; border: 1px dashed rgba(57, 255, 20, 0.5); padding: 2px 6px; border-radius: 4px; background: rgba(57, 255, 20, 0.05); }

@keyframes shake-small {
    0% { transform: translate(0, 0); }
    25% { transform: translate(-2px, 2px); }
    50% { transform: translate(2px, -1px); }
    75% { transform: translate(-1px, -2px); }
    100% { transform: translate(0, 0); }
}

@keyframes shake-hard {
    0% { transform: translate(0, 0); }
    10% { transform: translate(-5px, -5px); }
    30% { transform: translate(5px, 5px); }
    50% { transform: translate(-5px, 5px); }
    70% { transform: translate(5px, -5px); }
    100% { transform: translate(0, 0); }
}

.shake-effect {
    animation: shake-small 0.2s ease-in-out;
}

.shake-hard-effect {
    animation: shake-hard 0.3s ease-in-out;
}

/* --- PARTICLES --- */
.key-particle {
    position: fixed;
    font-weight: bold;
    font-size: 1.5rem;
    pointer-events: none;
    animation: particle-fly 0.6s ease-out forwards;
    z-index: 2000;
    text-shadow: 0 0 5px currentColor;
}

@keyframes particle-fly {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.5); }
}

@keyframes glitch-anim-1 {
  0% { clip: rect(20px, 9999px, 10px, 0); transform: translate(-2px, 0); }
  20% { clip: rect(50px, 9999px, 60px, 0); transform: translate(2px, 0); }
  40% { clip: rect(10px, 9999px, 80px, 0); transform: translate(-2px, 0); }
  60% { clip: rect(90px, 9999px, 100px, 0); transform: translate(2px, 0); }
  80% { clip: rect(30px, 9999px, 5px, 0); transform: translate(-2px, 0); }
  100% { clip: rect(60px, 9999px, 70px, 0); transform: translate(2px, 0); }
}

@keyframes glitch-anim-2 {
  0% { clip: rect(10px, 9999px, 90px, 0); transform: translate(2px, 0); }
  20% { clip: rect(80px, 9999px, 10px, 0); transform: translate(-2px, 0); }
  40% { clip: rect(40px, 9999px, 50px, 0); transform: translate(2px, 0); }
  60% { clip: rect(20px, 9999px, 20px, 0); transform: translate(-2px, 0); }
  80% { clip: rect(60px, 9999px, 30px, 0); transform: translate(2px, 0); }
  100% { clip: rect(70px, 9999px, 80px, 0); transform: translate(-2px, 0); }
}

/* Class to apply to text */
.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before, .glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
}

.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}

.input-destroyed {
    animation: input-shatter 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) forwards;
    background: repeating-linear-gradient(
        45deg,
        #1a0505,
        #1a0505 10px,
        #2a0a0a 10px,
        #2a0a0a 20px
    ) !important;
    border-color: #333 !important;
    color: #555 !important;
    text-shadow: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

@keyframes input-shatter {
    0% {
        transform: translate(0, 0) scale(1);
        filter: brightness(1);
        border-color: var(--accent);
    }
    10% { transform: translate(-5px, 5px) rotate(-2deg); }
    20% { transform: translate(5px, -5px) rotate(2deg); }
    30% { transform: translate(-5px, 5px) rotate(-2deg); }
    40% {
        transform: scale(1.1);
        filter: brightness(5) sepia(1) hue-rotate(-50deg) saturate(5);
        border-color: #fff;
        background: #220000;
    }
    100% {
        transform: translateY(15px) rotate(3deg) scale(0.95) skewX(5deg);
        filter: grayscale(100%) brightness(0.3);
        opacity: 0.5;
        border-color: #333;
        background: #000;
        color: #333;
        box-shadow: none;
    }
}

#sliding-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 330px;
    height: 100%;
    background: rgba(15, 15, 20, 0.95);
    border-left: 2px solid var(--accent);
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.8);
    z-index: 5000;
    
    display: flex;
    flex-direction: column;
    padding: 15px;
    backdrop-filter: blur(10px);
    
    transform: translateX(100%);
    visibility: hidden;
    
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.4s;
}

#sliding-sidebar.active {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0s; 
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.sidebar-title {
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    color: var(--accent);
    text-shadow: 0 0 10px var(--accent-glow);
    letter-spacing: 2px;
}

#close-sidebar-btn, #close-leaderboard-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-dim);
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#close-sidebar-btn:hover, #close-leaderboard-btn:hover {
    color: var(--error);
    border-color: var(--error);
    box-shadow: 0 0 10px rgba(255, 51, 102, 0.2);
}

.sidebar-footer-btn {
    margin-top: auto;
    width: 100%;
    padding: 15px;
    background: linear-gradient(90deg, rgba(0, 217, 255, 0.1), transparent);
    border: 1px solid var(--accent);
    color: var(--accent);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.sidebar-footer-btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 20px var(--accent-glow);
}

/* --- GLOBAL TOGGLE BUTTON --- */

#top-nav-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    gap: 15px; /* Space between Gear and Menu */
}

#top-nav-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    gap: 15px;
}

.nav-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--accent);
    color: var(--accent);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    font-weight: bold;
    font-size: 1.8rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    text-decoration: none;
    
    padding: 0;
    line-height: 1;
}

.nav-btn:hover {
    background: rgba(0, 217, 255, 0.2);
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-2px);
    text-shadow: 0 0 10px var(--accent);
}

.shop-card.selected {
    border-color: var(--accent);
    transform: scale(1.05);
    z-index: 10;
}

.shop-card.selected .card-bg {
    filter: brightness(1.2);
}
/* --- SYNERGY POPUP FIXES --- */

#synergy-popup {
    /* Force fixed positioning to cover the screen */
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    inset: 0; /* Ensures it covers all corners */
    
    /* Centering Logic */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    
    /* Visuals */
    background: rgba(0, 5, 10, 0.95);
    z-index: 99999 !important; /* Ensure it's on top of everything */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
}

#synergy-popup.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Ensure the card looks like a popup */
.syn-card {
    width: 90%;
    max-width: 450px;
    background: linear-gradient(145deg, #1a1a2e 0%, #0f0f16 100%);
    border: 2px solid #ffd700;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#synergy-popup.visible .syn-card {
    transform: scale(1);
}

/* Header Styling */
.syn-header {
    background: rgba(255, 215, 0, 0.1);
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #ffd700;
}

.syn-alert {
    color: #ffd700;
    font-size: 0.8rem;
    letter-spacing: 3px;
    font-weight: 900;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.syn-title {
    color: #fff;
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 900;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

/* Image Area */
.syn-visual, .syn-visual img {
    width: 240px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #333;
    position: relative;
    margin: 0 auto;
    border-radius: 16px;
}

.syn-icon-fallback {
    font-size: 5rem;
    color: #ffd700;
    text-shadow: 0 0 30px #ffd700;
}

.syn-visual.no-img .syn-img { display: none; }

/* Description Body */
.syn-body {
    padding: 30px 20px;
    text-align: center;
}

.syn-desc {
    color: #ddd;
    font-size: 1.1rem;
    line-height: 1.5;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
}

/* Close Button */
.syn-btn {
    width: 100%;
    padding: 20px;
    background: #ffd700;
    color: #000;
    border: none;
    font-family: 'Courier New', monospace;
    font-weight: 900;
    font-size: 1.2rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: background 0.2s;
}

.syn-btn:hover {
    background: #fff;
    box-shadow: 0 0 20px #ffd700;
}

/* --- COMBO UI --- */
#combo-container {
    position: absolute;
    right: 40px;
    top: 80px; 
    text-align: center;
    z-index: 200;
    pointer-events: none;
    width: 140px;
    height: 150px;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    perspective: 500px;
}

#combo-rank {
    font-family: 'Orbitron', sans-serif; 
    font-size: 6rem;
    font-weight: 900;
    line-height: 1;
    position: relative;
    z-index: 2;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    transform: skewX(-5deg);
}

#combo-text {
    font-size: 1rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 4px;
    margin-top: 5px;
    text-shadow: 2px 2px 0px #000; 
    position: relative;
    z-index: 2;
    transform: skewX(-5deg);
}

@keyframes fireAnim3D {
    0% {
        text-shadow: 
            2px 2px 0 #ec760c,      /* Hard edge (Depth) */
            0 0 10px #fefcc9,       /* Inner Core (Yellow) */
            0 -5px 15px #ffae34,    /* Mid Flame (Orange) */
            0 -15px 20px #cd4606;   /* Outer Flame (Red) */
    }
    100% {
        text-shadow: 
            2px 2px 0 #ec760c,
            0 0 12px #fefcc9,       /* Slight pulse */
            0 -10px 15px #ffae34,   /* Moves up */
            0 -25px 20px #cd4606;   /* Moves up significantly */
    }
}

.rank-c, .rank-b, .rank-a { 
    color: #fff;
    text-shadow: 
        1px 1px 0px var(--accent),
        2px 2px 0px var(--accent),
        3px 3px 0px var(--border),
        4px 4px 0px #000,
        0 0 20px var(--accent); 
}

.fire-text {
    color: #fff; 
    /* Slower duration (0.1s -> 0.15s) reduces update frequency by 33% */
    animation: fireAnim3D 0.15s ease-in-out infinite alternate;
    
    /* Hardware acceleration hints */
    will-change: text-shadow; 
    transform: translate3d(0,0,0);
    backface-visibility: hidden;
}

/* Adjust ranks to match new timing base */
.rank-s { 
    font-size: 6rem; 
}

.rank-ss { 
    font-size: 6.5rem; 
    animation-duration: 0.12s; /* Adjusted for performance */
}

.rank-sss { 
    font-size: 7rem; 
    animation-duration: 0.1s; /* Adjusted for performance */
    color: #ffffdd; 
}

/* Pop Animation */
.combo-pop {
    animation: comboPop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes comboPop {
    0% { transform: scale(1) skewX(-5deg); }
    50% { transform: scale(1.3) skewX(-5deg); }
    100% { transform: scale(1) skewX(-5deg); }
}

#item-tooltip-card {
    position: fixed;
    z-index: 10000; /* Above everything */
    pointer-events: none; /* Mouse passes through it so it doesn't flicker */
    width: 250px;
    background: rgba(10, 10, 15, 0.95);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: none;
    flex-direction: column;
    gap: 5px;
}

#item-tooltip-card .tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
    margin-bottom: 5px;
}

#item-tooltip-card .tooltip-title {
    font-weight: bold;
    color: #fff;
    font-size: 0.9rem;
}

#item-tooltip-card .tooltip-rarity {
    font-size: 0.7rem;
    padding: 2px 4px;
    border-radius: 2px;
    border: 1px solid;
}

#item-tooltip-card .tooltip-desc {
    font-size: 0.8rem;
    color: #aaa;
    line-height: 1.4;
}

#item-tooltip-card .tooltip-effect {
    margin-top: 5px;
    font-size: 0.8rem;
    color: var(--success);
    font-family: 'Courier New', monospace;
}

.exclusive-tag {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ffd700;
    color: #000;
    font-weight: 900;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 2px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    letter-spacing: 1px;
}

.shop-card.broker-exclusive {
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2); 
}
.shop-card.broker-exclusive .card-bg {
    border: 2px solid #3fe212 !important;
}

.shop-card.broker-exclusive .card-title-container {
    color: #3fe212;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
}

.shop-card.exploit-exclusive {
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.3);
}

.shop-card.exploit-exclusive .card-bg {
    border: 2px solid #ff0055 !important;
}

.shop-card.exploit-exclusive .card-title-container {
    color: #ff0055;
    text-shadow: 2px 0 0px rgba(0,255,255,0.5);
}

.shop-card.glitch-exclusive {
    box-shadow: 0 0 15px rgba(127,0,255,0.3);
}

.shop-card.glitch-exclusive .card-bg {
    border: 2px solid purple !important;
}

.shop-card.glitch-exclusive .card-title-container {
    color: purple;
    text-shadow: 2px 0 0px rgba(127,0,255,0.5);
}

#hud-stats {
    display: flex !important;
    flex-direction: column !important; /* Stacks items vertically */
    align-items: flex-start !important; /* Aligns them to the left */
    gap: 8px !important; /* Spacing between modules */
    
    position: absolute !important;
    top: 20px !important;
    left: 20px !important;
    
    width: auto !important;
    height: auto !important;
    background: none !important; /* Removes the horizontal bar background */
    padding: 0 !important;
    z-index: 1999;
    pointer-events: none; /* Let clicks pass through gaps */
}

/* 2. The Stat Modules */
.sess-item {
    display: flex;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    
    /* Module Appearance */
    background: linear-gradient(90deg, rgba(16, 20, 30, 0.9) 0%, rgba(16, 20, 30, 0.6) 100%) !important;
    border: none !important;
    border-left: 3px solid var(--border) !important;
    border-radius: 0 4px 4px 0 !important;
    
    /* Sizing & Spacing */
    min-width: 100px !important;
    padding: 6px 12px 6px 15px !important;
    margin: 0 !important;
    
    /* Tech Skew Effect */
    transform: skewX(-10deg);
    transition: all 0.2s ease;
    pointer-events: auto !important; /* Make items clickable/hoverable */
}

/* Un-skew text inside */
.sess-item > * {
    transform: skewX(10deg);
}

/* Hover Effect: Slide out slightly */
.sess-item:hover {
    border-left-color: var(--accent) !important;
    background: linear-gradient(90deg, rgba(16, 20, 30, 1) 0%, rgba(0, 217, 255, 0.2) 100%) !important;
}

/* Text Styles for Stats */
.sess-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.65rem !important;
    font-weight: 700;
    color: #889;
    letter-spacing: 1px;
    margin-bottom: 0px;
    text-transform: uppercase;
}

.sess-val {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem !important;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 0 5px currentColor;
}

/* Remove old icons for cleaner stack look */
.sess-icon {
    display: none !important;
}

.char-display {
    background: transparent !important;
    padding: 0 !important;
    min-width: 0 !important;
    box-shadow: none !important;
    transform: skewX(0deg) !important;
    
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    pointer-events: auto;
}

#ui-char-img {
    width: 46px;
    height: 46px;
    border: 2px solid #444;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- SHIELD EFFECTS --- */

/* Active Shield State (Blue Border & Glow) */
#ui-char-img.shield-active {
    border-color: #00d9ff;
    box-shadow: 
        0 0 20px rgba(0, 217, 255, 0.6), 
        inset 0 0 15px rgba(0, 217, 255, 0.4);
}

/* Holographic Scanning Overlay */
#ui-char-img.shield-active::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 217, 255, 0.1),
        rgba(0, 217, 255, 0.1) 1px,
        transparent 1px,
        transparent 4px
    );
    pointer-events: none;
    z-index: 3;
    animation: shieldScan 2s linear infinite;
    border-radius: 6px;
}

@keyframes shieldScan {
    from { background-position: 0 0; }
    to { background-position: 0 20px; }
}

/* Stack Badge (for Savior multiple shields) */
#shield-stack-badge {
    position: absolute;
    top: -6px;
    left: 36px;
    background: #000;
    border: 1px solid #00d9ff;
    color: #00d9ff;
    font-family: 'Courier New', monospace;
    font-weight: 900;
    font-size: 0.75rem;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 0 8px #00d9ff;
    z-index: 10;
    pointer-events: none;
    animation: shieldPulse 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Pulse animation when shield takes a hit or regenerates */
@keyframes shieldPulse {
    0% { filter: brightness(1); transform: scale(1); }
    50% { filter: brightness(2) drop-shadow(0 0 10px #fff); transform: scale(1.1); }
    100% { filter: brightness(1); transform: scale(1); }
}

.shield-pulse {
    animation: shieldPulse 0.3s ease-out;
}

#defense-container {
    position: absolute;
    top: 55%; 
    left: 50%;
    transform: translate(-50%, -50%);
    
    background: rgba(0, 15, 30, 0.9);
    
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px);
    
    border: 2px solid #00d9ff;
    padding: 20px 50px; 
    border-radius: 4px;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 0 40px rgba(0, 217, 255, 0.4), inset 0 0 20px rgba(0, 0, 0, 0.8);
    animation: def-pulse 1s infinite alternate;
    
    pointer-events: none; 
}

body.steam-deck-mode #defense-container {
    top: 35%;
}

#defense-label {
    color: #00d9ff;
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

#defense-word {
    color: white;
    font-size: 2rem;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-shadow: 0 0 10px #00d9ff;
}

#defense-timer-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: #ff3366;
    width: 100%;
    transition: width 0.1s linear;
}

.input-defense-mode {
    border-color: #00d9ff !important;
    color: #00d9ff !important;
    background-color: rgba(0, 10, 30, 0.95) !important;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.6), inset 0 0 10px rgba(0, 217, 255, 0.3) !important;
    text-shadow: 0 0 10px #00d9ff;
    transition: all 0.2s ease;
}

.input-defense-mode::placeholder {
    color: rgba(0, 217, 255, 0.5);
    font-style: italic;
}

@keyframes pulse-blue {
    0% { box-shadow: 0 0 10px #00d9ff; }
    50% { box-shadow: 0 0 25px #00d9ff; }
    100% { box-shadow: 0 0 10px #00d9ff; }
}

/* --- ELITE DATA CURTAIN TRANSITION --- */
#code-curtain {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    z-index: 99999;
    overflow: hidden;
    pointer-events: none;
    
    /* Deep Void Background */
    background-color: #020202;
    
    /* THE MATRIX EFFECT: Two layers of scrolling binary code */
    /* Layer 1: Dim, slow, background code */
    /* Layer 2: Bright, fast, foreground code */
    background-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cstyle%3Etext%7Bfont-family:monospace;font-weight:bold;fill:rgba(0,255,136,0.15);font-size:10px;%7D%3C/style%3E%3Ctext x='10' y='20'%3E1%3C/text%3E%3Ctext x='30' y='40'%3E0%3C/text%3E%3Ctext x='50' y='10'%3E1%3C/text%3E%3Ctext x='70' y='60'%3E0%3C/text%3E%3Ctext x='90' y='30'%3E1%3C/text%3E%3Ctext x='20' y='80'%3E0%3C/text%3E%3Ctext x='60' y='90'%3E1%3C/text%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 150 150'%3E%3Cstyle%3Etext%7Bfont-family:monospace;font-weight:bold;fill:rgba(0,217,255,0.4);font-size:14px;%7D%3C/style%3E%3Ctext x='15' y='25'%3E0xFA%3C/text%3E%3Ctext x='55' y='65'%3ENULL%3C/text%3E%3Ctext x='95' y='35'%3E101%3C/text%3E%3Ctext x='25' y='110'%3E4F%3C/text%3E%3Ctext x='115' y='95'%3E00%3C/text%3E%3C/svg%3E");
    
    /* Initial Size */
    background-size: 150px 150px, 200px 200px;
    background-repeat: repeat;
    /* Leading Edge Glow (The Scanner Beam) */
    border-bottom: 4px solid #00ff88;
    box-shadow: 
        0 0 40px rgba(0, 255, 136, 0.5), 
        0 0 10px rgba(0, 255, 136, 0.8),
        0 -150px 150px rgba(0, 0, 0, 0.9) inset; /* Heavy vignette to focus bottom */

    /* Easing: "Exponential" - Starts slow, snaps shut fast */
    transition: height 0.5s cubic-bezier(0.87, 0, 0.13, 1);
}

/* --- STATE: DROPPING (Cover Screen) --- */
#code-curtain.dropping {
    height: 100%;
    border-bottom: 4px solid #00ff88;
    border-top: none;
    
    /* Animate the Background Images (The Matrix Rain) */
    animation: matrixScroll 2s linear infinite;
}

#code-curtain.dropping::after {
    opacity: 1;
    animation: textGlitch 0.2s steps(2) infinite;
}

/* --- STATE: REVEALING (Pull Away) --- */
#code-curtain.finished {
    top: auto;
    bottom: 0;
    height: 0%;
    
    /* Flip the border to the top as it shrinks down */
    border-bottom: none;
    border-top: 4px solid #00ff88; 
    
    /* Cyan glow on exit for visual variety */
    box-shadow: 
        0 0 30px rgba(0, 217, 255, 0.6), 
        0 0 10px rgba(0, 217, 255, 0.8);
        
    /* Continue animation while shrinking */
    animation: matrixScroll 2s linear infinite; 
}

@keyframes matrixScroll {
    0% { 
        background-position: 0 0, 0 0; 
    }
    100% { 
        background-position: 0 300px, 0 600px; /* Layer 2 moves 2x faster */
    }
}

/* Glitch Shake for Text */
@keyframes textGlitch {
    0% { 
        transform: scaleX(1.2) translateX(0); 
        text-shadow: -2px 0 red, 2px 0 cyan;
        color: rgba(255, 255, 255, 0.15);
    }
    25% { 
        transform: scaleX(1.2) translateX(-3px); 
        text-shadow: 2px 0 red, -2px 0 cyan;
        color: rgba(255, 255, 255, 0.4);
    }
    50% { 
        transform: scaleX(1.2) translateX(3px); 
        text-shadow: -2px 0 blue, 2px 0 yellow;
    }
    75% { 
        transform: scaleX(1.2) translateX(0); 
        text-shadow: 2px 0 green, -2px 0 magenta;
    }
    100% { 
        transform: scaleX(1.2) translateX(0); 
    }
}

#seizure-warning {
    background-color: #000000 !important;
    cursor: none; /* Hide cursor during warning */
}

@keyframes warning-blink {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

#hud-commands {
    position: absolute;
    left: 20px;
    top: 201px; 
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 1999;
    pointer-events: none;
}

.cmd-badge {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 900;
    color: #fff;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--accent);
    padding: 2px;
    border-radius: 4px;
    text-shadow: 0 0 5px var(--accent);
    box-shadow: -3px 0 0 var(--accent); /* Left accent bar */
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 140px;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
    animation: slideInLeft 0.3s ease-out;
}

.cmd-badge.consumable {
    border-color: #ffaa00;
    box-shadow: -3px 0 0 #ffaa00;
    color: #ffaa00;
    text-shadow: 0 0 5px #ffaa00;
}

.cmd-badge.infinite {
    border-color: #00ff88;
    box-shadow: -3px 0 0 #00ff88;
    color: #00ff88;
}

.cmd-key {
    margin-right: 10px;
    text-transform: uppercase;
}

.cmd-count {
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.8rem;
}

/* --- BATTLE LOG (Tech Style) --- */
#battle-log-container {
    position: absolute;
    right: 30px; 
    top: 240px; /* Below Combo Counter */
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 6px; /* Spacing between logs */
    z-index: 100;
    pointer-events: none;
    align-items: flex-end; /* Align items to the right */
}

.battle-log-entry {
    /* Mimicking .sess-item style */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    
    /* Dynamic width based on content */
    width: fit-content; 
    min-width: 120px;
    padding: 8px 16px;
    
    /* Tech Background: Gradient fading to transparent on the left */
    background: linear-gradient(270deg, rgba(16, 20, 30, 0.95) 0%, rgba(16, 20, 30, 0.4) 100%);
    
    /* The Colored Indicator Bar (Color set via JS) */
    border-right: 4px solid #fff; 
    border-radius: 4px 0 0 4px;
    
    /* Skew Effect */
    transform: skewX(-10deg);
    
    /* Initial Animation State */
    opacity: 0;
    margin-right: -30px; /* Start slightly off-screen */
    animation: logPopIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    
    box-shadow: 5px 5px 15px rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
}

/* Inner text wrapper to un-skew the text */
.battle-log-text {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px currentColor; /* Glow matches text color */
    
    /* Counter-skew to make text straight */
    transform: skewX(10deg); 
    white-space: nowrap;
}

@keyframes logPopIn {
    to {
        opacity: 1;
        margin-right: 0;
    }
}

@keyframes logFadeOut {
    to {
        opacity: 0;
        transform: skewX(-10deg) translateX(20px);
    }
}


#wpm-indicator {
    position: absolute;
    top: -5px;
    left: -45px;
    font-family: 'Rajdhani', sans-serif;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    
    display: flex;
    justify-content: center;
    align-items: center;
    
    background: conic-gradient(#333 0%, #333 100%);
    
    border: none !important;
    opacity: 1;
    z-index: 20;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    transition: box-shadow 0.2s;
}

#wpm-indicator > .wpm-inner {
    position: relative;
    width: 70px;
    height: 70px;
    background: #000;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2;
}


/* STATS SCREEN GRID */
#stats-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    width: 100%;
    padding: 20px;
    overflow-y: auto;
}

/* STAT CARD STYLING */
.career-stat-card {
    background: linear-gradient(135deg, rgba(20, 25, 35, 0.9) 0%, rgba(10, 10, 15, 0.8) 100%);
    border: 1px solid #333;
    border-left: 4px solid #fff; /* Default, overridden by JS */
    border-radius: 4px;
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    min-height: 100px;
}

/* Tech Background Pattern */
.career-stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 100%; height: 100%;
    background: repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px);
    pointer-events: none;
}

.career-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: linear-gradient(135deg, rgba(30, 35, 45, 0.95) 0%, rgba(15, 15, 20, 0.9) 100%);
    border-color: #555;
}

/* TYPOGRAPHY */
.c-stat-label {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: #888;
    letter-spacing: 2px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.c-stat-value {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: 2rem;
    line-height: 1.1;
    color: #fff;
    /* text-shadow handled inline for specific colors */
}

.c-stat-sub {
    margin-top: 5px;
    font-size: 0.8rem;
    color: #555;
    font-family: 'Courier New', monospace;
}

/* CLOSE BUTTON HOVER */
#close-stats-btn:hover {
    background: #bd00ff !important;
    color: #000 !important;
    transform: rotate(90deg);
    box-shadow: 0 0 15px #bd00ff;
}

.word-armored {
    color: #b0c4de !important; /* Light Steel Blue */
    text-shadow: 0 0 10px #708090, 0 0 20px #b0c4de !important;
    border: 1px solid rgba(176, 196, 222, 0.5);
    padding: 2px 10px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.5);
}

.word-armored::after {
    content: " 🛡️"; /* Shield icon */
    font-size: 0.8em;
    vertical-align: middle;
}

/* Animation when armor takes a hit but doesn't break */
.armor-hit {
    animation: armorShake 0.3s ease-in-out;
    color: #fff !important;
}

@keyframes armorShake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px) scale(1.1); }
    50% { transform: translateX(5px) scale(1.1); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

/* --- MALWARE POPUPS --- */
.malware-popup {
    position: absolute;
    background: #c0c0c0;
    border: 2px solid #fff;
    border-right-color: #404040;
    border-bottom-color: #404040;
    box-shadow: 10px 10px 30px rgba(0,0,0,0.5);
    min-width: 200px;
    z-index: 2000;
    font-family: 'Courier New', monospace;
    display: flex;
    flex-direction: column;
    animation: popupPop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.malware-header {
    background: #000080; /* Classic Title Bar Blue */
    color: #fff;
    padding: 2px 5px;
    font-size: 0.8rem;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.malware-close-x {
    background: #c0c0c0;
    color: #000;
    border: 1px solid #fff;
    border-right-color: #404040;
    border-bottom-color: #404040;
    width: 16px;
    height: 16px;
    line-height: 14px;
    text-align: center;
    font-size: 0.7rem;
    cursor: default;
}

.malware-body {
    padding: 20px;
    text-align: center;
    color: #000;
    font-weight: 900;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.malware-btn {
    margin: 0 auto 10px auto;
    background: #c0c0c0;
    border: 1px solid #fff;
    border-right-color: #404040;
    border-bottom-color: #404040;
    padding: 5px 15px;
    font-size: 0.8rem;
    color: #000;
    width: fit-content;
}

@keyframes popupPop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- BOSS TRANSITION OVERLAY --- */
#boss-transition-overlay {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    z-index: 99999; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #000;
    overflow: hidden;
    
    opacity: 0;
    pointer-events: none; 
    
    transition: opacity 0.5s ease-in-out;
}

#boss-transition-overlay.active { 
    opacity: 1;
    pointer-events: all;
}

.hazard-stripes {
    position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: repeating-linear-gradient(45deg, #000, #000 40px, #330000 40px, #330000 80px);
    opacity: 0.6;
    animation: hazardScroll 1s linear infinite;
}

@keyframes hazardScroll { 0% { transform: translateY(0); } 100% { transform: translateY(56.5px); } }

.warning-container {
    position: relative; z-index: 2; display: flex; flex-direction: column;
    align-items: center; gap: 10px; transform: scale(0.8);
    animation: warningPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes warningPop { to { transform: scale(1.2); } }

.warning-line {
    font-family: 'Orbitron', monospace; font-size: 6rem; font-weight: 900;
    color: #ff0000; letter-spacing: 15px;
    text-shadow: 0 0 20px #ff0000, 4px 4px 0 #000;
    animation: flashWarning 0.2s infinite alternate;
}
.warning-sub {
    font-family: 'Courier New', monospace; font-size: 1.5rem; color: #fff;
    background: #ff0000; padding: 5px 20px; font-weight: bold;
    letter-spacing: 4px; box-shadow: 0 0 15px #ff0000;
}
@keyframes flashWarning { 0% { opacity: 1; } 100% { opacity: 0.8; } }

/* Invader Mode (Purple) */
#boss-transition-overlay.invader-mode .hazard-stripes {
    background: repeating-linear-gradient(45deg, #000, #000 40px, #220022 40px, #220022 80px);
}
#boss-transition-overlay.invader-mode .warning-line {
    color: #ff00ff; text-shadow: 2px 0 #00ffff, -2px 0 #ff00ff;
}
#boss-transition-overlay.invader-mode .warning-sub {
    background: #bd00ff; box-shadow: 0 0 20px #bd00ff;
}


/* Syntax Injection */
.syntax-noise { color: #555; font-size: 0.8em; vertical-align: middle; }

/* Binary Mask */
.binary-mask {
    font-family: 'Courier New', monospace !important; letter-spacing: 2px !important;
    color: #00ff00 !important; text-shadow: 0 0 10px #00ff00 !important;
}

/* Chromatic Aberration */
.chromatic-text { position: relative; color: rgba(255, 255, 255, 0.8); animation: chromaticShake 0.2s infinite; }
.chromatic-text::before, .chromatic-text::after {
    content: attr(data-text); position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0.7; background: #000; mix-blend-mode: screen;
}
.chromatic-text::before { color: #ff0000; transform: translateX(-3px); z-index: -1; }
.chromatic-text::after { color: #0000ff; transform: translateX(3px); z-index: -2; }
@keyframes chromaticShake { 0% { transform: translate(0, 0); } 50% { transform: translate(1px, 1px); } 100% { transform: translate(-1px, -1px); } }

/* Input Encryption */
.input-encrypted { font-family: 'Wingdings', 'Webdings', 'Symbol', serif !important; letter-spacing: 3px !important; color: #bd00ff !important; text-shadow: 0 0 5px #bd00ff; }

/* Input Jitter */
@keyframes violentShake {
    0% { transform: translate(0, 0) rotate(0deg); } 25% { transform: translate(5px, 5px) rotate(2deg); }
    50% { transform: translate(-5px, 5px) rotate(-2deg); } 75% { transform: translate(-5px, -5px) rotate(1deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}
.input-jitter { animation: violentShake 0.3s infinite linear !important; border-color: #ff00ff !important; box-shadow: 0 0 15px #ff00ff !important; }

/* Focus Drift */
@keyframes dvdFloat {
    0% { transform: translate(0, 0); } 25% { transform: translate(-150px, 50px); }
    50% { transform: translate(100px, 150px); } 75% { transform: translate(150px, -50px); }
    100% { transform: translate(-50px, 0); }
}
.focus-drift { animation: dvdFloat 4s infinite linear alternate !important; border-color: #ffd700 !important; }

/* Reality Collapse */
@keyframes collapseSpin {
    0% { transform: scale(1) rotate(0deg); } 50% { transform: scale(0.4) rotate(180deg); }
    90% { transform: scale(0.4) rotate(350deg); } 100% { transform: scale(1) rotate(360deg); }
}
.reality-collapse-anim { animation: collapseSpin 4s cubic-bezier(0.68, -0.55, 0.27, 1.55) forwards; border: 5px solid red !important; }

/* Fake Terminal */
#fake-terminal {
    position: absolute; top: 20%; left: 50%; transform: translateX(-50%);
    width: 600px; height: 300px; background: #000; border: 2px solid #00ff00;
    font-family: 'Courier New', monospace; padding: 10px; z-index: 2000;
    display: none; flex-direction: column; box-shadow: 0 0 50px rgba(0, 255, 0, 0.2); opacity: 0.9;
}
#fake-terminal-header { background: #00ff00; color: #000; padding: 5px; font-weight: bold; margin-bottom: 10px; }
#fake-terminal-body { color: #00ff00; font-size: 0.9rem; line-height: 1.4; white-space: pre-wrap; }

/* False Flag */
#false-flag-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95); z-index: 9999; display: none;
    flex-direction: column; justify-content: center; align-items: center; pointer-events: none;
}
#false-flag-text {
    font-family: 'Orbitron', monospace; font-size: 5rem; font-weight: 900;
    letter-spacing: 10px; animation: pulseFlag 0.2s infinite alternate;
}
@keyframes pulseFlag { from { opacity: 0.8; transform: scale(1); } to { opacity: 1; transform: scale(1.05); } }

/* System Purge */
body.system-purge #hud-stats, body.system-purge #hud-commands, body.system-purge #timer,
body.system-purge #boss-container, body.system-purge #combo-container {
    opacity: 0 !important; pointer-events: none; transition: opacity 0.5s ease;
}

/* SYSTEM BIOS SCREEN */
#bios-screen {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: #050a05; /* Deep Terminal Green/Black */
    z-index: 2500;
    flex-direction: column;
    align-items: center;
    padding: 30px;
    font-family: 'Courier New', monospace;
}

.bios-header-main {
    width: 100%; max-width: 1200px;
    display: flex; justify-content: space-between;
    border-bottom: 2px solid #00ff00; /* Matrix Green */
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.bios-title { font-size: 2.5rem; color: #00ff00; text-shadow: 0 0 10px #00ff00; font-weight: bold; }
.bios-currency { font-size: 1.5rem; color: #00ff00; }

#bios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    width: 100%; max-width: 1200px;
    overflow-y: auto;
    padding-right: 10px;
}

.bios-card {
    background: #0a1a0a;
    border: 1px solid #005500;
    padding: 15px;
    display: flex; flex-direction: column;
    gap: 10px;
    transition: all 0.2s;
}

.bios-card.inactive { opacity: 0.5; filter: grayscale(1); }
.bios-card:hover { border-color: #00ff00; box-shadow: 0 0 15px rgba(0, 255, 0, 0.2); }

.bios-header { display: flex; justify-content: space-between; align-items: center; }
.bios-name { color: #00ff00; font-weight: bold; font-size: 1.1rem; }
.bios-lvl { color: #00aa00; font-size: 0.9rem; }

.bios-desc { color: #88aa88; font-size: 0.85rem; flex-grow: 1; line-height: 1.4; }

.bios-footer { display: flex; gap: 10px; margin-top: 10px; }

.bios-buy-btn {
    flex: 1;
    background: #003300;
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 8px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}
.bios-buy-btn:hover { background: #00ff00; color: #000; }
.bios-buy-btn.disabled { border-color: #333; color: #555; cursor: not-allowed; background: #111; }

.bios-toggle {
    width: 40px;
    background: transparent;
    border: 1px solid #00ff00;
    color: #00ff00;
    cursor: pointer;
}

/* Database Filter Bar */
#database-filter-bar {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid #333;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-label {
    font-size: 0.7rem;
    color: #888;
    margin-right: 5px;
    font-weight: bold;
}

.filter-btn {
    background: #1a1a2e;
    border: 1px solid #444;
    color: #ccc;
    padding: 5px 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: #fff;
}

.filter-btn.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    font-weight: bold;
}

.filter-select {
    background: #1a1a2e;
    border: 1px solid #444;
    color: #ccc;
    padding: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    outline: none;
    border-radius: 3px;
}

.filter-select:focus {
    border-color: var(--accent);
}

/* Rarity specific active states */
.filter-btn[data-rarity="COMMON"].active { background: #aaa; border-color: #aaa; color: #000; }
.filter-btn[data-rarity="RARE"].active { background: #00d9ff; border-color: #00d9ff; color: #000; }
.filter-btn[data-rarity="EPIC"].active { background: #bd00ff; border-color: #bd00ff; color: #000; }
.filter-btn[data-rarity="LEGENDARY"].active { background: #ffd700; border-color: #ffd700; color: #000; }


.custom-select {
    position: relative;
    min-width: 160px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

/* Closed state (looks like .filter-select) */
.custom-select-trigger {
    background: #1a1a2e;
    border: 1px solid #444;
    color: #ccc;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: url('../ui/cursor-hover.png') 0 0, pointer;
    transition: all 0.2s;
    user-select: none;
}

/* Focus / active glow */
.custom-select.open .custom-select-trigger {
    border-color: var(--accent);
    box-shadow: 0 0 6px rgba(255, 0, 0, 0.4);
}

/* Dropdown panel */
.custom-select-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;

    background: #1a1a2e;
    border: 1px solid #444;
    border-radius: 3px;

    display: none;
    z-index: 5000;

    max-height: 200px;
    overflow-y: auto;

    box-shadow: 0 0 10px rgba(0,0,0,0.6);
}

/* Open state */
.custom-select.open .custom-select-menu {
    display: block;
}

/* Options */
.custom-option {
    padding: 6px 10px;
    color: #ccc;
    cursor: url('../ui/cursor-hover.png') 0 0, pointer;
    transition: all 0.15s;
}

.custom-option:hover {
    border-left: 3px solid var(--accent);
    background: rgba(255, 0, 0, 0.08);
    color: #fff;
}

/* Selected option */
.custom-option.selected {
    background: var(--accent);
    color: #000;
    font-weight: bold;
}

/* Optional subtle scrollbar theme */
.custom-select-menu::-webkit-scrollbar {
    width: 6px;
}

.custom-select-menu::-webkit-scrollbar-track {
    background: #111;
}

.custom-select-menu::-webkit-scrollbar-thumb {
    background: var(--accent);
}

/* ========================================= */
/* BOSS INTEL OVERLAY (Steam Deck Optimized) */
/* ========================================= */

#boss-intel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 5, 10, 0.9);
    z-index: 6000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease-out;
}

.intel-card {
    /* Glassmorphism Base */
    background: linear-gradient(145deg, rgba(18, 18, 26, 0.98) 0%, rgba(10, 10, 15, 0.99) 100%);
    border: 1px solid var(--border);
    border-top: 4px solid var(--accent); 
    border-bottom: 1px solid var(--accent);
    
    /* Wider for Grid Layout */
    width: 950px; 
    max-width: 95%;
    
    box-shadow: 
        0 0 50px rgba(0, 217, 255, 0.15),
        inset 0 0 100px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transform: scale(0.95);
    animation: intelPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Background Grid Pattern */
.intel-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(0, 217, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* Header Section */
.intel-header {
    background: linear-gradient(90deg, rgba(0, 217, 255, 0.15), transparent);
    color: var(--accent);
    padding: 15px 30px;
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 1.2rem;
    text-shadow: 0 0 10px var(--accent-glow);
    border-bottom: 1px solid rgba(0, 217, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.intel-header::before {
    content: '⚠';
    animation: blink 1s infinite;
}

/* Boss Name Display */
#intel-boss-name {
    color: #ff3366;
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem; /* Larger Title */
    font-weight: 900;
    text-align: center;
    margin: 20px 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 
        0 0 10px rgba(255, 51, 102, 0.6),
        4px 4px 0px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
}

/* Stats Layout */
.intel-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 0 40px;
    position: relative;
    z-index: 1;
}

.intel-stat-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #333;
    border-left: 4px solid var(--accent); 
    padding: 15px;
    display: flex;
    flex-direction: row; /* Horizontal layout for stats */
    justify-content: space-between;
    align-items: center;
}

.intel-stat-box:first-child {
    border-left-color: #ff3366;
}

.intel-stat-box .label {
    color: #889;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.intel-stat-box .value {
    color: #fff;
    font-size: 2rem;
    font-family: 'Courier New', monospace;
    font-weight: 900;
    text-shadow: 0 0 5px currentColor;
}

/* Abilities List container - THE GRID */
.intel-abilities-box {
    margin: 20px 40px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    padding: 20px;
    position: relative;
    z-index: 1;
    border-radius: 4px;
}

.intel-abilities-box .label {
    color: var(--accent);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 2px;
    margin-bottom: 15px;
    display: block;
    text-transform: uppercase;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

/* Grid Layout for the list */
#intel-abilities-list ul {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two Columns */
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Individual Ability Card */
#intel-abilities-list li {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    padding: 15px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Ability Name */
#intel-abilities-list strong {
    font-size: 1.1rem;
    font-family: 'Orbitron', monospace;
    letter-spacing: 1px;
}

/* Ability Desc */
#intel-abilities-list span {
    font-size: 1rem; /* Larger font for readability */
    color: #ccc;
    line-height: 1.4;
    font-family: 'Rajdhani', sans-serif;
}

/* --- BIG INPUT FIELD --- */
#intel-input {
    width: 90%; /* Wider */
    max-width: 600px;
    padding: 20px;
    margin: 10px auto 30px auto;
    
    font-family: 'Orbitron', monospace;
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 6px;
    text-align: center;
    color: var(--accent);
    text-transform: uppercase;
    
    background: rgba(10, 10, 15, 0.85);
    border: 2px solid var(--border);
    border-radius: 6px;
    outline: none;
    
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.8),
        inset 0 0 20px rgba(0, 0, 0, 0.8);
        
    backdrop-filter: blur(10px);
    transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    z-index: 10;
}

#intel-input:focus {
    border-color: var(--accent);
    color: #fff;
    box-shadow: 
        0 0 20px var(--accent-glow),
        inset 0 0 15px var(--accent-glow),
        0 10px 40px rgba(0, 0, 0, 0.8);
    transform: scale(1.02);
}

#intel-input.error-shake {
    border-color: var(--error);
    color: var(--error);
    box-shadow: 0 0 30px rgba(255, 51, 102, 0.4), inset 0 0 20px rgba(255, 51, 102, 0.2);
    animation: shake 0.15s ease-in-out;
}

#intel-input::placeholder {
    color: rgba(0, 217, 255, 0.3); /* Faint Cyan */
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    letter-spacing: 6px;
    opacity: 1; /* Override browser default */
    text-shadow: none;
    transition: color 0.3s ease;
}

#intel-input:focus::placeholder {
    color: rgba(0, 217, 255, 0.15); /* Even fainter when typing starts */
    letter-spacing: 8px; /* Expands slightly */
}

@keyframes intelPop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

#input-box.perfect-mode {
    background-image: linear-gradient(90deg, var(--perfect-color, rgba(0, 217, 255, 0.2)) 100%, transparent 100%) !important;
    background-color: rgba(10, 10, 15, 0.85) !important;
    background-size: var(--perfect-hp, 100%) 100% !important;
    background-repeat: no-repeat !important;
}

.jukebox-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, rgba(16, 20, 30, 0.95) 0%, rgba(10, 10, 15, 0.98) 100%);
    border: 1px solid var(--border);
    border-top: 2px solid var(--accent);
    border-radius: 6px;
    padding: 12px;
    gap: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(0, 217, 255, 0.05);
    min-width: 250px;
}

.jb-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    width: 100%;
}

.jb-btn {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    color: #888;
    border-radius: 4px;
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.jb-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 217, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 217, 255, 0.2);
}

/* Make the play button slightly larger and distinct */
.jb-btn.play-btn {
    width: 44px;
    height: 44px;
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 217, 255, 0.05);
    font-size: 1.3rem;
    margin-top: -3px; /* Align centers with smaller buttons */
}

.jb-btn.play-btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Active state for Toggle Buttons (Shuffle/Loop) */
.jb-btn.active {
    color: var(--success);
    border-color: var(--success);
    background: rgba(0, 217, 255, 1);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3), inset 0 0 5px rgba(0, 255, 136, 0.2);
}

.jb-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.jb-btn.play-btn svg {
    width: 24px;
    height: 24px;
}

/* Add a slight pop effect when interacting with the icons */
.jb-btn:active svg {
    transform: scale(0.9);
}

.jb-btn.active svg {
    filter: drop-shadow(0 0 5px rgba(0, 255, 136, 0.5));
}

/* Now Playing Display */
#jb-now-playing-container {
    width: 100%;
    background: #000;
    border: 1px solid #222;
    border-left: 3px solid var(--accent);
    border-radius: 3px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    overflow: hidden;
    position: relative;
}

#jb-np-label {
    color: #666;
    font-weight: 900;
    margin-right: 8px;
    letter-spacing: 1px;
}

#jb-now-playing {
    color: var(--success);
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

/* EQ pulsing effect when playing */
#jb-now-playing-container.playing::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
    animation: jbPulse 1s infinite alternate;
}

@keyframes jbPulse {
    0% { opacity: 0.3; transform: translateY(-50%) scale(0.8); }
    100% { opacity: 1; transform: translateY(-50%) scale(1.2); }
}

body.whiteout-mode {
    background: #ffffff !important;
}
body.whiteout-mode::before, body.whiteout-mode::after {
    display: none !important;
}
body.whiteout-mode #game-area {
    background: #ffffff !important;
    border-color: #ddd !important;
    box-shadow: none !important;
}
body.whiteout-mode #word-display, body.whiteout-mode #input-box {
    color: #000 !important;
    text-shadow: none !important;
    border-color: #ccc !important;
}
body.whiteout-mode #hud-stats, body.whiteout-mode #hud-commands, body.whiteout-mode #timer, body.whiteout-mode #boss-container, body.whiteout-mode #combo-container, body.whiteout-mode #top-nav-container, body.whiteout-mode .floating-feedback {
    opacity: 0 !important;
    transition: opacity 0.3s;
    pointer-events: none;
}

.glitch-hidden-input {
    opacity: 0 !important;
}
.glitch-hidden-timer {
    opacity: 0 !important;
}

body.boot-state #symbol-macro-bar{
    display: none !important;
}

#symbol-macro-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    margin-bottom: 10px;
    min-height: 40px;
    width: 100%;
    max-width: 800px;
    z-index: 15;
}

#symbol-macro-bar .vk-btn {
    width: auto;
    min-width: 45px;
    height: 45px;
    padding: 5px 15px;
    font-size: 1.3rem;
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    background: rgba(10, 10, 15, 0.85);
    border: 2px solid var(--accent);
    color: var(--accent);
    border-radius: 4px;
    cursor: pointer;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.8), 0 5px 10px rgba(0,0,0,0.5);
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#symbol-macro-bar .vk-btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px var(--accent-glow);
    transform: translateY(-2px);
}

#symbol-macro-bar .vk-btn:active {
    transform: translateY(2px) scale(0.95);
}