/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary: #00d4ff;
    --primary-dark: #0099cc;
    --secondary: #ff6b00;
    --success: #00ff88;
    --danger: #ff3366;
    --warning: #ffaa00;
    
    --bg-dark: #0a0e1a;
    --bg-darker: #050810;
    --bg-card: #151b2e;
    --bg-card-hover: #1a2238;
    
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    
    --border: #2d3748;
    --border-light: #4a5568;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(0, 212, 255, 0.3);
    
    /* Fonts */
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
}

body {
    font-family: var(--font-body);
    background: var(--bg-darker);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
}

/* ===== SCREENS ===== */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screen.active {
    display: block;
    opacity: 1;
}

#matchmaking-screen.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

#auth-screen.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Auth Screen */
.auth-container {
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(20px);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 60px;
    width: 450px;
    text-align: center;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.5s ease;
}

.auth-subtitle {
    color: var(--primary);
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 40px;
    letter-spacing: 2px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 15px;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary);
    background: rgba(0, 212, 255, 0.05);
    outline: none;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.auth-toggle {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-toggle a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.auth-toggle a:hover {
    text-decoration: underline;
}

.auth-error-msg {
    color: #ff3366;
    font-family: var(--font-display);
    margin-top: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* ===== MAIN MENU ===== */
#main-menu {
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f35 100%);
}

.menu-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 107, 0, 0.1) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.menu-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.game-logo {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(0, 212, 255, 0.5);
    letter-spacing: 8px;
    margin-bottom: 10px;
    animation: logoGlow 3s ease-in-out infinite;
}

#garage-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: all; /* Allow rotating tank */
    z-index: 0;
}

@keyframes logoGlow {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.5)); }
    50% { filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.8)); }
}

