/* TACTICAL SHOOTER THEME (PROJECT IGI) - Improved Visibility */
:root {
    --tac-green: #66BB6A;
    /* Brighter green */
    --tac-dark: #0d1a0d;
    /* Slightly lighter */
    --tac-alert: #ff5252;
    /* Brighter red */
    --font-ui: 'OCR A Std', 'Courier New', monospace;
    --valorant-red: #ff5252;
    --valorant-light: #e8e8e8;
    --valorant-dark: #0d1a0d;
}

body {
    overflow: hidden;
    background: #0d1a0d !important;
    /* Lighter tactical dark */
    cursor: none;
}

/* Hide the custom cursor from main.js in game */
.custom-cursor,
body>div[style*="position: fixed"][style*="border-radius: 50%"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999 !important;
    background: #000;
}

/* UI Layer */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    font-family: var(--font-ui);
    color: var(--tac-green);
    text-shadow: 0 0 5px var(--tac-green);
}

.hud-top {
    display: flex;
    justify-content: space-between;
    padding: 2rem;
    background: linear-gradient(to bottom, rgba(0, 20, 0, 0.8), transparent);
}

.label {
    font-size: 0.8rem;
    opacity: 0.7;
    display: block;
}

#timer-val {
    font-size: 2rem;
    border: 1px solid var(--tac-green);
    padding: 0.2rem 1rem;
    background: rgba(0, 20, 0, 0.5);
}

/* Plus-type crosshair */
#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    pointer-events: none;
}

#crosshair::before,
#crosshair::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 4px rgba(0, 255, 0, 0.8);
}

/* Horizontal line */
#crosshair::before {
    width: 20px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Vertical line */
#crosshair::after {
    width: 2px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Menus */
.menu-screen {
    pointer-events: auto;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 5, 0, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--tac-green);
    cursor: default;
    z-index: 20;
}

.game-title {
    font-size: 5rem;
    font-family: 'Stencil', sans-serif;
    /* Military vibe */
    letter-spacing: 5px;
    border-bottom: 2px solid var(--tac-green);
    margin-bottom: 0.5rem;
}

.subtitle {
    letter-spacing: 8px;
    margin-bottom: 3rem;
    opacity: 0.8;
}

.menu-btn,
.retry-btn {
    background: transparent;
    color: var(--tac-green);
    border: 2px solid var(--tac-green);
    padding: 1rem 3rem;
    font-size: 1.5rem;
    font-family: var(--font-ui);
    cursor: pointer;
    margin: 1rem;
    transition: all 0.2s;
    text-shadow: 0 0 5px var(--tac-green);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.1);
}

.menu-btn:hover {
    background: var(--tac-green);
    color: #000;
    box-shadow: 0 0 20px var(--tac-green);
}

.controls-hint {
    margin-top: 2rem;
    display: flex;
    gap: 2rem;
    opacity: 0.6;
    font-size: 0.9rem;
}

/* Hide custom cursor from main site */
.custom-cursor {
    display: none !important;
}

/* Responsive / Mobile */
@media (max-width: 768px) {
    .menu-screen {
        padding: 1rem;
        text-align: center;
        overflow-y: auto;
    }

    .game-title {
        font-size: 2.5rem;
        letter-spacing: 3px;
        margin-bottom: 0.25rem;
    }

    .subtitle {
        font-size: 0.85rem;
        letter-spacing: 4px;
        margin-bottom: 2rem;
    }

    .mode-select {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        padding: 0 0.5rem;
        margin-bottom: 2rem;
    }

    .mode-btn {
        width: 100%;
        max-width: 260px;
        padding: 1rem;
    }

    .mode-name {
        font-size: 1.1rem;
    }

    .mode-desc {
        font-size: 0.7rem;
    }

    #start-btn {
        padding: 1rem 2.5rem;
        font-size: 1.2rem;
        min-width: 200px;
    }

    .menu-btn,
    .retry-btn {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
        margin: 0.5rem;
    }

    /* Stats grid on results */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 2rem 0;
    }

    .stat-value {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 1rem;
    }

    /* HUD mobile */
    .hud-top {
        padding: 0.75rem 1rem;
    }

    #timer-val {
        font-size: 2rem;
        padding: 0.15rem 0.5rem;
    }

    #score-val,
    #accuracy-val {
        font-size: 1.5rem;
    }

    .label {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }
}

