:root {
    --pubg-yellow: #FFC107;
    --bg-dark: #0a0a0a;
    --glass: rgba(20, 20, 20, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    color: #fff;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    cursor: none; /* We use a custom crosshair */
}

#app {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Background */
#bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

#main-bg {
    width: 100%;
    height: 100%;
    object-cover: cover;
    filter: brightness(0.4) contrast(1.2);
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 40%, var(--bg-dark) 100%);
    background-image: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    pointer-events: none;
}

/* Game Canvas */
#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    width: 100%;
    height: 100%;
}

/* UI Layers */
#ui-overlay {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none; /* Let clicks pass to canvas */
}

header {
    margin-top: 40px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.logo-container {
    padding: 15px 40px;
    border-radius: 4px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    background: var(--glass);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.font-gamer {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 4px;
    font-weight: 800;
}

.text-yellow {
    color: var(--pubg-yellow);
}

#instructions {
    position: absolute;
    bottom: 50px;
    padding: 20px 40px;
    text-align: center;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    background: var(--glass);
    border-radius: 4px;
}

#instructions p {
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--pubg-yellow);
    margin-bottom: 5px;
    font-weight: bold;
}

#instructions h2 {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 400;
}

.target-counter {
    background: rgba(0,0,0,0.3);
    padding: 10px 20px;
    border-radius: 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    border: 1px solid rgba(255,255,255,0.05);
}

#hits {
    color: var(--pubg-yellow);
    font-weight: 800;
}

/* Success Screen */
#success-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 50px 80px;
    text-align: center;
    border-radius: 8px;
    border: 2px solid var(--pubg-yellow);
    background: rgba(0,0,0,0.9);
    z-index: 100;
}

.loading-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    margin-top: 20px;
    border-radius: 2px;
    overflow: hidden;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background: var(--pubg-yellow);
    box-shadow: 0 0 10px var(--pubg-yellow);
    animation: load 2s forwards;
}

@keyframes load {
    to { width: 100%; }
}

/* Custom Crosshair */
#crosshair {
    position: fixed;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 1000;
    mix-blend-mode: difference;
}

.ch-line {
    position: absolute;
    background: #fff;
}

.ch-top, .ch-bottom { width: 2px; height: 10px; left: 19px; }
.ch-top { top: 0; }
.ch-bottom { bottom: 0; }
.ch-left, .ch-right { width: 10px; height: 2px; top: 19px; }
.ch-left { left: 0; }
.ch-right { right: 0; }
.ch-dot { position: absolute; width: 4px; height: 4px; background: #fff; border-radius: 50%; top: 18px; left: 18px; }

/* Start Overlay */
#start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

#start-btn {
    padding: 20px 40px;
    background: var(--pubg-yellow);
    color: #000;
    border: none;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(255, 193, 7, 0.4);
    transition: transform 0.2s;
}

#start-btn:hover {
    transform: scale(1.1);
}

/* Helpers */
.glass {
    backdrop-filter: blur(10px);
    background: var(--glass);
    border: 1px solid var(--glass-border);
}

.hidden { display: none !important; }

.fade-in {
    animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
