/* ===========================================
   SPYVMERC - Clean Tactical Shooter
   Neutral, readable, modern aesthetic
   =========================================== */

:root {
    /* Core Palette - Neutral Warm Grays */
    --bg-void: #121212;
    --bg-dark: #1a1a1a;
    --bg-card: rgba(26, 26, 26, 0.95);
    --bg-elevated: rgba(38, 38, 38, 0.9);
    
    /* Primary - Warm Amber accent */
    --primary: #e8a84c;
    --primary-dim: #b8823a;
    --primary-glow: rgba(232, 168, 76, 0.25);
    
    /* Secondary - Cool Steel */
    --secondary: #7a8b9a;
    --secondary-dim: #5a6b7a;
    
    /* Feedback colors - Clear & distinct */
    --success: #5cb85c;
    --danger: #d9534f;
    --warning: #f0ad4e;
    --info: #5bc0de;
    
    /* Text - High contrast */
    --text-white: #f5f5f5;
    --text-gray: rgba(245, 245, 245, 0.7);
    --text-muted: rgba(245, 245, 245, 0.4);
    
    /* UI Elements */
    --border: rgba(255, 255, 255, 0.08);
    --border-bright: rgba(255, 255, 255, 0.15);
    
    /* Fonts */
    --font-display: 'Bebas Neue', Impact, sans-serif;
    --font-body: 'Exo 2', system-ui, sans-serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
    
    /* Safe areas for mobile */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --touch-min: 44px;
}

/* ==================== RESET ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-body);
    background: var(--bg-void);
    color: var(--text-white);
    -webkit-font-smoothing: antialiased;
    touch-action: manipulation;
}

/* ==================== UTILITIES ==================== */
.hidden {
    display: none !important;
}

/* ==================== SCREENS ==================== */
.screen {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 100;
}

.screen.active {
    display: flex;
}

/* ==================== BACKGROUNDS ==================== */
.menu-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% 120%, rgba(232, 168, 76, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(122, 139, 154, 0.06) 0%, transparent 40%),
        linear-gradient(180deg, var(--bg-void) 0%, var(--bg-dark) 100%);
    z-index: -1;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
    opacity: 0.5;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.08;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -150px;
    right: -150px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    bottom: -100px;
    left: -100px;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #ffffff;
    opacity: 0.03;
    top: 40%;
    left: 30%;
}

.screen-bg {
    position: absolute;
    inset: 0;
    background: var(--bg-dark);
    z-index: -1;
}

.cyber-bg {
    background: 
        radial-gradient(ellipse at center, rgba(232, 168, 76, 0.03) 0%, transparent 70%),
        var(--bg-dark);
}

/* ==================== MENU SCREEN - FORTNITE-STYLE LOBBY ==================== */
#menu-screen {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

#menu-screen.active {
    display: flex;
}

/* Top Navigation Bar */
.lobby-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    padding-top: max(var(--space-md), var(--safe-top));
    background: linear-gradient(180deg, rgba(5, 5, 10, 0.9) 0%, transparent 100%);
}

.lobby-top-left {
    display: flex;
    gap: var(--space-sm);
}

.lobby-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.lobby-nav-btn:hover {
    background: rgba(232, 168, 76, 0.1);
    border-color: var(--primary);
    color: var(--text-white);
    transform: translateY(-2px);
}

.lobby-nav-btn .nav-icon {
    font-size: 1.4rem;
}

.lobby-nav-btn .nav-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
}

.lobby-top-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Main Lobby Content - Container for layout reference */
.lobby-content {
    position: relative;
    z-index: 5;
    display: flex;
    flex: 1;
    pointer-events: none;
}

.lobby-content > * {
    pointer-events: auto;
}

/* Left Panel - Season Info */
.lobby-left-panel {
    position: fixed;
    top: 100px;
    left: var(--space-lg);
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding: var(--space-md);
    z-index: 15;
}

.season-info {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: var(--space-lg);
    backdrop-filter: blur(10px);
}

.season-chapter {
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--primary);
}

.season-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    letter-spacing: 0.1em;
    color: var(--text-white);
    margin: var(--space-xs) 0;
    line-height: 1;
}

.player-level-section {
    margin-top: var(--space-md);
}

.level-badge-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.level-badge {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    background: var(--bg-elevated);
    padding: 2px 8px;
    border-radius: 4px;
}

.xp-progress-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.xp-progress-container .xp-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.xp-progress-container .xp-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-dim), var(--primary));
    border-radius: 3px;
    transition: width 0.5s ease-out;
    box-shadow: 0 0 10px var(--primary-glow);
}

.xp-progress-container .xp-text {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: right;
}

.level-number {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary);
}

/* Quick Actions / Challenges */
.quick-actions {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: var(--space-md);
    backdrop-filter: blur(10px);
}

.section-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--primary);
    margin-bottom: var(--space-md);
}

.challenge-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.challenge-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    transition: background 0.2s ease;
}

.challenge-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.challenge-icon {
    font-size: 1.2rem;
    width: 32px;
    text-align: center;
}

.challenge-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.challenge-name {
    font-size: 0.8rem;
    color: var(--text-white);
}

.challenge-reward {
    font-size: 0.7rem;
    color: var(--success);
}

.challenge-progress {
    font-family: var(--font-display);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Center - Character Display & Party */
.lobby-center {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.lobby-center > * {
    pointer-events: auto;
}

/* Player Name Tag */
.player-name-tag {
    position: fixed;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    z-index: 15;
}

.player-name-display {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 0.15em;
    color: var(--text-white);
    text-align: center;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.player-status {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--danger);
    padding: 4px 12px;
    background: rgba(217, 83, 79, 0.2);
    border-radius: 4px;
}

.player-status.ready {
    color: var(--success);
    background: rgba(92, 184, 92, 0.2);
}

/* Old Player Level Display styles removed - now in left panel */

.xp-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.xp-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-dim), var(--primary));
    border-radius: 2px;
    transition: width 0.5s ease-out;
    box-shadow: 0 0 8px var(--primary-glow);
}

.xp-text {
    font-family: var(--font-body);
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Challenge Item States */
.challenge-item {
    transition: all 0.3s ease;
}

.challenge-item.completed {
    opacity: 0.6;
}

.challenge-item.completed .challenge-progress {
    color: var(--success);
    font-weight: bold;
}

.challenge-item.completed::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--text-muted);
    opacity: 0.3;
}

/* XP Popup Animation */
@keyframes xpPopup {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-30px) scale(1.2);
        opacity: 0;
    }
}

.xp-popup {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
    animation: xpPopup 1.5s ease-out forwards;
    pointer-events: none;
    z-index: 100;
}

/* Level Up Animation */
@keyframes levelUp {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
        filter: brightness(1.5);
    }
    100% {
        transform: scale(1);
    }
}

.level-number.level-up {
    animation: levelUp 0.6s ease-out;
    color: var(--success);
}

/* Party Container - Full screen overlay for slot positioning */
.party-container {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 12;
}

.party-slots-side {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    pointer-events: auto;
}

.party-left {
    left: 25%;
    top: 50%;
    transform: translateY(-50%);
}

.party-right {
    right: 25%;
    top: 50%;
    transform: translateY(-50%);
}

.character-spotlight {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 400px;
    pointer-events: none;
}

/* Make the lobby-bg fill the entire screen */
.lobby-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: 
        radial-gradient(ellipse 120% 80% at 50% 100%, rgba(232, 168, 76, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 80% 60% at 30% 20%, rgba(85, 136, 204, 0.06) 0%, transparent 40%),
        radial-gradient(ellipse 60% 50% at 70% 30%, rgba(85, 136, 204, 0.04) 0%, transparent 35%),
        linear-gradient(180deg, #05050a 0%, #0a0a14 50%, #08080f 100%);
    overflow: hidden;
}

.lobby-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 50% 80%, rgba(232, 168, 76, 0.12) 0%, transparent 35%),
        radial-gradient(circle at 50% 120%, rgba(232, 168, 76, 0.15) 0%, transparent 40%);
    pointer-events: none;
    animation: lobbyPulse 4s ease-in-out infinite;
}

@keyframes lobbyPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.lobby-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.01) 2px,
            rgba(255, 255, 255, 0.01) 4px
        );
    pointer-events: none;
    opacity: 0.5;
}

#lobby-canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
    z-index: 1;
    cursor: grab;
}

#lobby-canvas:active {
    cursor: grabbing;
}

