/* public_html/tools/games/typedefender/style.css - Word Defender Styling */
.typedefender-wrap {
    background: var(--bg-main);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
}

/* Landing Page Layout Styles */
.td-landing-hero {
    background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent), 
                radial-gradient(circle at bottom left, rgba(249, 115, 22, 0.06), transparent), 
                var(--bg-surface-alt);
    border-bottom: 1px solid var(--border-color);
    padding: 6rem 0 4rem 0;
    text-align: center;
}

.td-hero-logo {
    max-width: 320px;
    margin: 0 auto 1.5rem auto;
    filter: drop-shadow(0 0 20px rgba(37, 99, 235, 0.45));
    animation: tdFloat 4s ease-in-out infinite;
}

@keyframes tdFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.td-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.td-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.6;
}

.td-btn-play {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 700;
    padding: 1rem 3.5rem;
    border-radius: 12px;
    border: none;
    box-shadow: 0 0 25px rgba(234, 88, 12, 0.55);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.td-btn-play:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 0 35px rgba(234, 88, 12, 0.75);
    color: #ffffff;
}

/* Play View Layout - Desktop Grid */
/* Layout Grid Setup */
.game-play-container {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    grid-template-rows: 65px 1fr 140px 30px;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #060813;
    font-family: 'Outfit', sans-serif;
    color: #f8fafc;
}

