* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
    background: #000;
    font-family: 'Rajdhani', 'Share Tech Mono', monospace;
    color: #00e5ff;
    cursor: crosshair;
}

#game-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
    pointer-events: none;
}

.overlay > * {
    pointer-events: auto;
}

/* ========== MAIN MENU ========== */
#menu {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 5, 15, 0.85);
    pointer-events: auto;
    z-index: 100;
}

.menu-container {
    text-align: center;
    padding: 60px;
    border: 1px solid rgba(0, 229, 255, 0.3);
    background: rgba(0, 20, 30, 0.6);
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.1), inset 0 0 40px rgba(0, 229, 255, 0.05);
}

.title {
    font-family: 'Rajdhani', sans-serif;
    font-size: 72px;
    font-weight: 700;
    letter-spacing: 20px;
    color: #00e5ff;
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.5), 0 0 40px rgba(0, 229, 255, 0.3);
    margin-bottom: 5px;
}

.subtitle {
    font-size: 18px;
    letter-spacing: 15px;
    color: rgba(0, 229, 255, 0.5);
    margin-bottom: 50px;
}

.menu-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.menu-form label {
    font-size: 14px;
    letter-spacing: 5px;
    color: rgba(0, 229, 255, 0.6);
}

.menu-form input {
    width: 300px;
    padding: 12px 20px;
    background: rgba(0, 20, 30, 0.8);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: #00e5ff;
    font-family: 'Share Tech Mono', monospace;
    font-size: 18px;
    text-align: center;
    outline: none;
    transition: border-color 0.3s;
}

.menu-form input:focus {
    border-color: #00e5ff;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

.menu-form input::placeholder {
    color: rgba(0, 229, 255, 0.3);
}

.btn-primary {
    width: 300px;
    padding: 15px;
    background: transparent;
    border: 1px solid #00e5ff;
    color: #00e5ff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 10px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-primary:hover {
    background: rgba(0, 229, 255, 0.15);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.btn-primary:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.status {
    margin-top: 20px;
    font-size: 12px;
    letter-spacing: 3px;
    color: rgba(0, 229, 255, 0.4);
}

.status.connected {
    color: #00ff88;
}

.status.error {
    color: #ff3366;
}

/* ========== HUD ========== */
#aim-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(0, 229, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    pointer-events: none;
    transition: transform 0.05s linear;
}

.cross-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: #00e5ff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 6px #00e5ff;
}

.cross-h, .cross-v {
    position: absolute;
    background: rgba(0, 229, 255, 0.8);
}

.cross-h {
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    transform: translateY(-50%);
}

.cross-v {
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
    transform: translateX(-50%);
}

.cross-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(0, 229, 255, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Stat bars */
.stat-bar {
    position: absolute;
    bottom: 40px;
    width: 200px;
}

.stat-bar.left {
    left: 40px;
}

.stat-bar.right {
    right: 40px;
}

.bar-label {
    font-size: 11px;
    letter-spacing: 3px;
    color: rgba(0, 229, 255, 0.5);
    margin-bottom: 5px;
}

.bar-track {
    width: 100%;
    height: 4px;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.2);
}

.bar-fill {
    height: 100%;
    transition: width 0.15s ease;
}

.bar-fill.shield {
    background: #00e5ff;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
    width: 100%;
}

.bar-fill.hull {
    background: #ff3366;
    box-shadow: 0 0 8px rgba(255, 51, 102, 0.5);
    width: 100%;
}

.bar-value {
    font-size: 14px;
    margin-top: 3px;
    font-family: 'Share Tech Mono', monospace;
}

/* Speed */
#speed-indicator {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

.speed-label {
    font-size: 10px;
    letter-spacing: 3px;
    color: rgba(0, 229, 255, 0.4);
}

.speed-value {
    font-size: 24px;
    font-family: 'Share Tech Mono', monospace;
}

/* Top bar */
#top-bar {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

#round-timer {
    font-size: 28px;
    font-family: 'Share Tech Mono', monospace;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

#score-display {
    font-size: 16px;
    color: rgba(0, 229, 255, 0.6);
    margin-top: 5px;
}

/* Kill feed */
#kill-feed {
    position: absolute;
    top: 80px;
    right: 20px;
    width: 300px;
    text-align: right;
}

.kill-entry {
    font-size: 13px;
    padding: 4px 8px;
    margin-bottom: 3px;
    background: rgba(0, 20, 30, 0.6);
    border-right: 2px solid #ff3366;
    animation: fadeIn 0.3s ease;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.kill-entry .killer {
    color: #00e5ff;
}

.kill-entry .victim {
    color: #ff3366;
}

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

/* Scoreboard */
#scoreboard {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 10, 20, 0.9);
    border: 1px solid rgba(0, 229, 255, 0.3);
    padding: 30px;
    min-width: 400px;
}

.scoreboard-title {
    font-size: 20px;
    letter-spacing: 5px;
    text-align: center;
    margin-bottom: 20px;
    color: #00e5ff;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.scoreboard-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 10px;
    font-size: 14px;
    border-bottom: 1px solid rgba(0, 229, 255, 0.1);
}

.scoreboard-row.header {
    color: rgba(0, 229, 255, 0.5);
    font-size: 11px;
    letter-spacing: 2px;
}

.scoreboard-row.self {
    background: rgba(0, 229, 255, 0.1);
}

/* Death screen */
#death-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.death-text {
    font-size: 48px;
    font-weight: 700;
    color: #ff3366;
    text-shadow: 0 0 30px rgba(255, 51, 102, 0.5);
    letter-spacing: 10px;
}

.respawn-timer {
    font-size: 16px;
    color: rgba(255, 51, 102, 0.7);
    margin-top: 15px;
}

/* Ping */
#ping-display {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 11px;
    font-family: 'Share Tech Mono', monospace;
    color: rgba(0, 229, 255, 0.3);
}

/* Hit direction indicators */
.hit-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 4px;
    background: rgba(255, 51, 102, 0.8);
    transform-origin: center;
    pointer-events: none;
    animation: hitFade 0.5s ease forwards;
}

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

/* Screen shake class */
.screen-shake {
    animation: shake 0.2s ease;
}

@keyframes shake {
    0%, 100% { transform: translate(0); }
    25% { transform: translate(-3px, 2px); }
    50% { transform: translate(3px, -2px); }
    75% { transform: translate(-2px, -3px); }
}