/* Vignette effect overlay */
.lobby-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Force hide the blue thing in front */
.lobby-gradient-overlay {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Character spotlight glow effect */
.character-spotlight-glow {
    position: fixed;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(232, 168, 76, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 3;
    animation: spotlightPulse 3s ease-in-out infinite;
}

@keyframes spotlightPulse {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* Party Slot */
.party-slot {
    position: relative;
    width: 120px;
    height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.party-slot:hover {
    transform: scale(1.08);
    background: rgba(232, 168, 76, 0.1);
}

.party-slot:hover .slot-ring {
    border-color: var(--primary);
    box-shadow: 0 0 25px var(--primary-glow);
}

.slot-ring {
    position: absolute;
    width: 90px;
    height: 90px;
    border: 2px dashed var(--border-bright);
    border-radius: 50%;
    transition: all 0.3s ease;
    top: 15px;
}

.slot-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    z-index: 1;
    margin-top: 5px;
}

.slot-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.party-slot:hover .slot-icon {
    color: var(--primary);
}

.slot-label {
    position: absolute;
    bottom: 8px;
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* Filled party slot */
.party-slot.filled .slot-ring {
    border-style: solid;
    border-color: var(--info);
}

.party-slot.filled .slot-icon {
    display: none;
}

.party-slot.filled.is-leader .slot-ring {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.party-slot.filled.is-me .slot-ring {
    border-color: var(--success);
}

.party-slot .slot-member-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: var(--space-xs);
}

.party-slot .slot-member-name {
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--text-white);
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.party-slot .slot-member-status {
    font-size: 0.6rem;
    color: var(--danger);
    letter-spacing: 0.05em;
}

.party-slot .slot-member-status.ready {
    color: var(--success);
}

.party-slot .kick-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: rgba(217, 83, 79, 0.8);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.party-slot:hover .kick-btn {
    opacity: 1;
}

.party-slot .kick-btn:hover {
    background: var(--danger);
}

/* Party status indicator */
.party-status-indicator {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    padding: var(--space-sm) var(--space-lg);
    border-radius: 20px;
    border: 1px solid var(--primary);
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--primary);
    animation: pulse 1.5s ease-in-out infinite;
    z-index: 100;
}

/* Play button as member (ready button) */
.btn-matchmaking.is-member {
    background: linear-gradient(135deg, #5cb85c 0%, #449d44 100%);
}

.btn-matchmaking.is-member:hover {
    background: linear-gradient(135deg, #6ec96e 0%, #5cb85c 100%);
}

.party-slot.filled .slot-label {
    color: var(--text-white);
}

.party-slot.filled .slot-content {
    background: radial-gradient(circle, rgba(91, 192, 222, 0.2) 0%, transparent 70%);
}

/* Party slot member info */
.slot-member-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.slot-member-name {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--text-white);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.slot-member-status {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.slot-member-status.ready {
    color: var(--success);
}

/* Right Panel - Game Mode */
.lobby-right-panel {
    position: fixed;
    top: 100px;
    right: var(--space-lg);
    width: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: var(--space-md);
    z-index: 15;
}

/* Bottom Bar */
.lobby-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    padding-bottom: max(var(--space-lg), var(--safe-bottom));
    background: linear-gradient(0deg, rgba(5, 5, 10, 0.9) 0%, transparent 100%);
}

.lobby-bottom-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.party-code-display {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    border-radius: 8px;
    backdrop-filter: blur(8px);
}

.party-code-label {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.party-code {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    color: var(--primary);
}

.copy-code-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.copy-code-btn:hover {
    opacity: 1;
}

.btn-small {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.8rem;
}

.lobby-bottom-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.lobby-bottom-right {
    display: flex;
    align-items: center;
}

/* Matchmaking Button */
.btn-matchmaking {
    position: relative;
    width: 160px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary) 0%, #d4942a 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-matchmaking:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 40px var(--primary-glow);
}

.btn-matchmaking:active {
    transform: scale(0.98);
}

.matchmaking-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.matchmaking-icon {
    font-size: 1.8rem;
    color: var(--bg-void);
}

.matchmaking-text {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 0.15em;
    color: var(--bg-void);
}

.matchmaking-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-matchmaking:hover .matchmaking-glow {
    opacity: 1;
}

/* Matchmaking Container */
.matchmaking-container {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-matchmaking.searching {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    pointer-events: none;
}

.btn-matchmaking.disabled {
    background: linear-gradient(135deg, #3a3a4a 0%, #2a2a35 100%);
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(0.8);
    box-shadow: none !important;
    transform: none !important;
    animation: none !important;
}

.btn-matchmaking.searching .matchmaking-content {
    opacity: 0;
}

.btn-matchmaking.searching .matchmaking-spinner {
    display: block;
}

.matchmaking-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.matchmaking-spinner.hidden {
    display: none !important;
}

.btn-cancel-queue {
    width: 50px;
    height: 50px;
    background: rgba(217, 83, 79, 0.2);
    border: 2px solid var(--danger);
    border-radius: 12px;
    color: var(--danger);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-cancel-queue:hover {
    background: rgba(217, 83, 79, 0.4);
    transform: scale(1.05);
}

.btn-cancel-queue.hidden {
    display: none !important;
}

.queue-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: var(--space-xs);
    animation: fadeIn 0.3s ease;
}

.queue-timer.hidden {
    display: none !important;
}

.queue-time {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--primary);
    letter-spacing: 0.05em;
}

.queue-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Party Modal */
.party-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.party-modal.active {
    display: flex;
}

.party-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: var(--space-xl);
    text-align: center;
    min-width: 320px;
    animation: modalSlideIn 0.3s ease-out;
}

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

.party-modal-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    color: var(--text-white);
    margin-bottom: var(--space-lg);
}

.party-modal-content input {
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-elevated);
    border: 2px solid var(--border-bright);
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.3em;
    color: var(--text-white);
    text-align: center;
    text-transform: uppercase;
    margin-bottom: var(--space-lg);
}

.party-modal-content input:focus {
    outline: none;
    border-color: var(--primary);
}

.party-modal-buttons {
    display: flex;
    gap: var(--space-md);
}

.party-modal-buttons .btn {
    flex: 1;
}

/* ==================== ACCOUNT BUTTON ==================== */
.account-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--space-xs) var(--space-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.account-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
}

.account-avatar {
    font-size: 1.5rem;
}

.account-name {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--text-white);
    letter-spacing: 0.05em;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-btn.logged-in {
    border-color: var(--success);
}

.account-btn.logged-in .account-avatar {
    color: var(--success);
}

/* ==================== MODAL OVERLAY ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 10, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.2s ease;
}

.modal-overlay.hidden {
    display: none !important;
}

.modal {
    background: linear-gradient(180deg, rgba(30, 30, 40, 0.98) 0%, rgba(20, 20, 28, 0.99) 100%);
    border: 1px solid var(--border-bright);
    border-radius: 16px;
    padding: var(--space-xl);
    min-width: 380px;
    max-width: 500px;
    position: relative;
    animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s ease;
    padding: var(--space-xs);
}

.modal-close:hover {
    color: var(--danger);
}

.modal-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    letter-spacing: 0.15em;
    color: var(--primary);
}

/* ==================== AUTH MODAL ==================== */
.auth-modal {
    min-width: 360px;
}

.modal-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 4px;
}

.modal-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-tab:hover {
    color: var(--text-white);
}

.modal-tab.active {
    background: var(--primary);
    color: var(--bg-void);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.auth-form.hidden {
    display: none;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.form-group input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: var(--space-md);
    color: var(--text-white);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.btn-full {
    width: 100%;
    margin-top: var(--space-sm);
}

.auth-error {
    color: var(--danger);
    font-size: 0.85rem;
    text-align: center;
    padding: var(--space-sm);
    background: rgba(217, 83, 79, 0.1);
    border-radius: 6px;
}

.auth-error.hidden {
    display: none;
}

.auth-footer {
    margin-top: var(--space-lg);
    text-align: center;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}

.auth-footer.hidden {
    display: none;
}

.auth-success {
    color: var(--success);
    font-size: 0.85rem;
    text-align: center;
    padding: var(--space-sm);
    background: rgba(92, 184, 92, 0.1);
    border-radius: 6px;
}

.auth-success.hidden {
    display: none;
}

/* Profile Management Section */
.profile-header {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--border);
}

.profile-avatar-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.profile-avatar-display {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: 3px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.avatar-picker {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    max-width: 180px;
    justify-content: center;
}

.avatar-option {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.avatar-option:hover {
    border-color: var(--primary-dim);
    transform: scale(1.1);
}

.avatar-option.selected {
    border-color: var(--primary);
    background: rgba(232, 168, 76, 0.2);
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.profile-username {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text-white);
    letter-spacing: 0.05em;
}

.profile-email {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.form-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-md) 0;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.form-divider span {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.form-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.btn-danger {
    background: rgba(217, 83, 79, 0.2);
    border: 1px solid var(--danger);
    color: var(--danger);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: var(--space-md) var(--space-lg);
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.btn-danger:hover {
    background: var(--danger);
    color: var(--bg-void);
}

#profile-form {
    max-height: 70vh;
    overflow-y: auto;
}

/* Player Name Tag styles moved to plain text display */

/* ==================== LEADERBOARD MODAL ==================== */
.leaderboard-modal {
    min-width: 450px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.leaderboard-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.lb-tab {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: var(--space-sm);
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lb-tab:hover {
    border-color: var(--primary-dim);
    color: var(--text-white);
}

.lb-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg-void);
}

.leaderboard-content {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.leaderboard-loading {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

.lb-entry {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    transition: background 0.2s ease;
}

.lb-entry:hover {
    background: rgba(0, 0, 0, 0.3);
}

.lb-entry.top-3 {
    background: rgba(232, 168, 76, 0.1);
    border: 1px solid rgba(232, 168, 76, 0.3);
}

.lb-entry.you {
    background: rgba(92, 184, 92, 0.1);
    border: 1px solid rgba(92, 184, 92, 0.3);
}

.lb-rank {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-muted);
    min-width: 40px;
    text-align: center;
}

.lb-entry.top-3 .lb-rank {
    color: var(--primary);
}

.lb-rank-1 { color: #ffd700 !important; }
.lb-rank-2 { color: #c0c0c0 !important; }
.lb-rank-3 { color: #cd7f32 !important; }

.lb-avatar {
    font-size: 1.5rem;
}

.lb-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lb-name {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--text-white);
    letter-spacing: 0.03em;
}

.lb-tier {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.lb-stats {
    text-align: right;
}

.lb-points {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--primary);
}

.lb-kd {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.leaderboard-footer {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}

.your-rank {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: rgba(232, 168, 76, 0.1);
    border: 1px solid rgba(232, 168, 76, 0.3);
    border-radius: 8px;
}

.your-rank-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.your-rank-value {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--primary);
}

/* Legacy Support - Keep menu-row for compatibility */
.menu-row {
    display: flex;
    gap: var(--space-md);
}

.menu-row .btn {
    flex: 1;
}

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

/* Logo styles (kept for other screens) */
.logo-container {
    text-align: center;
}

.logo {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 12vw, 8rem);
    line-height: 0.9;
    letter-spacing: 0.05em;
    display: flex;
    gap: 0.05em;
}

.logo-dual {
    color: var(--text-white);
}

.logo-edge {
    color: var(--primary);
}

.tagline {
    font-family: var(--font-body);
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    font-weight: 400;
    letter-spacing: 0.3em;
    color: var(--text-muted);
    margin-top: var(--space-md);
    text-transform: uppercase;
}

/* Responsive Lobby */
@media (max-width: 1200px) {
    .lobby-left-panel,
    .lobby-right-panel {
        width: 220px;
    }
    
    .season-title {
        font-size: 2rem;
    }
    
    .party-left {
        left: 15%;
    }
    
    .party-right {
        right: 15%;
    }
}

@media (max-width: 900px) {
    .lobby-left-panel {
        display: none;
    }
    
    .lobby-right-panel {
        position: fixed;
        top: 80px;
        right: var(--space-md);
        width: auto;
        z-index: 15;
    }
    
    .party-left {
        left: 5%;
    }
    
    .party-right {
        right: 5%;
    }
    
    .party-slot {
        width: 90px;
        height: 110px;
    }
    
    .slot-ring {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 600px) {
    .lobby-top-left {
        gap: var(--space-xs);
    }
    
    .lobby-nav-btn {
        padding: var(--space-xs) var(--space-sm);
    }
    
    .lobby-nav-btn .nav-label {
        display: none;
    }
    
    .party-slots-side {
        flex-direction: row;
        top: auto;
        bottom: 120px;
        transform: none;
    }
    
    .party-left {
        left: 10px;
    }
    
    .party-right {
        right: 10px;
    }
    
    .party-slot {
        width: 70px;
        height: 85px;
    }
    
    .slot-ring {
        width: 55px;
        height: 55px;
        top: 10px;
    }
    
    .slot-icon {
        font-size: 1.8rem;
    }
    
    .btn-matchmaking {
        width: 120px;
        height: 55px;
    }
    
    .matchmaking-text {
        font-size: 1.1rem;
    }
    
    .lobby-bottom-center {
        display: none;
    }
    
    .lobby-bottom-left {
    flex-direction: column;
        align-items: flex-start;
        gap: var(--space-xs);
    }
    
    .party-code-display {
        padding: var(--space-xs) var(--space-sm);
    }
    
    .player-name-tag {
        top: 15%;
    }
}

/* ==================== LOBBY ANIMATIONS ==================== */

/* Platform pulse animation */
@keyframes platformPulse {
    0%, 100% {
        box-shadow: 0 0 20px var(--primary-glow);
    }
    50% {
        box-shadow: 0 0 40px var(--primary-glow), 0 0 60px rgba(232, 168, 76, 0.2);
    }
}

/* Party slot hover animation */
@keyframes slotHover {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

.party-slot:hover {
    animation: slotHover 1s ease-in-out infinite;
}

/* Matchmaking button pulse */
@keyframes matchmakingPulse {
    0%, 100% {
        box-shadow: 0 4px 30px var(--primary-glow);
    }
    50% {
        box-shadow: 0 8px 50px var(--primary-glow), 0 0 80px rgba(232, 168, 76, 0.3);
    }
}

.btn-matchmaking {
    animation: matchmakingPulse 2s ease-in-out infinite;
}

/* Slot ring rotation for empty slots */
@keyframes slotRingRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.party-slot:not(.filled) .slot-ring {
    animation: slotRingRotate 20s linear infinite;
}

/* Entry animations for lobby elements */
.lobby-left-panel {
    animation: fadeSlideRight 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.lobby-right-panel {
    animation: fadeSlideLeft 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.lobby-bottom-bar {
    animation: fadeSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.lobby-top-bar {
    animation: fadeSlideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

@keyframes fadeSlideRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Player status badge animations */
.player-status {
    transition: all 0.3s ease;
}

.player-status.ready {
    animation: readyPulse 1.5s ease-in-out infinite;
}

@keyframes readyPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(92, 184, 92, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(92, 184, 92, 0.8);
    }
}

input[type="text"] {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-bright);
    border-radius: 8px;
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

input[type="text"]::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

/* Buttons */
.btn {
    position: relative;
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    min-height: var(--touch-min);
}

.btn-primary {
    background: var(--primary);
    color: var(--bg-void);
    font-weight: 700;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--primary-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-glow {
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-white);
    border: 1px solid var(--border-bright);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-gray);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    color: var(--primary);
    border-color: var(--border);
}

.btn-icon {
    font-size: 1.1em;
}

.btn-icon-only {
    width: 50px;
    height: 50px;
    padding: 0;
    font-size: 1.5rem;
    border-radius: 50%;
}

/* Credits Display */
/* Currency Displays */
.credits-display,
.currency-display {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border-radius: 100px;
    border: 1px solid var(--border);
}

.credits-display.large {
    padding: var(--space-md) var(--space-lg);
}

.credits-icon,
.currency-icon {
    font-size: 1.2rem;
}

.credits-amount,
.currency-amount {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-white);
    letter-spacing: 0.05em;
}

/* Dual currency display container */
.currency-displays {
    display: flex;
    gap: var(--space-sm);
}

.currency-display.coins {
    border-color: rgba(255, 193, 7, 0.25);
    background: rgba(255, 193, 7, 0.08);
}

.currency-display.coins .currency-amount {
    color: #ffc107;
}

.currency-display.diamonds {
    border-color: rgba(77, 166, 255, 0.25);
    background: rgba(77, 166, 255, 0.08);
}

.currency-display.diamonds .currency-amount {
    color: #4da6ff;
}

/* ==================== LOADOUT - FULL PAGE REDESIGN ==================== */

#ability-screen {
    flex-direction: column;
    overflow: hidden;
}

#ability-screen.active {
    display: flex;
}

.loadout-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 50% 40% at 20% 50%, rgba(232, 168, 76, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 80% 50%, rgba(77, 166, 255, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, #0a0a0f 0%, #12121a 100%);
    z-index: -1;
}

.loadout-full-page {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Loadout Header */
.loadout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.loadout-title {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.15em;
    color: var(--text-white);
}

/* Loadout Main Grid */
.loadout-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: var(--space-lg);
    padding: var(--space-lg);
    overflow: hidden;
}

.loadout-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    overflow: hidden;
}

.skins-column {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: var(--space-md);
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.loadout-section-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.loadout-section-header .section-icon {
    font-size: 1.3rem;
}

.loadout-section-header h2 {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.15em;
    color: var(--primary);
}

/* Skin Preview */
.skin-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    background: rgba(232, 168, 76, 0.05);
    border: 2px solid var(--primary);
    border-radius: 12px;
    margin-bottom: var(--space-md);
}

.skin-preview .preview-icon {
    font-size: 4rem;
    filter: drop-shadow(0 0 15px var(--primary-glow));
}

.skin-preview .preview-name {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-top: var(--space-sm);
}

/* Skins Grid */
.skins-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    overflow-y: auto;
    flex: 1;
}

.skin-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm);
    background: var(--rarity-bg);
    border: 2px solid var(--rarity-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    aspect-ratio: 1;
}

.skin-item:hover:not(.locked) {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--rarity-color);
}

.skin-item.selected {
    box-shadow: 0 0 20px var(--rarity-color), inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.skin-item.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.skin-item .skin-icon {
    font-size: 1.8rem;
}

.skin-item .skin-name {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 4px;
}

.skin-item .skin-rarity {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: var(--rarity-color);
    border-radius: 50%;
}

/* Loadout Panel */
.loadout-panel {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: var(--space-md);
}

/* Weapon Selection */
.weapon-selection-row {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-md);
}

.selected-weapon-display {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-xl);
    background: rgba(232, 168, 76, 0.1);
    border: 2px solid var(--primary);
    border-radius: 12px;
}

.weapon-icon-big {
    font-size: 3rem;
    filter: drop-shadow(0 0 10px var(--primary-glow));
}

.weapon-name-big {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    color: var(--primary);
}

.weapon-grid-horizontal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
}

.loadout-weapon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.loadout-weapon-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-dim);
    transform: translateY(-2px);
}

.loadout-weapon-item.selected {
    background: rgba(232, 168, 76, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.loadout-weapon-icon {
    font-size: 1.8rem;
}

.loadout-weapon-name {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-gray);
}

.loadout-weapon-item.selected .loadout-weapon-name {
    color: var(--primary);
}

/* Ability Slots */
.ability-slots-row {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-md);
}

.selected-slot {
    width: 100px;
    height: 120px;
    background: var(--bg-card);
    border: 2px dashed var(--border-bright);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    cursor: pointer;
    transition: all 0.2s ease;
}

.selected-slot.large {
    width: 120px;
    height: 140px;
}

.selected-slot:hover {
    border-color: var(--primary);
}

.selected-slot.filled {
    border-style: solid;
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
}

.slot-key {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--primary);
}