.game-subtitle {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--text-secondary);
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* Player Info */
.player-info {
    display: flex;
    align-items: center;
    gap: 25px;
    background: var(--bg-card);
    padding: 25px;
    border-radius: 20px;
    border: 2px solid var(--border);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.player-avatar {
    position: relative;
    width: 100px;
    height: 100px;
}

.avatar-ring {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.avatar-image {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--bg-darker);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border: 3px solid var(--bg-card);
}

.player-details {
    flex: 1;
}

.player-name {
    font-family: var(--font-display);
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.player-rank {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.rank-icon {
    font-size: 1.5rem;
}

.rank-level {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--warning);
}

.player-xp {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.xp-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-darker);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.xp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.xp-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Menu Buttons */
.menu-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.menu-btn {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    padding: 20px 30px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.menu-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

.menu-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    grid-column: 1 / -1;
}

.menu-btn.primary:hover {
    background: linear-gradient(135deg, #00e5ff, #00b8d4);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.6);
}

.btn-icon {
    font-size: 1.8rem;
}

/* Stats */
.stats-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-item {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid var(--border);
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

/* ===== SCREEN HEADER ===== */
.screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    background: var(--bg-card);
    border-bottom: 2px solid var(--border);
}

.screen-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.back-btn {
    font-family: var(--font-display);
    font-size: 1.1rem;
    padding: 12px 24px;
    background: var(--bg-darker);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

/* ===== GARAGE ===== */
.garage-container {
    padding: 40px;
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
}

.garage-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 20px;
    border: 2px solid var(--primary-dark);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.garage-preview::before {
    display: none;
    /* Removed scan effect */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(0, 212, 255, 0.05) 50%, transparent 100%);
    animation: scan 3s linear infinite;
}

@keyframes scan {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

.tank-preview {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#garage-canvas {
    width: 100%;
    height: 100%;
    cursor: grab;
}

#garage-canvas:active {
    cursor: grabbing;
}

.garage-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.garage-tab {
    font-family: var(--font-display);
    font-size: 1.1rem;
    padding: 15px 30px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.garage-tab:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.garage-tab.active {
    background: var(--primary);
    color: var(--bg-darker);
    border-color: var(--primary);
}

.garage-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

.garage-item {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.garage-item:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

.garage-item.selected {
    border-color: var(--success);
    background: var(--bg-card-hover);
}

.garage-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.item-name {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.item-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.item-stat {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.stat-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-darker);
    border-radius: 4px;
    margin: 0 10px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    transition: width 0.3s ease;
}

/* ===== SHOP ===== */
.currency {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--warning);
}

.currency-icon {
    font-size: 1.8rem;
}

.shop-container {
    padding: 40px;
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
}

.shop-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 20px;
    border: 2px solid var(--primary-dark);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.shop-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.shop-tab {
    font-family: var(--font-display);
    font-size: 1.1rem;
    padding: 15px 30px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.shop-tab:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.shop-tab.active {
    background: var(--primary);
    color: var(--bg-darker);
    border-color: var(--primary);
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

.shop-item {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
}

.shop-item:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

.shop-item.owned {
    border-color: var(--success);
}

.shop-item.selected {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

.item-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.price-value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--warning);
}

.buy-btn {
    font-family: var(--font-display);
    padding: 10px 20px;
    background: var(--primary);
    color: var(--bg-darker);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}

.buy-btn:hover {
    background: #00e5ff;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.5);
}

.buy-btn:disabled {
    background: var(--bg-darker);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* ===== SETTINGS ===== */
.settings-container {
    padding: 40px;
    max-width: 600px;
    margin: 0 auto;
}

.setting-group {
    margin-bottom: 30px;
}

.setting-group label {
    display: block;
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.setting-group input[type="text"],
.setting-group select {
    width: 100%;
    padding: 15px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.setting-group input[type="text"]:focus,
.setting-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.setting-group input[type="range"] {
    width: calc(100% - 60px);
    margin-right: 15px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 25px;
    height: 25px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
}

/* ===== GAME SCREEN ===== */
#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
    background: #1a2332;
}

/* HUD */
.hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.hud > * {
    pointer-events: auto;
}

.hud-top {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 30px;
}

.team-score {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(10, 14, 26, 0.9);
    padding: 15px 30px;
    border-radius: 15px;
    border: 2px solid var(--border);
    backdrop-filter: blur(10px);
}

.score-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.score-item.blue .team-name {
    color: #00d4ff;
}

.score-item.red .team-name {
    color: #ff3366;
}

.team-kills {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
}

.score-item.blue .team-kills {
    color: #00d4ff;
}

.score-item.red .team-kills {
    color: #ff3366;
}

.score-divider {
    font-size: 2rem;
    color: var(--text-muted);
}

.match-timer {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--warning);
    background: rgba(10, 14, 26, 0.9);
    padding: 15px 30px;
    border-radius: 15px;
    border: 2px solid var(--border);
    backdrop-filter: blur(10px);
}

.hud-bottom {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
}

.bars-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.reload-bar {
    position: relative;
    width: 300px;
    height: 8px;
    margin-bottom: 5px;
    background: rgba(10, 14, 26, 0.9);
    border-radius: 4px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.reload-fill {
    height: 100%;
    width: 0%;
    background: var(--warning);
}

.nitro-bar {
    position: relative;
    width: 300px;
    height: 8px;
    margin-bottom: 5px;
    background: rgba(10, 14, 26, 0.9);
    border-radius: 4px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.nitro-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #00d4ff, #0088ff);
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.health-bar {
    position: relative;
    width: 300px;
    height: 40px;
    background: rgba(10, 14, 26, 0.9);
    border-radius: 20px;
    border: 2px solid var(--border);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.health-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #00ff88, #00d4ff);
    transition: width 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.health-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 1;
}

/* Ability HUD */
.ability-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ability-icon {
    width: 45px;
    height: 45px;
    background: rgba(10, 14, 26, 0.9);
    border: 2px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
}

/* HUD Animations and States */
.ability-icon.ready, .reload-bar.ready {
    border-color: #00ff88 !important;
    animation: ready-glance 2s infinite ease-in-out;
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

.ability-icon.active {
    background: #00ff88 !important;
    color: #000 !important;
    animation: pulse-active 1s infinite alternate;
}

@keyframes ready-glance {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.05); filter: brightness(1.3); }
}

@keyframes pulse-active {
    0% { box-shadow: 0 0 5px #00ff88; }
    100% { box-shadow: 0 0 20px #00ff88; }
}

.nitro-bar.active .nitro-fill {
    animation: nitro-vibration 0.1s infinite alternate;
    background: #ffaa00;
}

@keyframes nitro-vibration {
    from { transform: translateX(-1px); }
    to { transform: translateX(1px); }
}

.ability-fill {
    width: 0%;
    height: 100%;
    background: var(--primary);
    transition: width 0.1s linear, background 0.3s ease;
}

.ammo-counter {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--warning);
    background: rgba(10, 14, 26, 0.9);
    padding: 10px 25px;
    border-radius: 15px;
    border: 2px solid var(--border);
    backdrop-filter: blur(10px);
}

.minimap {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 200px;
    height: 200px;
    background: rgba(10, 14, 26, 0.9);
    border: 2px solid var(--border);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.camera-mode {
    position: absolute;
    bottom: 240px;
    right: 30px;
    background: rgba(10, 14, 26, 0.9);
    padding: 12px 20px;
    border-radius: 10px;
    border: 2px solid var(--border);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.camera-mode:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.camera-icon {
    font-size: 1.5rem;
}

.camera-text {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--primary);
    font-weight: 700;
}

.camera-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

.crosshair {
    position: fixed;
    pointer-events: none;
    width: 40px;
    height: 40px;
    z-index: 1000;
    transform: translate(-50%, -50%);
    display: none;
}

.game-screen.active .crosshair {
    display: block;
}

.crosshair-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: var(--success);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 8px var(--success);
}

.crosshair-line {
    position: absolute;
    background: var(--success);
    opacity: 0.9;
    box-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
}

.crosshair-top {
    top: -5px;
    left: 50%;
    width: 2px;
    height: 12px;
    transform: translateX(-50%);
}

.crosshair-bottom {
    bottom: -5px;
    left: 50%;
    width: 2px;
    height: 12px;
    transform: translateX(-50%);
}

.crosshair-left {
    top: 50%;
    left: -5px;
    width: 12px;
    height: 2px;
    transform: translateY(-50%);
}

.crosshair-right {
    top: 50%;
    right: -5px;
    width: 12px;
    height: 2px;
    transform: translateY(-50%);
}

.game-announcement {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2000;
    text-align: center;
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 5px;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8), 0 0 40px currentColor;
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-announcement.active {
    opacity: 1;
    font-size: 5rem;
    animation: announcement-in 3s forwards;
}

@keyframes announcement-in {
    0% { transform: translate(-50%, -100%) scale(0.5); opacity: 0; }
    10% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
    15% { transform: translate(-50%, -50%) scale(1); }
    80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, 0%) scale(1.2); opacity: 0; }
}

/* Hitmarker */
.hitmarker {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease;
}

.hm-line {
    position: absolute;
    width: 2px;
    height: 10px;
    background: #fff;
    box-shadow: 0 0 5px #fff;
}

.hm-1 { top: 0; left: 0; transform: rotate(-45deg); transform-origin: top left; }
.hm-2 { top: 0; right: 0; transform: rotate(45deg); transform-origin: top right; }
.hm-3 { bottom: 0; left: 0; transform: rotate(45deg); transform-origin: bottom left; }
.hm-4 { bottom: 0; right: 0; transform: rotate(-45deg); transform-origin: bottom right; }

/* Kill Notification */
.kill-notification {
    position: absolute;
    bottom: 25%;
    left: 50%;
    transform: translate(-50%, 0) scale(0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.kill-notification.active {
    opacity: 1;
    transform: translate(-50%, -20px) scale(1);
}

.kill-label {
    font-size: 1.2rem;
    font-weight: 900;
    color: #ff3366;
    letter-spacing: 3px;
    text-shadow: 0 0 10px #ff3366;
}

.kill-name {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

/* Low Health / Damage Overlay */
.damage-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 500;
    box-shadow: inset 0 0 100px rgba(255, 0, 0, 0);
    transition: box-shadow 0.3s ease;
}

.damage-overlay.low-health {
    box-shadow: inset 0 0 150px rgba(255, 0, 0, 0.6);
    animation: pulse-red 1s infinite alternate;
}

@keyframes pulse-red {
    from { box-shadow: inset 0 0 100px rgba(255, 0, 0, 0.4); }
    to { box-shadow: inset 0 0 200px rgba(255, 0, 0, 0.7); }
}

.kill-feed {
    position: absolute;
    top: 120px;
    right: 30px;
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kill-feed-entry {
    background: rgba(10, 14, 26, 0.8);
    padding: 10px 15px;
    border-radius: 5px;
    border-left: 3px solid var(--primary);
    font-size: 0.9rem;
    font-family: var(--font-display);
    backdrop-filter: blur(5px);
    animation: slideIn 0.3s ease;
    transition: opacity 0.5s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.pause-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    padding: 12px 20px;
    background: rgba(10, 14, 26, 0.9);
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.pause-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

/* ===== MODALS ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    border: 2px solid var(--border);
    box-shadow: var(--shadow-lg);
    min-width: 400px;
    text-align: center;
}

.modal-content h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.modal-content .menu-btn {
    width: 100%;
    margin-top: 15px;
}

/* Gold Box Notification */
.game-announcement.gold-box-notification {
    color: #ffd700;
    font-size: 4rem; /* Reduced size */
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8), 0 0 30px #ffaa00;
    animation: gold-pulse 1s infinite alternate;
    z-index: 2001;
    width: 80%; /* Limit width */
    left: 50%;
    transform: translateX(-50%);
    top: 20%; /* Move up slightly */
}

@keyframes gold-pulse {
    from { transform: translate(-50%, -50%) scale(1); filter: brightness(1); }
    to { transform: translate(-50%, -50%) scale(1.1); filter: brightness(1.5); }
}

/* Results */
.modal-content.results {
    min-width: 500px;
}

.result-title {
    font-size: 3rem !important;
    margin-bottom: 40px !important;
}

.result-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
}

.result-stat {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-stat .stat-value {
    font-size: 2.5rem;
}

.result-stat .stat-value.xp {
    color: var(--success);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* ===== RESPONSIVE ===== */
/* Sniper Scope */
.sniper-scope {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 500;
    display: none;
}

.sniper-scope.active {
    display: block;
}

.scope-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vh;
    height: 80vh;
    border: 4px solid #00ff00;
    border-radius: 50%;
    box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.95), 0 0 30px #00ff00 inset;
}

.scope-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vh;
    height: 80vh;
}

.crosshair-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border: 2px solid #00ff00;
    border-radius: 50%;
}

.crosshair-h, .crosshair-v {
    position: absolute;
    background: #00ff00;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.5);
}

.crosshair-h {
    top: 50%;
    left: 0;
    width: 100%;
    height: 1.5px;
}

.crosshair-v {
    left: 50%;
    top: 0;
    width: 1.5px;
    height: 100%;
}

/* Rangefinder marks */
.scope-crosshair::before,
.scope-crosshair::after {
    content: '';
    position: absolute;
    background: #00ff00;
}

.scope-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 30%, rgba(0, 50, 0, 0.3) 100%);
}

.scope-stats {
    position: absolute;
    bottom: 25%;
    right: 35%;
    color: #00ff00;
    font-family: var(--font-display);
    text-shadow: 0 0 10px #00ff00;
    font-size: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.zoom-level {
    font-weight: 800;
    letter-spacing: 1px;
}

/* Response Fixes */
@media (max-width: 768px) {
    .scope-ring {
        width: 90vw;
        height: 90vw;
    }
}

/* ===== CAPTURE BAR ===== */
.capture-bar-container {
    position: absolute;
    bottom: 15vh;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    background: rgba(0, 0, 0, 0.8);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.capture-label {
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.capture-progress-bg {
    width: 100%;
    height: 14px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.capture-progress-fill {
    width: 0%;
    height: 100%;
    background: var(--primary);
    transition: width 0.1s linear, background-color 0.3s ease;
    box-shadow: 0 0 15px var(--primary);
}

#floating-texts {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 900;
    overflow: hidden;
}

.floating-text {
    position: absolute;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    text-shadow: 0 0 5px rgba(0,0,0,0.8);
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: floatUp 1s ease-out forwards;
}

@keyframes floatUp {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    20% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -150%) scale(1); opacity: 0; }
}

/* ===== MATCHMAKING SCREEN ===== */
.matchmaking-content {
    background: rgba(10, 14, 26, 0.95);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 500px;
    max-width: 90vw;
}

.matchmaking-status {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px var(--primary-glow);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#matchmaking-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.players-list-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 30px;
    text-align: left;
    height: 250px;
    overflow-y: auto;
}

.players-list-container h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
}

.found-player {
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    margin-bottom: 5px;
    animation: slideRight 0.3s ease;
}

.found-player.self {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.fp-name {
    flex: 1;
    font-weight: 600;
}

.fp-rank {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-right: 15px;
}

.fp-status {
    font-size: 0.8rem;
    color: var(--primary);
}

@keyframes slideRight {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== CHAT ===== */
.chat-container {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 350px;
    height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none; /* Let clicks pass through unless typing */
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: hidden;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.chat-message {
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 5px;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease;
    width: fit-content;
    max-width: 100%;
    word-wrap: break-word;
}

.chat-author {
    font-weight: 700;
    margin-right: 5px;
}

.chat-text {
    color: #fff;
}

.chat-input {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 8px 12px;
    color: #fff;
    font-family: var(--font-body);
    outline: none;
    transition: all 0.2s ease;
    opacity: 0;
}

.chat-input.active {
    opacity: 1;
    border-color: var(--primary);
}

/* ===== REWARD MODAL ===== */
.reward-info {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.streak-counter {
    margin-top: 10px;
    font-size: 1.2rem;
    color: var(--warning);
    font-weight: 700;
}

.reward-box {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--primary);
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.2);
}

.reward-amount {
    font-size: 3rem;
    font-family: var(--font-display);
    color: var(--text-primary);
    text-shadow: 0 0 10px var(--primary);
}

.crystal-icon {
    font-size: 2.5rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