/* Left Navigation Sidebar - Modern Glassmorphism */
.game-sidebar-left {
    grid-row: 1 / 4;
    grid-column: 1;
    background: linear-gradient(180deg, rgba(11, 15, 30, 0.9) 0%, rgba(6, 8, 20, 0.95) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 25;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.5);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Orbitron', sans-serif;
    color: #ffffff;
    text-shadow: 0 0 12px rgba(59, 130, 246, 0.65);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1.5rem;
    margin-bottom: 1.75rem;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-btn {
    background: rgba(30, 41, 59, 0.5);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.sidebar-btn:hover {
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.kbd-hint {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #64748b;
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
    font-family: monospace;
    font-weight: bold;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

.sidebar-btn:hover .kbd-hint {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Sidebar Live Telemetry */
.mission-telemetry-box {
    margin-top: 1.5rem;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.25rem;
}

.telemetry-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.telemetry-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.telemetry-row:last-child {
    border: none;
}

.telemetry-value {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

.telemetry-value.text-accent {
    color: #f97316;
    text-shadow: 0 0 8px rgba(249, 115, 22, 0.4);
}

.telemetry-value.text-green {
    color: #10b981;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}


/* Top Stats HUD Bar - Premium Floating Glass Cards */
.game-hud-top {
    grid-row: 1;
    grid-column: 2 / 4;
    background: linear-gradient(180deg, rgba(11, 15, 30, 0.9) 0%, rgba(11, 15, 30, 0) 100%);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1.25rem;
    padding: 0 2rem;
    z-index: 20;
    pointer-events: none;
}

.hud-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    height: 48px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
}

.hud-card-icon {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hud-card-details {
    display: flex;
    flex-direction: column;
}

.hud-card-label {
    font-size: 0.65rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.hud-card-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.15rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.1;
}

.hud-card-value.neon-orange {
    color: #f97316;
    text-shadow: 0 0 10px rgba(249, 115, 22, 0.6);
}

.hud-card-value.neon-green {
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

/* HP Progress Bar HUD card */
.hp-card-wrap {
    width: 200px;
}

.hud-hp-bar-bg {
    width: 150px;
    height: 16px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
}

.hud-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #b91c1c 0%, #ef4444 50%, #b91c1c 100%);
    border-radius: 99px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.8);
    position: relative;
    overflow: hidden;
}

.hud-hp-fill::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressShine 2.5s infinite;
}

.hud-shield-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #1d4ed8 0%, #3b82f6 50%, #1d4ed8 100%);
    border-radius: 99px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 14px rgba(59, 130, 246, 0.8);
    overflow: hidden;
}

.hud-shield-fill::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progressShine 2.5s infinite 1.25s;
}

@keyframes progressShine {
    0% { left: -100%; }
    40%, 100% { left: 100%; }
}

.hud-hp-val {
    font-size: 0.75rem;
    font-weight: 800;
    font-family: 'Orbitron', sans-serif;
    position: absolute;
    width: 100%;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    z-index: 10;
}


/* Boss HP HUD Container Overlay */
.boss-hp-hud-container {
    position: absolute;
    left: 50%;
    top: 90px;
    transform: translateX(-50%);
    width: 480px;
    background: rgba(15, 23, 42, 0.85);
    border: 2px solid #ef4444;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.5);
    z-index: 50;
    animation: alertPulse 2s infinite;
}

.boss-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.boss-name-tag {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    color: #ef4444;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}

.boss-hp-val {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
}

.boss-hp-bar-bg {
    width: 100%;
    height: 12px;
    background: rgba(220, 38, 38, 0.15);
    border-radius: 6px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    overflow: hidden;
}

.boss-hp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
    box-shadow: 0 0 10px #ef4444;
    transition: width 0.2s ease-out;
}

@keyframes alertPulse {
    0%, 100% { border-color: #ef4444; box-shadow: 0 0 20px rgba(239, 68, 68, 0.4); }
    50% { border-color: #f87171; box-shadow: 0 0 35px rgba(239, 68, 68, 0.7); }
}


/* Center Play Canvas Frame */
.game-main-area {
    grid-row: 2;
    grid-column: 2;
    position: relative;
    background: #03050d;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
}


/* Right Power-up Panel */
.game-sidebar-right {
    grid-row: 2 / 4;
    grid-column: 3;
    background: linear-gradient(180deg, rgba(11, 15, 30, 0.9) 0%, rgba(6, 8, 20, 0.95) 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 25;
    box-shadow: -4px 0 25px rgba(0, 0, 0, 0.5);
}

.powerups-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.75rem;
}

.powerup-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Premium Skill Cards */
.powerup-card {
    position: relative;
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.powerup-card:hover {
    transform: translateX(-4px) scale(1.02);
}

.powerup-card.freeze:hover { border-color: #06b6d4; box-shadow: 0 0 20px rgba(6, 182, 212, 0.25); background: rgba(6, 182, 212, 0.05); }
.powerup-card.bomb:hover { border-color: #f97316; box-shadow: 0 0 20px rgba(249, 115, 22, 0.25); background: rgba(249, 115, 22, 0.05); }
.powerup-card.shield:hover { border-color: #3b82f6; box-shadow: 0 0 20px rgba(59, 130, 246, 0.25); background: rgba(59, 130, 246, 0.05); }
.powerup-card.double:hover { border-color: #a855f7; box-shadow: 0 0 20px rgba(168, 85, 247, 0.25); background: rgba(168, 85, 247, 0.05); }

.powerup-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.powerup-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.3s;
}

.powerup-card.freeze .powerup-icon { color: #06b6d4; background: rgba(6, 182, 212, 0.15); border: 1px solid rgba(6, 182, 212, 0.3); }
.powerup-card.bomb .powerup-icon { color: #f97316; background: rgba(249, 115, 22, 0.15); border: 1px solid rgba(249, 115, 22, 0.3); }
.powerup-card.shield .powerup-icon { color: #3b82f6; background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); }
.powerup-card.double .powerup-icon { color: #a855f7; background: rgba(168, 85, 247, 0.15); border: 1px solid rgba(168, 85, 247, 0.3); }

.powerup-name {
    font-weight: 800;
    font-size: 0.95rem;
    color: #f8fafc;
}

.powerup-desc {
    font-size: 0.75rem;
    color: #64748b;
}

.powerup-count {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
}

.powerup-count span {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 900;
}

.hotkey-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255,255,255,0.15);
    color: #94a3b8;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 0.05rem 0.35rem;
    font-family: monospace;
}

/* Circular Cooldown Sweep Spinner Overlay */
.cooldown-spinner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(1px);
    z-index: 10;
    pointer-events: none;
    border-bottom: 2px solid rgba(59, 130, 246, 0.65);
}


/* Bottom Dashboard Grid Layout (Three Columns) */
.game-bottom-panel {
    grid-row: 3;
    grid-column: 1 / 4; /* Stretch across entire width of screen */
    background: linear-gradient(180deg, rgba(8, 12, 28, 0.95) 0%, rgba(4, 6, 16, 0.98) 100%);
    border-top: 2px solid rgba(59, 130, 246, 0.15);
    backdrop-filter: blur(20px);
    padding: 0.4rem 1.75rem;
    display: grid;
    grid-template-columns: 280px 1fr 340px; /* Aligns with sidebar widths */
    gap: 1.5rem;
    z-index: 25;
    box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.6);
}

.bottom-card-col {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.bottom-card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.35rem;
    text-transform: uppercase;
}

/* Column 1: Game Modes Card Grid */
.modes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.mode-card {
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.mode-card:hover {
    transform: translateY(-2px);
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(59, 130, 246, 0.3);
}

.mode-card.active {
    background: rgba(16, 185, 129, 0.08);
    border-color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

.mode-card.active .mode-icon {
    color: #10b981;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.mode-icon {
    font-size: 1.15rem;
    margin-bottom: 0.15rem;
}

.mode-card.blue .mode-icon { color: #3b82f6; }
.mode-card.green .mode-icon { color: #10b981; }
.mode-card.orange .mode-icon { color: #f97316; }
.mode-card.purple .mode-icon { color: #a855f7; }
.mode-card.blue-light .mode-icon { color: #06b6d4; }
.mode-card.red .mode-icon { color: #ef4444; }

.mode-name {
    font-size: 0.65rem;
    font-weight: 800;
    color: #e2e8f0;
    letter-spacing: 0.03em;
}

/* Column 2: Boss Fight Card Details */
.boss-fight-card-body {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: rgba(220, 38, 38, 0.03);
    border: 1px solid rgba(239, 68, 68, 0.08);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    height: 100%;
}

.boss-fight-avatar {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 100%);
    border: 2px solid #ef4444;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.boss-fight-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.boss-name {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 0.95rem;
    color: #ef4444;
    letter-spacing: 0.05em;
}

.boss-hp-metric-bar {
    width: 100%;
    height: 14px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.boss-hp-fill-amt {
    height: 100%;
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.boss-hp-lbl-overlay {
    position: absolute;
    width: 100%;
    text-align: center;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    font-weight: 800;
    font-family: 'Orbitron', sans-serif;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.boss-lock-word {
    font-family: monospace;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    margin: 0.1rem 0;
}

.boss-lock-word span.typed {
    color: #10b981;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.boss-lock-word span.untyped {
    color: #ffffff;
}

.boss-row-telemetry {
    display: flex;
    gap: 0.85rem;
    font-size: 0.65rem;
    color: #64748b;
    font-weight: bold;
}

.boss-row-telemetry div span {
    color: #ffffff;
    font-family: 'Orbitron', sans-serif;
}

/* Column 3: Leaderboard Column list */
.leaderboard-tabs-row {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.leaderboard-tabs-row .tab {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255,255,255,0.03);
    color: #64748b;
    padding: 0.2rem 0.6rem;
    font-size: 0.65rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
}

.leaderboard-tabs-row .tab.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #3b82f6;
}

.leaderboard-rows-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-height: 120px;
    overflow-y: auto;
}

.lead-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255,255,255,0.02);
    border-radius: 6px;
}

.lead-row.lead-self {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.25);
}

.lead-rank {
    width: 22px;
    font-weight: 800;
    color: #94a3b8;
}

.lead-name {
    flex: 1;
    font-weight: 600;
    color: #f1f5f9;
}

.lead-flag {
    margin-right: 0.75rem;
}

.lead-score {
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    color: #3b82f6;
}

.lead-row.lead-self .lead-score {
    color: #10b981;
}

/* Centered Input box overlaying the canvas */
.canvas-input-overlay-aaa {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 440px;
    background: rgba(8, 12, 28, 0.85);
    border: 2px solid #00f0ff;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.35);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 100;
    pointer-events: none;
}

.active-word-box {
    font-family: 'Orbitron', monospace;
    font-size: 1.6rem;
    font-weight: bold;
    letter-spacing: 0.15em;
    color: #ffffff;
    display: flex;
    align-items: center;
}

.active-word-box span.typed {
    color: #10b981;
    text-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.active-word-box span.untyped {
    opacity: 0.85;
}

.pulse-cursor {
    color: #00f0ff;
    animation: cursorBlink 0.8s steps(2, start) infinite;
    margin-left: 0.15rem;
}

@keyframes cursorBlink {
    to { visibility: hidden; }
}

.typing-stats-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    width: 100%;
    justify-content: center;
}

.stat-badge {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #94a3b8;
}

.stat-badge i { font-size: 0.75rem; }
.stat-badge.wpm i { color: #fbbf24; }
.stat-badge.acc i { color: #f87171; }
.stat-badge.mis i { color: #ef4444; }
.stat-badge.cpm i { color: #10b981; }

.stat-badge span {
    color: #ffffff;
    font-family: 'Orbitron', sans-serif;
}

/* Upgraded Sidebar Left Logo */
.sidebar-logo-aaa {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.shield-logo-graphic {
    font-size: 2.2rem;
    color: #2563eb;
    filter: drop-shadow(0 0 8px rgba(37,99,235,0.6));
    margin-bottom: 0.25rem;
}

.logo-text-wrap {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

.logo-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    color: #3b82f6;
    letter-spacing: 0.12em;
    margin-top: 0.1rem;
}

.logo-motto {
    font-size: 0.55rem;
    color: #64748b;
    font-weight: 800;
    letter-spacing: 0.1em;
    margin-top: 0.35rem;
}

/* Sidebar play orange button */
.sidebar-btn-play {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    border: none;
    padding: 0.9rem 1.25rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(234, 88, 12, 0.45);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-btn-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(234, 88, 12, 0.65);
}

.sidebar-bottom-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 1.25rem;
    margin-top: auto;
}

.lang-selector {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.ctrl-icon-btn {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ctrl-icon-btn:hover {
    color: #ffffff;
    background: #2563eb;
    border-color: #3b82f6;
}

/* Sidebar power-up footer buttons */
.sidebar-btn-more {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff;
    border: none;
    padding: 0.75rem;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(109, 40, 217, 0.4);
    width: 100%;
    margin-top: auto;
    transition: all 0.25s;
}

.sidebar-btn-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(109, 40, 217, 0.6);
}

/* Top Pause icon button */
.hud-pause-btn {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    pointer-events: auto;
    margin-left: auto;
}

.hud-pause-btn:hover {
    background: #dc2626;
    border-color: #ef4444;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.45);
}

/* Footer row details */
.dashboard-footer-row {
    grid-row: 4;
    grid-column: 1 / 4; /* span entire width */
    background: #04060f;
    border-top: 1px solid rgba(255,255,255,0.04);
    padding: 0.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.footer-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.65rem;
}

.footer-badge i {
    font-size: 1.1rem;
    color: #fbbf24;
}

.footer-badge div h4 {
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.footer-badge div p {
    color: #64748b;
    margin: 0;
}

/* Adjusted main layout config for grid row counts */
.game-play-container {
    grid-template-rows: 65px 1fr 140px 30px; /* Stats HUD, Canvas main, Dashboard panel, Footer bar */
}

/* Responsive Overrides */
@media (max-width: 1200px) {
    .game-bottom-panel {
        grid-template-columns: 240px 1fr;
    }
    .leaderboard-col {
        display: none !important;
    }
}
.mobile-floating-controls {
    display: none;
}

@media (max-width: 1024px) {
    .game-play-container {
        grid-template-columns: 1fr !important;
        grid-template-rows: 70px 1fr !important;
    }
    .game-sidebar-left, .game-sidebar-right, .game-bottom-panel, .dashboard-footer-row {
        display: none !important;
    }
    .game-main-area {
        grid-row: 2 !important;
        grid-column: 1 !important;
        border: none !important;
        width: 100% !important;
        height: 100% !important;
        position: relative;
    }
    .game-hud-top {
        grid-row: 1 !important;
        grid-column: 1 !important;
        padding: 0 0.5rem !important;
        gap: 0.5rem !important;
        height: 70px !important;
        overflow-x: auto;
        justify-content: flex-start !important;
        scrollbar-width: none;
        pointer-events: auto !important;
    }
    .game-hud-top::-webkit-scrollbar {
        display: none;
    }
    .hud-card {
        padding: 0.25rem 0.5rem !important;
        height: 38px !important;
        font-size: 0.8rem !important;
        flex-shrink: 0 !important;
    }
    .hud-card-icon {
        font-size: 0.95rem !important;
    }
    .hud-card-value {
        font-size: 0.85rem !important;
    }
    .hud-hp-bar-bg {
        width: 60px !important;
    }
    
    /* Display and style mobile floating controls */
    .mobile-floating-controls {
        display: flex !important;
        position: absolute;
        bottom: 20px;
        right: 20px;
        gap: 12px;
        z-index: 100;
        pointer-events: auto !important;
    }
    .mobile-float-btn {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        border: 2px solid rgba(255, 255, 255, 0.2);
        background: rgba(15, 23, 42, 0.75);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        color: white;
        font-size: 1.25rem;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
        transition: all 0.2s ease;
    }
    .mobile-float-btn:active {
        transform: scale(0.9);
        background: #3b82f6;
        border-color: white;
    }
}

/* Glassmorphic Pause Overlay Modal styling */
.pause-overlay-aaa {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(4, 6, 15, 0.78);
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.pause-modal-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.75) 0%, rgba(15, 23, 42, 0.85) 100%);
    border: 1px solid rgba(59, 130, 246, 0.28);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.65), 0 0 25px rgba(59, 130, 246, 0.18);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    max-width: 440px;
    width: 90%;
    animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pause-icon-glow {
    font-size: 2.8rem;
    color: #3b82f6;
    text-shadow: 0 0 18px rgba(59, 130, 246, 0.7);
    margin-bottom: 1.25rem;
    animation: pausePulse 2s infinite ease-in-out;
}

.pause-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.05em;
    margin: 0 0 0.75rem 0;
}

.pause-subtitle {
    font-size: 0.95rem;
    color: #94a3b8;
    margin: 0 0 1.75rem 0;
    line-height: 1.6;
}

.pause-resume-btn {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
    border: none;
    color: #ffffff;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0.85rem 2.25rem;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
    transition: all 0.2s ease-out;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.pause-resume-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.65);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pausePulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* Smooth transition overrides for all health and shield fills */
.hud-hp-fill, .hud-shield-fill, .boss-hp-bar-fill, .boss-hp-fill-amt {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