.slot-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.slot-ability-display {
    font-size: 2rem;
}

/* Ability Grid Compact */
.ability-grid-compact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    max-height: 200px;
    overflow-y: auto;
}

.ability-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
}

.ability-card {
    position: relative;
    width: 80px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: var(--space-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ability-card:hover:not(.locked) {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.ability-card.selected {
    border-color: var(--success);
    background: rgba(92, 184, 92, 0.1);
    box-shadow: 0 0 15px rgba(92, 184, 92, 0.3);
}

.ability-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.ability-card.locked:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: none;
}

.ability-card .unlock-req {
    font-size: 0.55rem;
    color: var(--primary);
    background: rgba(232, 168, 76, 0.15);
    padding: 2px 6px;
    border-radius: 6px;
}

/* Ability rarity styling */
.ability-card.rarity-standard { border-color: rgba(176, 176, 176, 0.3); }
.ability-card.rarity-rare { border-color: rgba(77, 166, 255, 0.3); }
.ability-card.rarity-epic { border-color: rgba(180, 77, 255, 0.3); }
.ability-card.rarity-legendary { border-color: rgba(255, 149, 0, 0.3); }

.ability-card.rarity-standard:hover:not(.locked) { border-color: #b0b0b0; }
.ability-card.rarity-rare:hover:not(.locked) { border-color: #4da6ff; box-shadow: 0 0 15px rgba(77, 166, 255, 0.2); }
.ability-card.rarity-epic:hover:not(.locked) { border-color: #b44dff; box-shadow: 0 0 15px rgba(180, 77, 255, 0.2); }
.ability-card.rarity-legendary:hover:not(.locked) { border-color: #ff9500; box-shadow: 0 0 15px rgba(255, 149, 0, 0.2); }

.ability-rarity-badge {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 0.45rem;
    letter-spacing: 0.05em;
    padding: 1px 4px;
    border-radius: 3px;
}

.ability-rarity-badge.rarity-standard { background: rgba(176, 176, 176, 0.3); color: #b0b0b0; }
.ability-rarity-badge.rarity-rare { background: rgba(77, 166, 255, 0.3); color: #4da6ff; }
.ability-rarity-badge.rarity-epic { background: rgba(180, 77, 255, 0.3); color: #b44dff; }
.ability-rarity-badge.rarity-legendary { background: rgba(255, 149, 0, 0.3); color: #ff9500; }

.ability-card .icon {
    font-size: 1.5rem;
}

.ability-card .name {
    font-size: 0.6rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-gray);
}

/* Ability action type tags */
.ability-action-tag {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.45rem;
    letter-spacing: 0.03em;
    padding: 1px 4px;
    border-radius: 3px;
}

.jump-tag {
    background: rgba(92, 184, 92, 0.3);
    color: var(--success);
}

.action-tag {
    background: rgba(232, 168, 76, 0.3);
    color: var(--primary);
}

/* Screen Title & Subtitle */
.screen-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: 0.1em;
    color: var(--text-white);
}

.screen-subtitle {
    color: var(--text-gray);
    font-size: 1rem;
    letter-spacing: 0.1em;
}

/* Loadout Responsive */
@media (max-width: 1200px) {
    .loadout-main {
        grid-template-columns: 1fr 1fr;
    }
    
    .skins-column:last-child {
        grid-column: span 2;
    }
    
    .skins-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 768px) {
    .loadout-main {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }
    
    .skins-column:last-child {
        grid-column: span 1;
    }
    
    .skins-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .loadout-header {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
    
    .loadout-title {
        order: -1;
        width: 100%;
        text-align: center;
    }
}

/* ==================== SHOP - FULL PAGE REDESIGN ==================== */

/* Rarity Colors */
.rarity-standard { --rarity-color: #b0b0b0; --rarity-bg: rgba(176, 176, 176, 0.1); }
.rarity-rare { --rarity-color: #4da6ff; --rarity-bg: rgba(77, 166, 255, 0.1); }
.rarity-epic { --rarity-color: #b44dff; --rarity-bg: rgba(180, 77, 255, 0.1); }
.rarity-legendary { --rarity-color: #ff9500; --rarity-bg: rgba(255, 149, 0, 0.1); }

#shop-screen {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
}

#shop-screen.active {
    display: flex;
}

.shop-bg {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 60% 40% at 20% 80%, rgba(77, 166, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 50% 50% at 80% 20%, rgba(180, 77, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 40% 30% at 50% 50%, rgba(255, 149, 0, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, #0a0a0f 0%, #12121a 100%);
    z-index: -1;
}

.shop-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Shop Header Bar */
.shop-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.shop-close {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
}

.shop-title {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.15em;
    color: var(--text-white);
    text-shadow: 0 0 30px rgba(255, 149, 0, 0.3);
}

.shop-currencies {
    display: flex;
    gap: var(--space-md);
}

.currency-display {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.currency-display.coins {
    border-color: rgba(255, 193, 7, 0.3);
}

.currency-display.diamonds {
    border-color: rgba(77, 166, 255, 0.3);
}

.currency-icon {
    font-size: 1.2rem;
}

.currency-amount {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-white);
}

/* Currency displays in top bar */
.currency-displays {
    display: flex;
    gap: var(--space-sm);
}

/* Shop Main Layout */
.shop-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-lg);
    padding: var(--space-lg);
    overflow: hidden;
}

.shop-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: var(--space-lg);
    overflow: hidden;
}

.section-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.title-icon {
    font-size: 1.5rem;
}

.subsection-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    color: var(--text-gray);
    margin-top: var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--border);
}

/* Crate Cards */
.crates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    overflow-y: auto;
    flex: 1;
}

@media (max-width: 1400px) {
    .crates-grid {
        grid-template-columns: 1fr;
    }
}

.crate-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--rarity-bg);
    border: 2px solid var(--rarity-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.crate-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, var(--rarity-color) 200%);
    opacity: 0.1;
}

.crate-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px var(--rarity-color);
}

.crate-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--rarity-color) 0%, transparent 60%);
    opacity: 0.1;
    animation: crateGlow 3s ease-in-out infinite;
}

@keyframes crateGlow {
    0%, 100% { opacity: 0.05; transform: scale(1); }
    50% { opacity: 0.15; transform: scale(1.1); }
}

.crate-icon-wrapper {
    position: relative;
    z-index: 1;
}

.crate-icon-wrapper .crate-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px var(--rarity-color));
}

.crate-info {
    text-align: center;
    z-index: 1;
}

.crate-name {
    display: block;
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.05em;
    color: var(--text-white);
}

.crate-rarity {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--rarity-color);
    text-transform: uppercase;
}

.crate-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

/* Crate Price Display */
.crate-price-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    margin-top: var(--space-sm);
    z-index: 1;
}

.crate-price-display .price-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.crate-price-display .price-value {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-white);
}

.crate-price-display .currency-icon {
    font-size: 1rem;
}

/* Crate Buy Options */
.crate-buy-options {
    display: flex;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
    z-index: 1;
    width: 100%;
}

.btn-buy-crate-qty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-sm);
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--rarity-color);
    border-radius: 8px;
    color: var(--text-white);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-buy-crate-qty .qty-text {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.05em;
    color: var(--rarity-color);
}

.btn-buy-crate-qty .qty-price {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 2px;
}

.btn-buy-crate-qty:hover:not(.disabled) {
    background: var(--rarity-color);
    transform: translateY(-2px);
}

.btn-buy-crate-qty:hover:not(.disabled) .qty-text,
.btn-buy-crate-qty:hover:not(.disabled) .qty-price {
    color: var(--bg-void);
}

.btn-buy-crate-qty.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    border-color: var(--border);
}

.btn-buy-crate-qty.disabled .qty-text {
    color: var(--text-muted);
}

/* Owned Crates */
.owned-crates-section {
    margin-top: auto;
}

.owned-crates-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.owned-crate-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--rarity-bg);
    border: 1px solid var(--rarity-color);
    border-radius: 8px;
}

.owned-crate-item .crate-icon {
    font-size: 1.5rem;
}

.owned-crate-item .crate-count {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-gray);
}

.btn-open-crate {
    padding: var(--space-xs) var(--space-sm);
    background: var(--rarity-color);
    border: none;
    border-radius: 4px;
    color: var(--bg-void);
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-open-crate:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--rarity-color);
}

.no-crates {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-style: italic;
}

/* Featured Section */
.featured-section {
    display: flex;
    flex-direction: column;
}

.featured-item {
    margin-bottom: var(--space-md);
}

.featured-banner {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: linear-gradient(135deg, var(--rarity-bg) 0%, rgba(0, 0, 0, 0.6) 100%);
    border: 2px solid var(--rarity-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.featured-banner:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px var(--rarity-color);
}

.featured-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 15px var(--rarity-color));
}

.featured-info {
    flex: 1;
}

.featured-name {
    display: block;
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    color: var(--text-white);
}

.featured-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-top: var(--space-xs);
}

.featured-price {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--rarity-color);
}

/* Exchange Section */
.exchange-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.exchange-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.exchange-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.exchange-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-bright);
}

.exchange-icon {
    font-size: 1.5rem;
}

.exchange-amount {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-white);
}