@media (max-width: 480px) {
    .game-title {
        font-size: 2rem;
    }

    .mode-btn {
        padding: 0.75rem;
    }

    #start-btn {
        padding: 0.9rem 2rem;
        font-size: 1.1rem;
    }
}

body {
    overflow: hidden;
    /* Prevent scrolling */
    background-color: #000;
    cursor: none;
    /* Hide default cursor */
}

#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2500;
    /* Above header/footer but strictly managed */
    background: #000;
    font-family: 'Outfit', sans-serif;
    cursor: none;
    /* Ensure cursor is hidden inside container */
}

/* Canvas */
#canvas-container {
    width: 100%;
    height: 100%;
    display: block;
}

/* UI Layer */
#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Let clicks pass through to canvas when playing */
    z-index: 10;
}

.menu-screen {
    pointer-events: auto;
    /* Re-enable clicks for menus */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 25, 35, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--valorant-light);
    backdrop-filter: blur(10px);
    cursor: default;
    /* Restore cursor for menu interactions */
}

/* Typography */
.game-title {
    font-size: 8rem;
    font-weight: 900;
    letter-spacing: 10px;
    margin: 0;
    color: var(--valorant-red);
    text-shadow: 4px 4px 0px rgba(255, 70, 85, 0.2);
    line-height: 1;
}

.subtitle {
    font-size: 1.5rem;
    letter-spacing: 8px;
    margin-bottom: 4rem;
    border-bottom: 2px solid var(--valorant-red);
    padding-bottom: 1rem;
    color: var(--valorant-light);
    opacity: 0.8;
}

/* Mode Selection */
.mode-select {
    display: flex;
    gap: 2rem;
    margin-bottom: 4rem;
}

.mode-btn {
    background: transparent;
    border: 1px solid rgba(236, 232, 225, 0.2);
    padding: 2rem;
    width: 200px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.mode-btn:hover {
    border-color: var(--valorant-red);
    background: rgba(255, 70, 85, 0.05);
    transform: translateY(-5px);
}

.mode-btn.active {
    background: var(--valorant-red);
    border-color: var(--valorant-red);
    box-shadow: 0 10px 30px rgba(255, 70, 85, 0.3);
}

.mode-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--valorant-light);
    letter-spacing: 1px;
}

.mode-desc {
    font-size: 0.8rem;
    color: rgba(236, 232, 225, 0.6);
    text-transform: uppercase;
}

.mode-btn.active .mode-name,
.mode-btn.active .mode-desc {
    color: #fff;
}

/* Buttons */
#start-btn,
.retry-btn,
.menu-btn {
    background: var(--valorant-light);
    color: var(--valorant-dark);
    border: none;
    padding: 1.2rem 4rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s;
    clip-path: polygon(10% 0, 100% 0, 100% 70%, 90% 100%, 0 100%, 0 30%);
    margin: 1rem;
}

#start-btn:hover,
.retry-btn:hover,
.menu-btn:hover {
    transform: translateY(-2px);
    background: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.controls-hint {
    position: absolute;
    bottom: 3rem;
    display: flex;
    gap: 3rem;
    opacity: 0.5;
    font-family: monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* HUD */
.hud-top {
    position: absolute;
    top: 2rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 4rem;
    box-sizing: border-box;
}

.score-box,
.accuracy-box,
.timer-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.label {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.2rem;
}

#score-val,
#accuracy-val {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
}

#timer-val {
    font-size: 4rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Crosshair */
#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 4px;
    background: #00ff00;
    /* Classic green */
    border-radius: 50%;
    box-shadow: 0 0 4px #00ff00;
    pointer-events: none;
}

#crosshair::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 50%;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    margin: 4rem 0;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-label {
    color: var(--valorant-red);
    font-size: 1.2rem;
    letter-spacing: 2px;
    font-weight: 600;
}

.stat-value {
    font-size: 4rem;
    font-weight: 800;
    color: #fff;
}

#final-rank {
    font-size: 5rem;
    text-transform: uppercase;
    letter-spacing: 4px;
}

/* Hide site's custom cursor on this page to prevent double cursor */
.custom-cursor {
    display: none !important;
}