* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --zombie-green: #4ade80;
    --zombie-red: #ef4444;
    --blood-dark: #7f1d1d;
    --apocalypse-dark: #09090b;
    --glow-green: rgba(74, 222, 128, 0.5);
    --glow-red: rgba(239, 68, 68, 0.5);
}

body {
    background-color: var(--apocalypse-dark);
    font-family: 'Orbitron', sans-serif;
    color: white;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    margin: 0;
}

#noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: url('https://www.transparenttextures.com/patterns/carbon-fibre.png');
    opacity: 0.1;
    z-index: 5;
}

.top-nav {
    width: 100%;
    background-color: rgba(24, 24, 27, 0.9);
    padding: 10px 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    z-index: 100;
    border-bottom: 1px solid rgba(74, 222, 128, 0.2);
}

.top-nav a {
    color: #a1a1aa;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.top-nav a:hover {
    color: var(--zombie-green);
    background-color: rgba(74, 222, 128, 0.1);
}

.top-nav a.active {
    color: white;
    background-color: var(--zombie-green);
    box-shadow: 0 0 15px var(--glow-green);
}

#game-ui {
    position: absolute;
    top: 60px;
    left: 20px;
    right: 20px;
    z-index: 40;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

#score-board, #bomb-counter {
    font-size: 0.9rem;
    color: var(--zombie-green);
    text-shadow: 0 0 8px var(--glow-green);
    font-weight: bold;
}

#bomb-counter {
    color: var(--fbbf24); /* Golden yellow */
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.5);
}

#health-bar-container {
    width: 120px;
    height: 16px;
    background-color: #18181b;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

#health-bar {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--zombie-red), #b91c1c);
    box-shadow: 0 0 10px var(--glow-red);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#game-canvas {
    width: 100%;
    height: calc(100vh - 190px);
    margin-top: 50px;
    z-index: 10;
    display: block;
    background: radial-gradient(circle at center, #18181b 0%, #09090b 100%);
}

#control-panel {
    width: 100%;
    height: 180px;
    z-index: 50;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px;
}

#joystick-area {
    width: 130px;
    height: 130px;
}

#joystick-base {
    width: 110px;
    height: 110px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--zombie-green);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 20px var(--glow-green);
    touch-action: none;
}

#joystick-stick {
    width: 44px;
    height: 44px;
    background: var(--zombie-green);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px var(--zombie-green);
}

#fire-btn {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    border: none;
    border-radius: 50%;
    color: black;
    font-weight: bold;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 3px solid rgba(255, 255, 255, 0.2);
    touch-action: none;
}

#fire-btn:active {
    transform: scale(0.9) rotate(5deg);
    filter: brightness(1.2);
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
}

#message-box {
    text-align: center;
    background: #18181b;
    padding: 40px;
    border-radius: 24px;
    border: 2px solid var(--zombie-green);
    box-shadow: 0 0 40px var(--glow-green);
    width: 90%;
    max-width: 360px;
}

#status-text {
    font-family: 'Creepster', cursive;
    font-size: 3rem;
    margin-bottom: 25px;
    color: var(--zombie-red);
    text-shadow: 0 0 20px var(--zombie-red);
}

#final-score-p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--zombie-green);
}

#start-btn {
    padding: 16px 32px;
    font-size: 1.3rem;
    background: var(--zombie-green);
    color: #000;
    border: none;
    border-radius: 12px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 20px var(--glow-green);
    transition: all 0.3s ease;
}

#start-btn:hover {
    background: white;
    transform: scale(1.05);
}

.hidden {
    display: none !important;
}

@media (min-width: 768px) {
    #game-title { font-size: 4rem; }
    #game-ui { max-width: 600px; left: 50%; transform: translateX(-50%); }
    #control-panel { height: 220px; }
    #fire-btn { width: 120px; height: 120px; font-size: 1.5rem; }
}