.btn-exchange {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary);
    border-radius: 6px;
    color: var(--primary);
    font-family: var(--font-display);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-exchange:hover {
    background: var(--primary);
    color: var(--bg-void);
}

/* Drop Rates Section */
.collection-section {
    overflow-y: auto;
}

.drop-rates-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.drop-rate-card {
    padding: var(--space-md);
    background: var(--rarity-bg);
    border: 1px solid var(--rarity-color);
    border-radius: 8px;
}

.drop-rate-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.drop-rate-header .crate-icon {
    font-size: 1.3rem;
}

.drop-rate-header .crate-name {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--rarity-color);
}

.drop-rate-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rate-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    height: 18px;
}

.rate-label {
    width: 70px;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.rate-label.rarity-standard { color: #b0b0b0; }
.rate-label.rarity-rare { color: #4da6ff; }
.rate-label.rarity-epic { color: #b44dff; }
.rate-label.rarity-legendary { color: #ff9500; }

.rate-fill {
    flex: 1;
    height: 6px;
    background: linear-gradient(90deg, var(--rarity-color), rgba(255, 255, 255, 0.2));
    border-radius: 3px;
    max-width: 100%;
}

.rate-percent {
    width: 35px;
    font-size: 0.7rem;
    color: var(--text-gray);
    text-align: right;
}

.ability-rate .rate-label {
    color: var(--primary);
}

.ability-rate .rate-fill {
    background: linear-gradient(90deg, var(--primary), rgba(232, 168, 76, 0.3));
}

/* Crate Reward Modal */
.crate-reward-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.crate-reward-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.crate-reward-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
}

.crate-reward-content {
    position: relative;
    width: 400px;
    max-width: 90%;
    padding: var(--space-xl);
    background: linear-gradient(180deg, var(--rarity-bg) 0%, rgba(10, 10, 15, 0.98) 100%);
    border: 2px solid var(--rarity-color);
    border-radius: 20px;
    text-align: center;
    animation: rewardPopIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes rewardPopIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.crate-reward-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.crate-reward-header .crate-icon {
    font-size: 3rem;
    filter: drop-shadow(0 0 20px var(--rarity-color));
}

.crate-reward-header h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    color: var(--text-white);
}

.crate-reward-display {
    position: relative;
    padding: var(--space-xl) var(--space-lg);
    margin-bottom: var(--space-lg);
}

.reward-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--rarity-color) 0%, transparent 70%);
    opacity: 0.3;
    animation: rewardGlow 2s ease-in-out infinite;
}

@keyframes rewardGlow {
    0%, 100% { opacity: 0.2; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.4; transform: translate(-50%, -50%) scale(1.2); }
}

.reward-item {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.reward-icon {
    font-size: 4rem;
    filter: drop-shadow(0 0 30px var(--rarity-color));
    animation: rewardBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s;
}

@keyframes rewardBounce {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.reward-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    color: var(--text-white);
}

.reward-rarity {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--rarity-color);
    text-transform: uppercase;
}

.reward-type {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: var(--space-xs);
}

.coins-reward .reward-icon {
    filter: drop-shadow(0 0 30px #ffc107);
}

.coins-reward .reward-name {
    color: #ffc107;
}

.btn-claim {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.1rem;
    background: var(--rarity-color);
    border: none;
    border-radius: 8px;
    color: var(--bg-void);
    font-family: var(--font-display);
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-claim:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--rarity-color);
}

/* Shop Notice */
.shop-notice {
    padding: var(--space-lg);
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

/* Responsive Shop */
@media (max-width: 1200px) {
    .shop-main {
        grid-template-columns: 1fr 1fr;
    }
    
    .collection-section {
        grid-column: span 2;
    }
    
    .drop-rates-info {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .drop-rate-card {
        flex: 1 1 calc(50% - var(--space-md));
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .shop-main {
        grid-template-columns: 1fr;
    overflow-y: auto;
}

    .shop-section {
        max-height: none;
    }
    
    .collection-section {
        grid-column: span 1;
    }
    
    .drop-rate-card {
        flex: 1 1 100%;
    }
    
    .shop-header-bar {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }
    
    .shop-title {
        order: -1;
        width: 100%;
        text-align: center;
        font-size: 1.5rem;
    }
}

/* Buy Diamonds Button */
.btn-buy-diamonds {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
    padding: var(--space-lg);
    background: linear-gradient(135deg, rgba(77, 166, 255, 0.15) 0%, rgba(180, 77, 255, 0.15) 100%);
    border: 2px solid #4da6ff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: var(--space-md);
}

.btn-buy-diamonds:hover {
    background: linear-gradient(135deg, rgba(77, 166, 255, 0.25) 0%, rgba(180, 77, 255, 0.25) 100%);
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(77, 166, 255, 0.3);
}

.diamond-icon-big {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px #4da6ff);
}

.buy-diamonds-info {
    flex: 1;
    text-align: left;
}

.buy-diamonds-title {
    display: block;
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    color: var(--text-white);
}

.buy-diamonds-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.buy-arrow {
    font-size: 1.5rem;
    color: #4da6ff;
}

/* Owned Crate Items */
.owned-crate-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--rarity-bg);
    border: 1px solid var(--rarity-color);
    border-radius: 10px;
    width: 100%;
}

.owned-crate-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.owned-crate-info .crate-name {
    font-size: 0.85rem;
    color: var(--text-white);
}

.owned-crate-info .crate-count {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--rarity-color);
}

.btn-open-crate-modal {
    padding: var(--space-sm) var(--space-md);
    background: var(--rarity-color);
    border: none;
    border-radius: 6px;
    color: var(--bg-void);
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-open-crate-modal:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--rarity-color);
}

/* ==================== PURCHASE MODAL ==================== */

.purchase-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.purchase-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.purchase-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.purchase-modal-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    background: linear-gradient(180deg, rgba(26, 26, 30, 0.98) 0%, rgba(15, 15, 20, 0.98) 100%);
    border: 1px solid var(--border-bright);
    border-radius: 20px;
    padding: var(--space-xl);
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close-btn {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-gray);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-white);
}

.purchase-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.purchase-header .purchase-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: var(--space-sm);
}

.purchase-header h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    letter-spacing: 0.1em;
    color: var(--text-white);
}

/* Diamond Packages */
.diamond-packages {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.diamond-package {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-md);
    background: rgba(77, 166, 255, 0.05);
    border: 2px solid rgba(77, 166, 255, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.diamond-package:hover {
    border-color: #4da6ff;
    background: rgba(77, 166, 255, 0.1);
    transform: translateY(-3px);
}

.diamond-package.popular {
    border-color: #4da6ff;
    box-shadow: 0 0 20px rgba(77, 166, 255, 0.2);
}

.diamond-package.best-value {
    border-color: #ff9500;
    background: rgba(255, 149, 0, 0.1);
    box-shadow: 0 0 20px rgba(255, 149, 0, 0.2);
}

.package-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    background: #4da6ff;
    border-radius: 20px;
    font-family: var(--font-display);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: var(--bg-void);
    white-space: nowrap;
}

.package-badge.best {
    background: #ff9500;
}

.package-diamonds {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.package-diamonds .diamond-icon {
    font-size: 2rem;
}

.package-diamonds .diamond-amount {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text-white);
}

.bonus-tag {
    font-size: 0.65rem;
    color: #5cb85c;
    background: rgba(92, 184, 92, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
}

.btn-purchase {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(135deg, #4da6ff 0%, #3d8adb 100%);
    border: none;
    border-radius: 8px;
    color: var(--bg-void);
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-purchase:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(77, 166, 255, 0.4);
}

/* Crate Purchase Modal */
.crate-purchase-preview {
    text-align: center;
    padding: var(--space-lg);
    background: var(--rarity-bg);
    border: 1px solid var(--rarity-color);
    border-radius: 16px;
    margin-bottom: var(--space-lg);
}

.crate-3d-preview {
    margin-bottom: var(--space-md);
}

.big-crate-icon {
    font-size: 5rem;
    display: block;
    filter: drop-shadow(0 0 20px var(--rarity-color));
    animation: crateBob 2s ease-in-out infinite;
}

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

.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.qty-label {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.qty-buttons {
    display: flex;
    gap: var(--space-sm);
}

.qty-btn {
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-gray);
    font-family: var(--font-display);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qty-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--text-white);
}

.qty-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--bg-void);
}

.qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.purchase-total {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: var(--space-lg);
}

.total-label {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.total-amount {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.purchase-actions {
    display: flex;
    gap: var(--space-md);
}

.btn-purchase-confirm {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    border: none;
    border-radius: 10px;
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-purchase-confirm.coins {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: var(--bg-void);
}

.btn-purchase-confirm.diamonds {
    background: linear-gradient(135deg, #4da6ff 0%, #3d8adb 100%);
    color: var(--bg-void);
}

.btn-purchase-confirm:hover:not(.disabled) {
    transform: scale(1.02);
}

.btn-purchase-confirm.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Purchase Status */
.purchase-status {
    margin-top: var(--space-md);
    text-align: center;
}

.status-step {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.status-step.loading .step-icon {
    animation: spin 1s linear infinite;
}

.status-step.success {
    background: rgba(92, 184, 92, 0.1);
    color: #5cb85c;
}

.status-step.error {
    background: rgba(217, 83, 79, 0.1);
    color: #d9534f;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== CRATE OPENING ANIMATION ==================== */

.crate-open-container {
    text-align: center;
}

.crate-open-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.crate-open-header .crate-icon {
    font-size: 2rem;
}

.crate-open-header h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    color: var(--text-white);
}

.crate-owned {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.crate-open-preview {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.crate-3d {
    position: relative;
}

.crate-box {
    position: relative;
    width: 120px;
    height: 100px;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

.crate-box.shaking {
    animation: crateShake 0.1s linear infinite;
}

@keyframes crateShake {
    0%, 100% { transform: translateX(0) rotate(0); }
    25% { transform: translateX(-5px) rotate(-2deg); }
    75% { transform: translateX(5px) rotate(2deg); }
}

.crate-box.opening .crate-lid {
    animation: lidOpen 0.6s ease forwards;
}

@keyframes lidOpen {
    0% { transform: rotateX(0) translateY(0); }
    100% { transform: rotateX(-120deg) translateY(-30px); }
}

.crate-lid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: var(--rarity-color);
    border-radius: 8px 8px 0 0;
    transform-origin: top center;
}

.crate-body {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    bottom: 0;
    height: 70px;
    background: linear-gradient(180deg, var(--rarity-color) 0%, rgba(0, 0, 0, 0.5) 100%);
    border-radius: 0 0 8px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crate-emblem {
    font-size: 2.5rem;
    opacity: 0.8;
}

.crate-glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, var(--rarity-color) 0%, transparent 70%);
    opacity: 0.3;
    pointer-events: none;
}

.crate-open-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.btn-open-crate-big {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: var(--space-lg);
    background: linear-gradient(135deg, var(--rarity-color) 0%, rgba(0, 0, 0, 0.3) 100%);
    border: 2px solid var(--rarity-color);
    border-radius: 12px;
    color: var(--bg-void);
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-open-crate-big:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 40px var(--rarity-color);
}

.btn-open-crate-big:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.open-icon {
    font-size: 1.5rem;
}

/* Rewards Display */
.crate-rewards-container {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

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

.rewards-title {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.15em;
    color: var(--primary);
    margin-bottom: var(--space-lg);
    animation: rewardsTitlePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes rewardsTitlePop {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.rewards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    max-height: 400px;
    overflow-y: auto;
}

.reward-card {
    position: relative;
    width: 140px;
    padding: var(--space-md);
    background: var(--rarity-bg);
    border: 2px solid var(--rarity-color);
    border-radius: 12px;
    text-align: center;
    animation: rewardCardPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
    overflow: hidden;
}

.reward-card .reward-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--rarity-color) 0%, transparent 60%);
    opacity: 0.15;
}

.reward-card .reward-icon {
    position: relative;
    z-index: 1;
    font-size: 2.5rem;
    display: block;
    margin-bottom: var(--space-sm);
    filter: drop-shadow(0 0 10px var(--rarity-color));
}

.reward-card .reward-name {
    position: relative;
    z-index: 1;
    display: block;
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--text-white);
    margin-bottom: 4px;
}

.reward-card .reward-rarity {
    position: relative;
    z-index: 1;
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--rarity-color);
    text-transform: uppercase;
}

.reward-card .reward-type {
    position: relative;
    z-index: 1;
    display: block;
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.new-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 6px;
    background: #5cb85c;
    border-radius: 4px;
    font-size: 0.55rem;
    font-family: var(--font-display);
    color: var(--bg-void);
}

.duplicate-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 6px;
    background: #ff9500;
    border-radius: 4px;
    font-size: 0.55rem;
    font-family: var(--font-display);
    color: var(--bg-void);
}

.btn-claim-all {
    padding: var(--space-md) var(--space-xl);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dim) 100%);
    border: none;
    border-radius: 10px;
    color: var(--bg-void);
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-claim-all:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--primary-glow);
}

