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

:root {
    --primary: #DE9B35;
    --primary-dark: #B87A1C;
    --bg-dark: #1a1a1a;
    --bg-darker: #0d0d0d;
    --text: #ffffff;
    --danger: #ff4444;
    --armor: #4a9eff;
}

body {
    font-family: 'Orbitron', sans-serif;
    background: var(--bg-darker);
    color: var(--text);
    overflow: hidden;
    user-select: none;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

#scene-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Menu Screen */
#menu-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #2a2015 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.smoke-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(222, 155, 53, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(222, 155, 53, 0.05) 0%, transparent 40%);
    animation: smoke 15s ease-in-out infinite;
}

@keyframes smoke {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.menu-content {
    text-align: center;
    z-index: 1;
    padding: 20px;
}

.title {
    font-family: 'Black Ops One', cursive;
    font-size: clamp(3rem, 10vw, 6rem);
    color: var(--text);
    text-shadow: 
        0 0 20px rgba(222, 155, 53, 0.5),
        0 4px 0 var(--primary-dark),
        0 8px 0 #8a5a10;
    letter-spacing: 0.1em;
    margin-bottom: 0;
}

.title span {
    color: var(--primary);
}

.subtitle {
    font-size: 1rem;
    color: var(--primary);
    letter-spacing: 0.5em;
    margin-bottom: 20px;
}

.loading-tip {
    font-size: 0.85rem;
    color: #888;
    margin: 20px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    font-style: italic;
}

.difficulty-select {
    margin: 30px 0;
}

.difficulty-select label {
    display: block;
    margin-bottom: 10px;
    color: #888;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
}

.difficulty-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.diff-btn {
    padding: 10px 25px;
    background: transparent;
    border: 2px solid #444;
    color: #888;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

.play-button {
    padding: 20px 80px;
    font-family: 'Black Ops One', cursive;
    font-size: 1.5rem;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    color: var(--bg-dark);
    cursor: pointer;
    margin: 30px 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%);
}

.play-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(222, 155, 53, 0.5);
}

.play-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.3) 50%, transparent 60%);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.controls-guide {
    margin-top: 30px;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border: 1px solid #333;
}

.controls-guide h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    font-size: 0.8rem;
    color: #aaa;
}

kbd {
    background: #333;
    padding: 3px 8px;
    border-radius: 3px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    margin-right: 5px;
}

.high-score {
    margin-top: 20px;
    color: var(--primary);
    font-size: 0.9rem;
}

.footer {
    margin-top: 30px;
    font-size: 0.75rem;
    color: #555;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
}

/* HUD */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.hidden {
    display: none !important;
}

.hud-top {
    display: flex;
    justify-content: space-between;
    padding: 20px;
}

.kill-feed {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.feed-entry {
    background: rgba(0,0,0,0.7);
    padding: 5px 15px;
    font-size: 0.8rem;
    animation: fadeIn 0.3s ease;
}

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

.timer-score {
    text-align: right;
}

.timer {
    font-size: 2rem;
    font-weight: 900;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.score {
    font-size: 0.9rem;
    color: #ccc;
}

/* Crosshair */
.crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
}

.cross-h, .cross-v {
    position: absolute;
    background: rgba(255,255,255,0.9);
    transition: all 0.05s;
}

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

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

.crosshair.moving .cross-h,
.crosshair.moving .cross-v {
    opacity: 0.5;
}

.crosshair.shooting {
    width: 30px;
    height: 30px;
}

/* Hit Marker */
.hit-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
}

.hm-line {
    position: absolute;
    width: 3px;
    height: 12px;
    background: white;
}

.hm-1 { top: 0; left: 50%; transform: translateX(-50%) rotate(45deg); }
.hm-2 { top: 0; right: 0; transform: rotate(-45deg); }
.hm-3 { bottom: 0; left: 50%; transform: translateX(-50%) rotate(-45deg); }
.hm-4 { bottom: 0; right: 0; transform: rotate(45deg); }

.hit-marker.active {
    animation: hitPop 0.1s ease-out;
}

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

/* Damage Overlay */
.damage-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(ellipse at center, transparent 30%, rgba(255,0,0,0.5) 100%);
    transition: opacity 0.1s;
}

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

/* Streak Announce */
.streak-announce {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Black Ops One', cursive;
    font-size: 2.5rem;
    color: var(--primary);
    text-shadow: 0 0 20px rgba(222, 155, 53, 0.8);
    opacity: 0;
    transition: all 0.3s;
}

.streak-announce.active {
    opacity: 1;
    animation: streakPop 0.5s ease-out;
}

@keyframes streakPop {
    0% { transform: translateX(-50%) scale(0.5); }
    50% { transform: translateX(-50%) scale(1.2); }
    100% { transform: translateX(-50%) scale(1); }
}

/* HUD Bottom */
.hud-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 20px;
}

.health-armor {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.health-bar, .armor-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.bar-container {
    width: 150px;
    height: 20px;
    background: rgba(0,0,0,0.7);
    position: relative;
    border: 1px solid #444;
}

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

.health-fill {
    background: linear-gradient(90deg, #ff4444 0%, #ff6666 100%);
}

.armor-fill {
    background: linear-gradient(90deg, #4a9eff 0%, #6eb5ff 100%);
}

.bar-text {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    font-weight: 700;
}

.weapon-ammo {
    text-align: right;
}

.weapon-display {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 5px;
}

.ammo-counter {
    font-size: 2rem;
    font-weight: 900;
}

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

.ammo-divider {
    color: #666;
}

.ammo-reserve {
    color: #888;
    font-size: 1.2rem;
}

/* Pause Menu */
#pause-menu, #game-over, #mobile-warning {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.pause-content, .game-over-content, .mobile-content {
    text-align: center;
    padding: 40px;
}

.pause-content h2, .game-over-content h2, .mobile-content h2 {
    font-family: 'Black Ops One', cursive;
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 30px;
}

.menu-btn {
    display: block;
    width: 200px;
    margin: 15px auto;
    padding: 15px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
    pointer-events: auto;
}

.menu-btn:hover {
    background: var(--primary);
    color: var(--bg-dark);
}

.sensitivity-control {
    margin: 30px 0;
    color: #888;
}

.sensitivity-control label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.8rem;
}

.sensitivity-control input {
    width: 200px;
    accent-color: var(--primary);
}

/* Game Over */
.final-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-bottom: 30px;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
}

.new-high-score {
    font-size: 1.5rem;
    color: gold;
    margin-bottom: 20px;
    animation: pulse 0.5s infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.mobile-content p {
    color: #888;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .title {
        font-size: 2.5rem;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
        font-size: 0.7rem;
    }
    
    .play-button {
        padding: 15px 50px;
        font-size: 1.2rem;
    }
    
    .bar-container {
        width: 100px;
    }
    
    .ammo-counter {
        font-size: 1.5rem;
    }
    
    .final-stats {
        flex-direction: column;
        gap: 20px;
    }
}