/* ==================== BROWSER ==================== */
.browser-content {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    height: 100%;
}

.browser-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.room-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.room-empty {
    text-align: center;
    color: var(--text-muted);
    padding: var(--space-xl);
    font-size: 1.1rem;
}

.room-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.room-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.room-info h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: var(--space-xs);
}

.room-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.room-players {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--primary);
}

.browser-footer {
    display: flex;
    justify-content: space-between;
}

/* ==================== LOBBY ==================== */
#lobby-screen {
    align-items: center;
    justify-content: center;
}

.lobby-content {
    width: 100%;
    max-width: 600px;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.lobby-header {
    text-align: center;
}

.lobby-header h2 {
    font-family: var(--font-display);
    font-size: 2.2rem;
    letter-spacing: 0.1em;
}

.room-code {
    font-family: var(--font-body);
    color: var(--primary);
    letter-spacing: 0.3em;
}

.player-list-container h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: var(--space-md);
}

.player-list {
    background: var(--bg-card);
    border-radius: 10px;
    padding: var(--space-md);
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
}

.player-item .name {
    font-family: var(--font-body);
    font-weight: 600;
}

.player-item .status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.player-item .status.ready {
    color: var(--success);
}

.lobby-footer {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.btn.is-ready {
    background: var(--success);
    color: var(--bg-void);
}

/* Lobby Countdown */
.lobby-countdown {
    text-align: center;
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: 12px;
    border: 2px solid var(--primary);
    animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
    0%, 100% { border-color: var(--primary); }
    50% { border-color: var(--danger); }
}

.countdown-text {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
}

.countdown-number {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--primary);
    line-height: 1;
    margin: var(--space-sm) 0;
}

.countdown-players {
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* Notifications */
.notification-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    pointer-events: none;
}

.notification {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-card);
    border-radius: 8px;
    border-left: 4px solid var(--info);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    pointer-events: auto;
    backdrop-filter: blur(8px);
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification-info {
    border-color: var(--info);
}

.notification-success {
    border-color: var(--success);
}

.notification-warning {
    border-color: var(--warning);
}

.notification-error {
    border-color: var(--danger);
}

.notification-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

.notification-info .notification-icon { color: var(--info); }
.notification-success .notification-icon { color: var(--success); }
.notification-warning .notification-icon { color: var(--warning); }
.notification-error .notification-icon { color: var(--danger); }

.notification-text {
    font-size: 0.9rem;
    color: var(--text-white);
}

/* ==================== GAME SCREEN ==================== */
#game-screen {
    display: none;
    background: #000;
}

#game-screen.active {
    display: block;
}

#game-canvas {
    width: 100%;
    height: 100%;
}

/* HUD */
.hud {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

.hud-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: max(var(--space-md), var(--safe-top)) var(--space-lg) var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.timer-container {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    padding: var(--space-sm) var(--space-lg);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.timer {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--text-white);
}

.kills-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    padding: var(--space-sm) var(--space-md);
    border-radius: 6px;
    border: 1px solid var(--border);
}

.kills-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
}

.kills-value {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--danger);
}

.hud-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-lg) var(--space-lg) max(var(--space-lg), calc(var(--safe-bottom) + 10px));
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: var(--space-md);
}

.hud-bottom-right {
    display: flex;
    align-items: flex-end;
    gap: var(--space-lg);
}

/* Health */
.health-container {
    width: 220px;
}

.health-bar {
    position: relative;
    height: 26px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-bright);
    border-radius: 4px;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 100%);
    transition: width 0.3s ease, background 0.3s ease;
    box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.2);
}

/* Health color changes based on percentage */
.health-bar.health-high .health-fill {
    background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 100%);
}

.health-bar.health-medium .health-fill {
    background: linear-gradient(90deg, #FF9800 0%, #FFB74D 100%);
}

.health-bar.health-low .health-fill {
    background: linear-gradient(90deg, #f44336 0%, #e57373 100%);
    animation: healthPulse 0.5s ease-in-out infinite;
}

.health-bar.health-critical .health-fill {
    background: linear-gradient(90deg, #b71c1c 0%, #d32f2f 100%);
    animation: healthPulse 0.3s ease-in-out infinite;
}

@keyframes healthPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.health-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 1.1rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    z-index: 1;
}

/* Abilities HUD */
.abilities-hud {
    display: flex;
    gap: var(--space-sm);
}

.ability-slot {
    position: relative;
    width: 55px;
    height: 65px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border-bright);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    overflow: hidden;
}

.ability-slot .ability-key {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--primary);
    z-index: 2;
}

.ability-slot .ability-icon {
    font-size: 1.3rem;
    z-index: 2;
}

/* Vertical cooldown overlay that fills from bottom to top */
.ability-cooldown {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: transparent;
    pointer-events: none;
    z-index: 1;
}

/* Dark overlay that shrinks as cooldown progresses (fills from bottom) */
.ability-cooldown::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100% - var(--cooldown-height, 0%));
    background: rgba(0, 0, 0, 0.7);
    transition: height 0.1s linear;
}

/* Glowing line at the top of the cooldown progress */
.ability-cooldown::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--cooldown-height, 0%);
    height: 3px;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary), 0 0 15px var(--primary);
    opacity: var(--cooldown-active, 0);
    transition: bottom 0.1s linear, opacity 0.2s ease;
}

/* When ability is on cooldown */
.ability-slot.on-cooldown {
    border-color: var(--primary-dim);
}

.ability-slot.on-cooldown .ability-icon {
    opacity: 0.5;
}

/* When ability is ready */
.ability-slot.ready .ability-cooldown::before {
    height: 0;
}

.ability-slot.ready .ability-cooldown::after {
    opacity: 0;
}

/* Weapon Slots */
.weapon-slots-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-xs);
    margin-right: var(--space-md);
}

.weapon-slots {
    display: flex;
    gap: var(--space-sm);
}

.weapon-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 70px;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.weapon-slot.selected {
    border-color: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
    opacity: 1;
    background: rgba(232, 168, 76, 0.1);
}

.weapon-slot-icon {
    font-size: 1.4rem;
}

.weapon-slot-name {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--text-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60px;
}

.weapon-slot.selected .weapon-slot-name {
    color: var(--primary);
}

.weapon-slot-key {
    font-family: var(--font-display);
    font-size: 0.65rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 6px;
    border-radius: 3px;
    margin-top: 2px;
}

.weapon-switch-hint {
    font-size: 0.65rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Weapon */
.weapon-container {
    text-align: right;
}

.weapon-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 0.1em;
    color: var(--text-gray);
}

.ammo-display {
    font-family: var(--font-display);
    font-size: 2.2rem;
}

.ammo-display.melee .ammo-divider,
.ammo-display.melee .ammo-reserve {
    display: none;
}

.ammo-display.melee .ammo-mag {
    color: var(--primary);
}

.ammo-mag {
    color: var(--text-white);
}

.ammo-divider {
    color: var(--text-muted);
    margin: 0 2px;
}

.ammo-reserve {
    color: var(--text-muted);
    font-size: 1.3rem;
}

/* Crosshair - Weapon-specific styles (4-line style with variable spacing) */
.crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.15s ease-out;
}

.crosshair-dot {
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
    transition: all 0.15s ease-out;
}

.crosshair-line {
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
    transition: all 0.15s ease-out;
}

.crosshair-top, .crosshair-bottom {
    width: 2px;
    height: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.crosshair-top { bottom: 10px; }
.crosshair-bottom { top: 10px; }

.crosshair-left, .crosshair-right {
    width: 10px;
    height: 2px;
    top: 50%;
    transform: translateY(-50%);
}

.crosshair-left { right: 10px; }
.crosshair-right { left: 10px; }

/* Hide extra elements - keeping simple 4-line style */
.crosshair-spread,
.crosshair-spread-inner,
.crosshair-scope {
    display: none;
}

/* ============ PISTOL CROSSHAIR (default - standard spacing) ============ */
.crosshair[data-weapon="pistol"] .crosshair-dot {
    width: 4px;
    height: 4px;
}

.crosshair[data-weapon="pistol"] .crosshair-top { bottom: 8px; height: 10px; }
.crosshair[data-weapon="pistol"] .crosshair-bottom { top: 8px; height: 10px; }
.crosshair[data-weapon="pistol"] .crosshair-left { right: 8px; width: 10px; }
.crosshair[data-weapon="pistol"] .crosshair-right { left: 8px; width: 10px; }

/* ============ SMG CROSSHAIR (slightly wider spacing) ============ */
.crosshair[data-weapon="smg"] .crosshair-dot {
    width: 4px;
    height: 4px;
}

.crosshair[data-weapon="smg"] .crosshair-top { bottom: 12px; height: 10px; }
.crosshair[data-weapon="smg"] .crosshair-bottom { top: 12px; height: 10px; }
.crosshair[data-weapon="smg"] .crosshair-left { right: 12px; width: 10px; }
.crosshair[data-weapon="smg"] .crosshair-right { left: 12px; width: 10px; }

/* ============ ASSAULT RIFLE CROSSHAIR (medium spacing) ============ */
.crosshair[data-weapon="assault"] .crosshair-dot {
    width: 4px;
    height: 4px;
}

.crosshair[data-weapon="assault"] .crosshair-top { bottom: 10px; height: 12px; }
.crosshair[data-weapon="assault"] .crosshair-bottom { top: 10px; height: 12px; }
.crosshair[data-weapon="assault"] .crosshair-left { right: 10px; width: 12px; }
.crosshair[data-weapon="assault"] .crosshair-right { left: 10px; width: 12px; }

/* ============ SHOTGUN CROSSHAIR (wide spacing for spread) ============ */
.crosshair[data-weapon="shotgun"] .crosshair-dot {
    width: 4px;
    height: 4px;
}

.crosshair[data-weapon="shotgun"] .crosshair-top { bottom: 20px; height: 12px; }
.crosshair[data-weapon="shotgun"] .crosshair-bottom { top: 20px; height: 12px; }
.crosshair[data-weapon="shotgun"] .crosshair-left { right: 20px; width: 12px; }
.crosshair[data-weapon="shotgun"] .crosshair-right { left: 20px; width: 12px; }

/* ============ SNIPER CROSSHAIR (tight spacing for precision) ============ */
.crosshair[data-weapon="sniper"] .crosshair-dot {
    width: 2px;
    height: 2px;
}

.crosshair[data-weapon="sniper"] .crosshair-line {
    width: 1px;
}

.crosshair[data-weapon="sniper"] .crosshair-top { bottom: 5px; height: 15px; width: 1px; }
.crosshair[data-weapon="sniper"] .crosshair-bottom { top: 5px; height: 15px; width: 1px; }
.crosshair[data-weapon="sniper"] .crosshair-left { right: 5px; width: 15px; height: 1px; }
.crosshair[data-weapon="sniper"] .crosshair-right { left: 5px; width: 15px; height: 1px; }

/* ============ ROCKET LAUNCHER CROSSHAIR (wide spacing for blast) ============ */
.crosshair[data-weapon="rocket"] .crosshair-dot {
    width: 6px;
    height: 6px;
}

.crosshair[data-weapon="rocket"] .crosshair-top { bottom: 18px; height: 12px; width: 3px; }
.crosshair[data-weapon="rocket"] .crosshair-bottom { top: 18px; height: 12px; width: 3px; }
.crosshair[data-weapon="rocket"] .crosshair-left { right: 18px; width: 12px; height: 3px; }
.crosshair[data-weapon="rocket"] .crosshair-right { left: 18px; width: 12px; height: 3px; }

/* ============ KNIFE CROSSHAIR (minimal - just dot) ============ */
.crosshair[data-weapon="knife"] .crosshair-dot {
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
}

.crosshair[data-weapon="knife"] .crosshair-line {
    opacity: 0;
}

/* Crosshair Hit Tick */
.crosshair-tick {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 8px currentColor, 0 0 16px currentColor;
    opacity: 0;
    transition: none;
    pointer-events: none;
    z-index: 10;
}

.crosshair-tick.active {
    animation: tickPop 0.3s ease-out forwards;
}

@keyframes tickPop {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.3);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1) translateY(-15px);
    }
}

/* Kill Feed */
.kill-feed {
    position: absolute;
    top: 70px;
    right: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.kill-entry {
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    animation: killSlide 0.2s ease-out;
    border-left: 3px solid var(--danger);
}

@keyframes killSlide {
    from { opacity: 0; transform: translateX(15px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Hit Marker - Subtle */
.hit-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    opacity: 0;
    transition: opacity 0.05s ease-out;
}

.hit-marker.active {
    opacity: 1;
}

.hit-marker .hit-line {
    position: absolute;
    background: var(--text-white);
}

.hit-marker .hit-line:nth-child(1),
.hit-marker .hit-line:nth-child(2) {
    width: 2px;
    height: 8px;
    left: 50%;
    transform: translateX(-50%);
}

.hit-marker .hit-line:nth-child(1) { top: 0; }
.hit-marker .hit-line:nth-child(2) { bottom: 0; }

.hit-marker .hit-line:nth-child(3),
.hit-marker .hit-line:nth-child(4) {
    width: 8px;
    height: 2px;
    top: 50%;
    transform: translateY(-50%);
}

.hit-marker .hit-line:nth-child(3) { left: 0; }
.hit-marker .hit-line:nth-child(4) { right: 0; }

/* Body part hit marker colors */
.hit-marker.hit-head .hit-line {
    background: #ffcc00;
    box-shadow: 0 0 8px #ffcc00;
}

.hit-marker.hit-head {
    transform: translate(-50%, -50%) scale(1.3);
}

.hit-marker.hit-torso .hit-line {
    background: var(--text-white);
}

.hit-marker.hit-legs .hit-line {
    background: #ff9966;
}

/* Floating text animation */
@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-50px);
    }
}

.floating-text {
    font-family: 'Rajdhani', sans-serif;
    letter-spacing: 2px;
}

.floating-headshot {
    color: #ffcc00 !important;
    text-shadow: 0 0 15px #ff6600, 0 0 30px #ff6600 !important;
}

/* Damage Vignette - Subtle */
.damage-vignette {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(ellipse at center, transparent 60%, rgba(217, 83, 79, 0.2) 100%);
    transition: opacity 0.15s ease;
}

.damage-vignette.active {
    opacity: 1;
}

/* ADS indicator */
.ads-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ads-indicator.active {
    opacity: 1;
}

/* Mobile Controls */
.mobile-controls {
    display: none;
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 15;
}

@media (max-width: 768px), (hover: none) {
    .mobile-controls {
        display: block;
    }
}

.joystick-container {
    position: absolute;
    bottom: 100px;
    width: 110px;
    height: 110px;
    pointer-events: auto;
    touch-action: none;
}

.joystick-container.left { left: 25px; }
.joystick-container.right { right: 25px; }

.joystick-base {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.joystick-stick {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
}

.mobile-btn {
    position: absolute;
    pointer-events: auto;
    touch-action: manipulation;
    width: 55px;
    height: 55px;
    min-width: var(--touch-min);
    min-height: var(--touch-min);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
    font-family: var(--font-display);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shoot-btn {
    bottom: 100px;
    right: 240px;
    background: rgba(217, 83, 79, 0.2);
    border-color: var(--danger);
}

.aim-btn {
    bottom: 100px;
    right: 170px;
    background: rgba(232, 168, 76, 0.2);
    border-color: var(--primary);
}

.ability-btn-1 {
    bottom: 170px;
    right: 240px;
    border-color: var(--primary);
}

.ability-btn-2 {
    bottom: 170px;
    right: 170px;
    border-color: var(--primary);
}

.jump-btn {
    bottom: 100px;
    right: 100px;
    border-color: var(--success);
}

.switch-btn {
    bottom: 240px;
    right: 170px;
    border-color: var(--secondary);
    background: rgba(122, 139, 154, 0.2);
}

/* Pause Menu */
.pause-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    padding: var(--space-xl);
    border-radius: 16px;
    border: 1px solid var(--border);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    z-index: 20;
    pointer-events: auto;
    backdrop-filter: blur(8px);
}

.pause-menu.active {
    display: flex;
}

.pause-menu h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    letter-spacing: 0.2em;
}

/* ==================== SCOREBOARD ==================== */
.scoreboard-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    z-index: 25;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    pointer-events: none;
}

.scoreboard-overlay.active {
    display: flex;
}

.scoreboard-container {
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    background: linear-gradient(145deg, rgba(26, 26, 26, 0.98), rgba(18, 18, 18, 0.98));
    border: 1px solid var(--border-bright);
    border-radius: 16px;
    box-shadow: 
        0 0 60px rgba(232, 168, 76, 0.15),
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: scoreboardSlideIn 0.2s ease-out;
}

@keyframes scoreboardSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.scoreboard-header {
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border);
    text-align: center;
    background: linear-gradient(180deg, rgba(232, 168, 76, 0.08) 0%, transparent 100%);
}

.scoreboard-title {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.25em;
    color: var(--text-white);
    margin: 0 0 var(--space-xs) 0;
}

.scoreboard-mode {
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    color: var(--primary);
    text-transform: uppercase;
}

/* Scoreboard Tables */
.scoreboard-ffa,
.scoreboard-teams {
    padding: var(--space-md);
}

.scoreboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.scoreboard-table thead tr {
    border-bottom: 2px solid var(--border-bright);
}

.scoreboard-table th {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.scoreboard-table td {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--border);
}

.scoreboard-table tbody tr {
    transition: background 0.15s ease;
}

.scoreboard-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.scoreboard-table tbody tr.is-me {
    background: rgba(232, 168, 76, 0.1);
    border-left: 3px solid var(--primary);
}

.scoreboard-table tbody tr.is-me td {
    color: var(--text-white);
}

/* Column widths */
.col-rank {
    width: 50px;
    text-align: center !important;
}

.col-player {
    min-width: 180px;
}

.col-kills,
.col-deaths,
.col-assists,
.col-score,
.col-level {
    width: 60px;
    text-align: center !important;
}

.col-tier {
    width: 100px;
    text-align: center !important;
}

/* Player cell styling */
.player-cell {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.player-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.player-name {
    font-weight: 500;
    color: var(--text-white);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}

.player-name.is-dead {
    opacity: 0.5;
}

/* Rank position badge */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.8rem;
}

.rank-badge.gold {
    background: linear-gradient(145deg, #ffd700, #b8860b);
    color: #1a1a1a;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.rank-badge.silver {
    background: linear-gradient(145deg, #c0c0c0, #808080);
    color: #1a1a1a;
}

.rank-badge.bronze {
    background: linear-gradient(145deg, #cd7f32, #8b4513);
    color: #1a1a1a;
}

.rank-badge.default {
    background: var(--bg-elevated);
    color: var(--text-gray);
    border: 1px solid var(--border);
}

/* Stat cells */
.stat-cell {
    font-variant-numeric: tabular-nums;
    color: var(--text-gray);
}

.stat-cell.kills {
    color: var(--success);
    font-weight: 600;
}

.stat-cell.deaths {
    color: var(--danger);
}

.stat-cell.assists {
    color: var(--info);
}

.stat-cell.score {
    color: var(--primary);
    font-weight: 600;
}

/* Rank tier display */
.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tier-badge.bronze {
    background: rgba(205, 127, 50, 0.2);
    color: #cd7f32;
}

.tier-badge.silver {
    background: rgba(192, 192, 192, 0.2);
    color: #c0c0c0;
}

.tier-badge.gold {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

.tier-badge.platinum {
    background: rgba(90, 200, 250, 0.2);
    color: #5ac8fa;
}

.tier-badge.diamond {
    background: rgba(185, 242, 255, 0.2);
    color: #b9f2ff;
}

.tier-badge.master {
    background: rgba(255, 105, 180, 0.2);
    color: #ff69b4;
}

.tier-badge.champion {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.3), rgba(255, 105, 180, 0.3));
    color: #ffd700;
}

/* Team Scoreboard */
.scoreboard-teams {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.scoreboard-team {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    font-family: var(--font-display);
}

.scoreboard-team.team-spies .team-header {
    background: linear-gradient(90deg, rgba(34, 68, 170, 0.4), transparent);
    border-bottom: 2px solid #2244aa;
}

.scoreboard-team.team-mercs .team-header {
    background: linear-gradient(90deg, rgba(170, 68, 34, 0.4), transparent);
    border-bottom: 2px solid #aa4422;
}

.team-name {
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    color: var(--text-white);
}

.team-score {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.scoreboard-team.team-spies .team-score {
    color: #4488ff;
}

.scoreboard-team.team-mercs .team-score {
    color: #ff8844;
}

/* Scoreboard Footer */
.scoreboard-footer {
    padding: var(--space-md);
    text-align: center;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.2);
}

.scoreboard-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Responsive scoreboard */
@media (max-width: 768px) {
    .scoreboard-container {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .scoreboard-header {
        padding: var(--space-md);
    }
    
    .scoreboard-title {
        font-size: 1.5rem;
    }
    
    .scoreboard-table {
        font-size: 0.8rem;
    }
    
    .scoreboard-table th,
    .scoreboard-table td {
        padding: var(--space-xs) var(--space-sm);
    }
    
    .col-assists,
    .col-level {
        display: none;
    }
    
    .player-avatar {
        width: 24px;
        height: 24px;
        font-size: 0.85rem;
    }
    
    .player-name {
        max-width: 100px;
    }
}

/* ==================== GAME OVER ==================== */
#gameover-screen {
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
}

.gameover-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
    animation: fadeSlideUp 0.5s ease-out;
}

.gameover-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    letter-spacing: 0.1em;
    color: var(--text-white);
}

.gameover-stats {
    display: flex;
    gap: var(--space-xl);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--text-white);
}

.stat-value:last-child {
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.2em;
}

/* ==================== LOADING ==================== */
#loading-screen {
    align-items: center;
    justify-content: center;
    background: var(--bg-void);
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.loading-logo {
    font-family: var(--font-display);
    font-size: 2.5rem;
    display: flex;
}

.loading-bar {
    width: 180px;
    height: 3px;
    background: var(--bg-card);
    border-radius: 2px;
    overflow: hidden;
}

.loading-fill {
    height: 100%;
    width: 30%;
    background: var(--primary);
    border-radius: 2px;
    animation: loadingPulse 1.2s ease-in-out infinite;
}

@keyframes loadingPulse {
    0% { width: 0%; margin-left: 0; }
    50% { width: 50%; margin-left: 25%; }
    100% { width: 0%; margin-left: 100%; }
}

.loading-text {
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    color: var(--text-muted);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .menu-buttons {
        max-width: 280px;
    }
    
    .menu-row {
        flex-direction: column;
    }
    
    .selected-abilities {
        flex-direction: column;
        align-items: center;
    }
    
    .ability-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .shop-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gameover-stats {
        flex-direction: column;
    }
    
    .hud-bottom {
        padding-bottom: max(220px, calc(var(--safe-bottom) + 220px));
    }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
        gap: 0;
    }
    
    .ability-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Reduce motion for accessibility/battery */
@media (prefers-reduced-motion: reduce) {
    .glow-orb,
    .grid-overlay {
        animation: none;
    }
    
    .btn-glow::before {
        animation: none;
        display: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-card);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-bright);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==================== FLOATING TEXT & HEADSHOT ==================== */

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) translateY(-30px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-60px) scale(0.8);
    }
}

.floating-text {
    animation: floatUp 1s ease-out forwards;
    font-family: var(--font-display);
    letter-spacing: 0.1em;
}

.floating-headshot {
    color: #ffcc00 !important;
    text-shadow: 
        0 0 10px #ff6600,
        0 0 20px #ff3300,
        0 0 30px #ff0000;
}

/* Hit marker body part colors */
#hit-marker.hit-head {
    border-color: #ffcc00;
    filter: drop-shadow(0 0 8px #ff6600);
}

#hit-marker.hit-head::before,
#hit-marker.hit-head::after {
    background: #ffcc00;
}

#hit-marker.hit-legs {
    border-color: #ff9966;
}

#hit-marker.hit-legs::before,
#hit-marker.hit-legs::after {
    background: #ff9966;
}

/* Crosshair tick for hit confirmation */
.crosshair-tick {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 1.5rem;
    font-weight: bold;
    opacity: 0;
    transition: all 0.1s ease-out;
    pointer-events: none;
}

.crosshair-tick.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    animation: tickPulse 0.3s ease-out;
}

@keyframes tickPulse {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* ==================== DEATH SCREEN ==================== */
.death-screen {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
    pointer-events: none;
    animation: deathFadeIn 0.5s ease-out;
}

.death-screen.active {
    display: flex;
    pointer-events: auto;
}

@keyframes deathFadeIn {
    from {
        opacity: 0;
        background: rgba(139, 0, 0, 0.8);
    }
    to {
        opacity: 1;
        background: rgba(0, 0, 0, 0.85);
    }
}

.death-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    animation: deathContentSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.death-skull {
    font-size: 5rem;
    animation: skullPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(217, 83, 79, 0.5));
}

@keyframes skullPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(217, 83, 79, 0.5));
    }
    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 30px rgba(217, 83, 79, 0.8));
    }
}

.death-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    letter-spacing: 0.15em;
    color: var(--danger);
    text-shadow: 0 0 30px rgba(217, 83, 79, 0.6);
    margin: 0;
}

.death-killer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: rgba(217, 83, 79, 0.1);
    border: 1px solid rgba(217, 83, 79, 0.3);
    border-radius: 12px;
    min-width: 280px;
}

.death-label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.death-killer-name {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.1em;
    color: var(--danger);
    text-shadow: 0 0 10px rgba(217, 83, 79, 0.5);
}

.death-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.death-countdown-label {
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.2em;
    color: var(--text-gray);
}

.death-countdown-timer {
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--text-white);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    animation: countdownPulseNumber 1s ease-in-out infinite;
}

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

/* Death Screen Loadout Selection */
.death-loadout {
    width: 100%;
    max-width: 800px;
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: grid;
    grid-template-areas: 
        "title title"
        "weapon ability";
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    align-items: start;
}

.death-loadout-title {
    grid-area: title;
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--text-gray);
    text-align: center;
    margin-bottom: var(--space-xs);
    opacity: 0.7;
}

.death-loadout-section:nth-child(2) {
    grid-area: weapon;
}

.death-loadout-section:nth-child(3) {
    grid-area: ability;
}

.death-weapon-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs);
}

.death-weapon-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    position: relative;
}

.death-weapon-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-dim);
    transform: translateY(-2px);
}

.death-weapon-item.selected {
    background: rgba(232, 168, 76, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.death-weapon-item.selected .death-weapon-name {
    color: var(--primary);
}

.death-weapon-item.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.death-weapon-item.locked:hover {
    transform: none;
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.05);
}

.death-weapon-item .lock-icon {
    font-size: 0.7rem;
    position: absolute;
    top: 4px;
    right: 4px;
}

.death-weapon-icon {
    font-size: 1.4rem;
}

.death-weapon-name {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-gray);
    text-align: left;
    letter-spacing: 0.05em;
}

/* Death Screen Loadout Sections */
.death-loadout-section {
    display: flex;
    flex-direction: column;
}

.death-section-label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--primary);
    margin-bottom: var(--space-sm);
    text-align: left;
}

/* Death Screen Ability Slots */
.death-ability-slots {
    display: flex;
    justify-content: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.death-ability-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px dashed var(--border);
    border-radius: 8px;
    position: relative;
    transition: all 0.2s ease;
}

.death-ability-slot.filled {
    border-style: solid;
    border-color: var(--primary);
    background: rgba(232, 168, 76, 0.1);
}

.death-slot-label {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-display);
    font-size: 0.6rem;
    color: var(--text-gray);
    background: rgba(10, 10, 15, 0.9);
    padding: 0 4px;
}

.death-slot-icon {
    font-size: 1.2rem;
}

/* Death Screen Ability Grid */
.death-ability-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xs);
}

.death-ability-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: var(--space-xs);
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
    position: relative;
}

.death-ability-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-dim);
    transform: translateY(-2px);
}

.death-ability-item.selected {
    background: rgba(232, 168, 76, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.death-ability-item.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.death-ability-item .death-ability-icon {
    font-size: 1.2rem;
}

.death-ability-item .death-ability-name {
    font-size: 0.6rem;
    text-align: center;
}

@media (max-width: 768px) {
    .death-loadout {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "title"
            "weapon"
            "ability";
        max-width: 450px;
    }
    
    .death-weapon-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
    
    .death-ability-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.death-ability-item.locked:hover {
    transform: none;
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.05);
}

.death-ability-icon {
    font-size: 1.2rem;
}

.death-ability-name {
    font-family: var(--font-body);
    font-size: 0.5rem;
    font-weight: 600;
    color: var(--text-gray);
    text-align: center;
    letter-spacing: 0.05em;
}

.death-ability-item.selected .death-ability-name {
    color: var(--primary);
}

.death-ability-item .lock-icon {
    font-size: 0.6rem;
    position: absolute;
    top: 2px;
    right: 2px;
}

/* Death Screen Respawn Button */
.death-respawn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.btn-respawn {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.4rem;
    min-width: 200px;
    pointer-events: auto;
    animation: respawnGlow 2s ease-in-out infinite;
}

@keyframes respawnGlow {
    0%, 100% {
        box-shadow: 0 4px 20px var(--primary-glow);
    }
    50% {
        box-shadow: 0 4px 30px var(--primary-glow), 0 0 40px var(--primary-glow);
    }
}

.btn-respawn:hover {
    transform: translateY(-3px) scale(1.02);
}

.death-respawn-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

/* Make death screen scrollable on small screens */
@media (max-height: 700px) {
    .death-screen {
        overflow-y: auto;
        align-items: flex-start;
        padding: var(--space-lg) 0;
    }
    
    .death-content {
        padding: var(--space-lg);
    }
    
    .death-skull {
        font-size: 3rem;
    }
    
    .death-title {
        font-size: 2rem;
    }
}

/* ==================== MAP SELECTION (LOBBY) ==================== */

.map-selector {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.map-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.map-label {
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.map-current {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--primary);
    letter-spacing: 0.05em;
}

.map-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

.map-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.map-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.map-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-dim);
    transform: translateY(-2px);
}

.map-option.selected {
    background: rgba(232, 168, 76, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.map-option .map-thumb {
    font-size: 1.8rem;
}

.map-option .map-name {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-gray);
    text-align: center;
}

.map-option.selected .map-name {
    color: var(--primary);
}

/* Admin indicator for map selector */
.map-selector.is-admin {
    border-color: var(--primary-dim);
}

.map-selector.is-admin .map-label::after {
    content: ' (HOST)';
    color: var(--primary);
    font-size: 0.7rem;
}

/* Admin indicator for player list */
.player-item.is-admin {
    background: rgba(232, 168, 76, 0.1);
    border-left: 3px solid var(--primary);
}

/* ==================== MAP VOTING SCREEN ==================== */

.map-vote-screen {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: voteScreenFadeIn 0.4s ease-out;
}

.map-vote-screen.active {
    display: flex;
}

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

.map-vote-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
    animation: voteContentSlide 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 800px;
    width: 90%;
}

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

.map-vote-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: 0.15em;
    color: var(--primary);
    text-shadow: 0 0 30px var(--primary-glow);
    margin: 0;
}

.map-vote-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md) var(--space-xl);
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.vote-timer-label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--text-muted);
}

.vote-timer-value {
    font-family: var(--font-display);
    font-size: 3rem;
    color: var(--text-white);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.map-vote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    width: 100%;
}

.map-vote-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.map-vote-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(232, 168, 76, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.map-vote-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-dim);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.map-vote-card:hover::before {
    opacity: 1;
}

.map-vote-card.voted {
    border-color: var(--primary);
    background: rgba(232, 168, 76, 0.1);
    box-shadow: 0 0 30px var(--primary-glow);
}

.map-vote-card.voted::after {
    content: '✓ VOTED';
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--primary);
    background: rgba(232, 168, 76, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
}

.map-vote-thumb {
    font-size: 4rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.map-vote-info {
    text-align: center;
}

.map-vote-name {
    font-family: var(--font-display);
    font-size: 1.4rem;
    letter-spacing: 0.1em;
    color: var(--text-white);
    margin: 0 0 var(--space-xs) 0;
}

.map-vote-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.map-vote-count {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-gray);
    padding: var(--space-sm) var(--space-md);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    min-width: 80px;
    transition: all 0.2s ease;
}

.map-vote-card.voted .map-vote-count {
    color: var(--primary);
    background: rgba(232, 168, 76, 0.2);
}

/* Map Vote Winner Display */
.map-vote-winner {
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: 16px;
    animation: winnerPulse 1s ease-in-out infinite;
}

@keyframes winnerPulse {
    0%, 100% {
        box-shadow: 0 0 20px var(--primary-glow);
    }
    50% {
        box-shadow: 0 0 40px var(--primary-glow);
    }
}

.winner-name {
    font-family: var(--font-display);
    font-size: 2.5rem;
    letter-spacing: 0.15em;
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary-glow);
}

/* Auto-start countdown */
.auto-start-countdown {
    margin-top: var(--space-xl);
    padding: var(--space-lg) var(--space-xl);
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1), rgba(0, 255, 136, 0.05));
    border: 1px solid var(--primary);
    border-radius: 12px;
    animation: countdownPulse 1s ease-in-out infinite;
}

.countdown-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.2em;
    color: var(--text-primary);
}

#vote-countdown {
    display: inline-block;
    font-size: 2rem;
    color: var(--primary);
    min-width: 1.5em;
    text-shadow: 0 0 15px var(--primary-glow);
    animation: countdownBounce 1s ease-in-out infinite;
}

@keyframes countdownPulse {
    0%, 100% {
        box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
    }
}

@keyframes countdownBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Responsive map voting */
@media (max-width: 768px) {
    .map-vote-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .map-vote-card {
        flex-direction: row;
        text-align: left;
        padding: var(--space-md);
    }
    
    .map-vote-thumb {
        font-size: 2.5rem;
    }
    
    .map-vote-info {
        text-align: left;
        flex: 1;
    }
    
    .map-vote-count {
        position: absolute;
        top: var(--space-sm);
        right: var(--space-sm);
        font-size: 0.9rem;
        padding: var(--space-xs) var(--space-sm);
    }
    
    .map-options {
        grid-template-columns: 1fr;
    }
    
    .map-option {
        flex-direction: row;
        justify-content: flex-start;
        gap: var(--space-md);
    }
}

/* ==================== OPTIONS SCREEN ==================== */

#options-screen {
    align-items: center;
    justify-content: flex-start;
    padding-top: var(--space-xl);
    overflow-y: auto;
}

.options-content {
    width: 100%;
    max-width: 800px;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.options-tabs {
    display: flex;
    gap: var(--space-xs);
    background: var(--bg-card);
    padding: var(--space-xs);
    border-radius: 8px;
    justify-content: center;
}

.options-tab {
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.1em;
    color: var(--text-gray);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.options-tab:hover {
    color: var(--text-white);
}

.options-tab.active {
    background: var(--primary);
    color: var(--bg-void);
}

.options-panel {
    display: none;
    flex-direction: column;
    gap: var(--space-lg);
    animation: fadeIn 0.3s ease-out;
}

.options-panel.active {
    display: flex;
}

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

/* Keybindings Info Box */
.keybindings-info {
    background: rgba(232, 168, 76, 0.1);
    border: 1px solid rgba(232, 168, 76, 0.3);
    border-radius: 10px;
    padding: var(--space-md);
}

.info-text {
    font-size: 0.85rem;
    color: var(--text-gray);
    line-height: 1.6;
}

.info-text strong {
    color: var(--primary);
}

.info-icon {
    font-size: 1.1rem;
    margin-right: var(--space-xs);
}

/* Keybindings Section */
.keybindings-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: var(--space-md);
}

.section-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    color: var(--primary);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
}

.keybindings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-sm);
}

.keybind-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    transition: background 0.2s ease;
}

.keybind-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.keybind-name {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--text-gray);
}

.keybind-key {
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    color: var(--text-white);
    background: var(--bg-elevated);
    border: 2px solid var(--border-bright);
    border-radius: 6px;
    padding: var(--space-xs) var(--space-md);
    min-width: 70px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.keybind-key:hover {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.keybind-key:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.keybindings-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--space-md);
}

/* Option Rows (Audio/Graphics) */
.option-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.option-label {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-gray);
    min-width: 160px;
}

.option-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--bg-elevated);
    border-radius: 3px;
    cursor: pointer;
}

.option-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.option-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.option-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.option-value {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--primary);
    min-width: 50px;
    text-align: right;
}

.option-select {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    border-radius: 6px;
    color: var(--text-white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
}

.option-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Toggle Switch */
.option-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.option-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    border-radius: 26px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 3px;
    background: var(--text-gray);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.option-toggle input:checked + .toggle-slider {
    background: rgba(232, 168, 76, 0.3);
    border-color: var(--primary);
}

.option-toggle input:checked + .toggle-slider::before {
    background: var(--primary);
    transform: translateX(22px);
}

.options-footer {
    display: flex;
    justify-content: flex-start;
    margin-top: var(--space-md);
}

/* Keybinding Modal */
.keybind-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.keybind-modal.active {
    display: flex;
}

.keybind-modal-content {
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: 16px;
    padding: var(--space-xl);
    text-align: center;
    min-width: 320px;
    animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 40px var(--primary-glow);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.keybind-modal-title {
    font-family: var(--font-display);
    font-size: 2rem;
    letter-spacing: 0.15em;
    color: var(--primary);
    margin-bottom: var(--space-md);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.keybind-modal-action {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-white);
    margin-bottom: var(--space-lg);
}

.keybind-modal-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive Options */
@media (max-width: 768px) {
    .options-content {
        padding: var(--space-md);
    }
    
    .options-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .keybindings-grid {
        grid-template-columns: 1fr;
    }
    
    .keybind-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }
    
    .keybind-key {
        width: 100%;
        text-align: center;
    }
    
    .option-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .option-label {
        min-width: auto;
    }
    
    .option-slider {
        width: 100%;
    }
}

/* ===========================================
   MATCHMAKING & GAME MODE SYSTEM
   =========================================== */

/* ==================== PLAYER RANK DISPLAY ==================== */
.player-rank-section {
    margin-bottom: var(--space-lg);
}

.rank-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.player-rank-display {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-bright);
    border-radius: 8px;
    padding: var(--space-sm) var(--space-md);
}

.player-rank-display .rank-icon {
    font-size: 1.5rem;
}

.player-rank-display .rank-tier {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.05em;
    color: var(--text-white);
}

.player-rank-display .rank-elo {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: auto;
}

/* ==================== GAME MODE SELECTION ==================== */
.game-mode-selector {
    margin-bottom: var(--space-lg);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-mode-selector:hover {
    border-color: var(--primary-dim);
}

.mode-selector-header {
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease;
}

.mode-selector-header:hover {
    background: rgba(255, 255, 255, 0.06);
}

.current-mode-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mode-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.current-mode-display {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.current-mode-display .mode-icon {
    font-size: 1.2rem;
}

.current-mode-display .mode-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    color: var(--text-white);
}

.mode-selector-arrow {
    font-size: 0.8rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.game-mode-selector.open .mode-selector-arrow {
    transform: rotate(180deg);
}

.game-mode-grid-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-mode-selector.open .game-mode-grid-container {
    max-height: 500px;
    border-top: 1px solid var(--border);
}

.game-mode-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 2px;
    background: var(--border);
}

.game-mode-card {
    background: var(--bg-card);
    border: none;
    border-radius: 0;
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: var(--space-md);
}

.game-mode-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: none;
}

.game-mode-card.selected {
    background: rgba(232, 168, 76, 0.1);
}

.game-mode-card.selected .mode-card-name {
    color: var(--primary);
}

.mode-card-icon {
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
    margin-bottom: 0;
}

.mode-card-info {
    display: flex;
    flex-direction: column;
}

.mode-card-name {
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    color: var(--text-white);
    text-transform: uppercase;
}

.mode-card-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 1px;
}

/* ==================== QUEUE OVERLAY ==================== */
.queue-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 10, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    backdrop-filter: blur(10px);
}

.queue-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.queue-panel {
    background: linear-gradient(180deg, rgba(30, 30, 40, 0.95) 0%, rgba(20, 20, 30, 0.98) 100%);
    border: 1px solid rgba(232, 168, 76, 0.3);
    border-radius: 20px;
    padding: var(--space-xl) var(--space-xl);
    text-align: center;
    min-width: 420px;
    max-width: 500px;
    box-shadow: 
        0 0 60px rgba(232, 168, 76, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.5);
    animation: queuePanelPop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.queue-header {
    margin-bottom: var(--space-lg);
}

.queue-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    letter-spacing: 0.2em;
    color: var(--primary);
    margin-bottom: var(--space-md);
    text-shadow: 0 0 20px var(--primary-glow);
}

.queue-mode {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.05);
    padding: var(--space-sm) var(--space-md);
    border-radius: 8px;
    display: inline-flex;
}

.queue-mode-icon {
    font-size: 1.3rem;
}

.queue-mode-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    color: var(--text-white);
}

.queue-animation {
    position: relative;
    width: 180px;
    height: 180px;
    margin: var(--space-lg) auto;
}

.queue-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid transparent;
}

.queue-ring-1 {
    inset: 0;
    border-color: rgba(232, 168, 76, 0.3);
    border-top-color: var(--primary);
    animation: spin 2s linear infinite;
}

.queue-ring-2 {
    inset: 15px;
    border-color: rgba(232, 168, 76, 0.2);
    border-right-color: var(--primary-dim);
    animation: spin 3s linear infinite reverse;
}

.queue-ring-3 {
    inset: 30px;
    border-color: rgba(232, 168, 76, 0.1);
    border-bottom-color: rgba(232, 168, 76, 0.5);
    animation: spin 4s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.queue-time {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 2.5rem;
    letter-spacing: 0.05em;
    color: var(--text-white);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.queue-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.queue-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.queue-stat .stat-label {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.queue-stat .stat-value {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-white);
}

#queue-rank {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

#queue-rank .rank-icon {
    font-size: 1.2rem;
}

.queue-actions {
    margin-top: var(--space-md);
}

.btn-cancel-queue {
    background: transparent;
    border: 2px solid rgba(217, 83, 79, 0.5);
    color: var(--danger);
    padding: var(--space-sm) var(--space-lg);
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    transition: all 0.2s ease;
}

.btn-cancel-queue:hover {
    background: rgba(217, 83, 79, 0.15);
    border-color: var(--danger);
    box-shadow: 0 0 20px rgba(217, 83, 79, 0.2);
}

.btn-cancel-queue .cancel-icon {
    font-size: 0.8rem;
}

/* Play button in-queue state */
.btn-matchmaking.in-queue {
    pointer-events: none;
    opacity: 0.5;
}

.btn-danger {
    background: rgba(217, 83, 79, 0.2);
    border: 2px solid var(--danger);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(217, 83, 79, 0.3);
    box-shadow: 0 0 15px rgba(217, 83, 79, 0.3);
}

/* ==================== MATCH FOUND STATE ==================== */
.queue-overlay.match-found {
    background: rgba(5, 5, 10, 0.95);
}

.match-found-panel {
    background: linear-gradient(180deg, rgba(40, 50, 40, 0.95) 0%, rgba(25, 35, 25, 0.98) 100%);
    border: 2px solid rgba(92, 184, 92, 0.5);
    border-radius: 20px;
    padding: var(--space-xl);
    text-align: center;
    min-width: 450px;
    max-width: 550px;
    box-shadow: 
        0 0 80px rgba(92, 184, 92, 0.2),
        0 20px 60px rgba(0, 0, 0, 0.5);
    animation: matchFoundPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.match-found-header {
    margin-bottom: var(--space-lg);
}

.match-found-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto var(--space-md);
    background: rgba(92, 184, 92, 0.2);
    border: 2px solid var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--success);
    animation: checkPop 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes checkPop {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.match-found-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    letter-spacing: 0.2em;
    color: var(--success);
    text-shadow: 0 0 30px rgba(92, 184, 92, 0.5);
}

.match-found-details {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.match-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.match-detail .detail-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.match-detail .detail-label {
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-transform: uppercase;
}

.match-detail .detail-value {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.05em;
    color: var(--text-white);
}

.match-detail .detail-value.team-spies {
    color: #5bc0de;
}

.match-detail .detail-value.team-mercs {
    color: #d9534f;
}

.match-players-list {
    margin-bottom: var(--space-lg);
}

.players-label {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: var(--space-sm);
}

.players-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
}

.match-player-card {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    padding: var(--space-xs) var(--space-sm);
    border-left: 3px solid transparent;
}

.match-player-card.spies {
    border-left-color: #5bc0de;
}

.match-player-card.mercs {
    border-left-color: #d9534f;
}

.match-player-card .player-rank-icon {
    font-size: 1rem;
}

.match-player-card .player-name {
    font-size: 0.8rem;
    color: var(--text-white);
}

.match-countdown-section {
    margin-top: var(--space-md);
}

.countdown-label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.countdown-circle {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: rgba(92, 184, 92, 0.1);
    border: 3px solid var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(92, 184, 92, 0.4);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(92, 184, 92, 0);
    }
}

.countdown-circle .countdown-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--success);
}

/* ==================== MODE-SPECIFIC HUD ==================== */
.mode-specific-hud {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
}

/* CTF HUD */
.ctf-hud {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.flag-status {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    background: var(--bg-card);
    border-radius: 12px;
    padding: var(--space-sm) var(--space-md);
}

.flag-status .flag {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.flag-status .flag.spies .flag-label {
    color: #5bc0de;
}

.flag-status .flag.mercs .flag-label {
    color: #d9534f;
}

.flag-icon {
    font-size: 1.5rem;
}

.flag-label {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.flag-state {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.score-display {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-display);
    font-size: 2rem;
}

#spy-score {
    color: #5bc0de;
}

#merc-score {
    color: #d9534f;
}

.score-divider {
    color: var(--text-muted);
}

/* KOTH HUD */
.koth-hud {
    min-width: 400px;
}

.hill-control {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: var(--bg-card);
    border-radius: 12px;
    padding: var(--space-sm) var(--space-md);
}

.hill-team {
    flex: 1;
    position: relative;
    height: 24px;
    background: var(--bg-elevated);
    border-radius: 4px;
    overflow: hidden;
}

.hill-team .hill-bar {
    position: absolute;
    inset: 0;
    width: 0;
    transition: width 0.5s ease;
}

.hill-team.spies .hill-bar {
    background: linear-gradient(90deg, transparent, #5bc0de);
}

.hill-team.mercs .hill-bar {
    background: linear-gradient(270deg, transparent, #d9534f);
    right: 0;
    left: auto;
}

.hill-team .hill-label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    font-weight: 600;
    z-index: 1;
}

.hill-team.spies .hill-label {
    left: var(--space-sm);
    color: #5bc0de;
}

.hill-team.mercs .hill-label {
    right: var(--space-sm);
    color: #d9534f;
}

.hill-indicator {
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    padding: var(--space-xs) var(--space-sm);
    border-radius: 4px;
    min-width: 100px;
    text-align: center;
    background: var(--bg-elevated);
}

.hill-indicator.spies {
    color: #5bc0de;
    border: 1px solid #5bc0de;
}

.hill-indicator.mercs {
    color: #d9534f;
    border: 1px solid #d9534f;
}

.hill-indicator.contested {
    color: var(--warning);
    border: 1px solid var(--warning);
}

/* TDM HUD */
.tdm-hud {
    min-width: 300px;
}

.team-scores {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    background: var(--bg-card);
    border-radius: 12px;
    padding: var(--space-sm) var(--space-lg);
}

.team-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.team-score .team-name {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.team-score.spies .team-name {
    color: #5bc0de;
}

.team-score.mercs .team-name {
    color: #d9534f;
}

.team-score-value {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--text-white);
}

/* FFA HUD */
.ffa-hud {
    display: flex;
    gap: var(--space-lg);
    background: var(--bg-card);
    border-radius: 12px;
    padding: var(--space-sm) var(--space-md);
}

.ffa-position, .ffa-leader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.position-label, .leader-label {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.position-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--primary);
}

.leader-name {
    font-size: 0.85rem;
    color: var(--text-white);
}

.leader-kills {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--warning);
}

/* ==================== RESPONSIVE MATCHMAKING ==================== */
@media (max-width: 768px) {
    .game-mode-grid {
        grid-template-columns: 1fr;
    }
    
    .game-mode-card:nth-child(5) {
        grid-column: span 1;
    }
    
    .queue-container {
        min-width: 90vw;
        padding: var(--space-lg);
    }
    
    .match-found-title {
        font-size: 2.5rem;
    }
    
    .match-found-info {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .mode-specific-hud {
        width: 90%;
    }
    
    .hill-control, .flag-status, .team-scores, .ffa-hud {
        width: 100%;
    }
}

