* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #000;
    color: #fff;
}

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

/* Loading Screen */
#loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
}

.loading-content h1 {
    color: #f1c40f;
    margin-bottom: 20px;
    font-size: 36px;
}

.progress-bar {
    width: 300px;
    height: 20px;
    background-color: #333;
    border-radius: 10px;
    overflow: hidden;
}

.progress {
    width: 0%;
    height: 100%;
    background-color: #f1c40f;
    transition: width 0.3s;
}

/* Menu Screen */
#menu-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, #252525 0%, #000000 100%);
    z-index: 900;
}

#menu-screen h1 {
    color: #f1c40f;
    font-size: 48px;
    margin-bottom: 50px;
    text-shadow: 0 0 10px rgba(241, 196, 15, 0.7);
}

.menu-options {
    display: flex;
    flex-direction: column;
    align-items: center;
}

button {
    background-color: #333;
    color: #f1c40f;
    border: 2px solid #f1c40f;
    padding: 15px 30px;
    margin: 10px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 200px;
}

button:hover {
    background-color: #f1c40f;
    color: #000;
}

/* Controls Screen */
#controls-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, #252525 0%, #000000 100%);
    z-index: 900;
}

#controls-screen h2 {
    color: #f1c40f;
    font-size: 36px;
    margin-bottom: 30px;
}

#controls-screen ul {
    list-style-type: none;
    margin-bottom: 30px;
}

#controls-screen li {
    margin: 15px 0;
    font-size: 18px;
}

/* Level Select */
#level-select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, #252525 0%, #000000 100%);
    z-index: 900;
}

#level-select h2 {
    color: #f1c40f;
    font-size: 36px;
    margin-bottom: 30px;
}

.level-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1000px;
    margin-bottom: 30px;
}

.level {
    width: 280px;
    background-color: #333;
    margin: 10px;
    padding: 20px;
    border: 2px solid #f1c40f;
    cursor: pointer;
    transition: all 0.3s;
}

.level:hover {
    background-color: #444;
    transform: scale(1.05);
}

.level h3 {
    color: #f1c40f;
    margin-bottom: 10px;
}

/* Game UI */
#game-ui {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 800;
}

#health-bar {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 200px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid #fff;
}

.health-inner {
    width: 100%;
    height: 100%;
    background-color: #e74c3c;
    transition: width 0.3s;
}

#ammo-counter {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 2px solid #fff;
    padding: 5px 10px;
    font-size: 18px;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #fff;
}

#objective {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
}

#current-weapon {
    position: absolute;
    top: 30px;
    right: 30px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 16px;
}

#position-display {
    position: absolute;
    top: 70px;
    right: 30px;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 16px;
    font-family: monospace;
}

#action-log {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    padding: 10px;
    border-radius: 5px;
    width: 60%;
    max-height: 150px;
    overflow-y: hidden;
}

.log-message {
    color: #fff;
    margin: 5px 0;
    font-size: 14px;
    animation: fadeOut 3s forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* Game Over and Mission Complete Screens */
#game-over, #mission-complete {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    z-index: 900;
}

#game-over h2 {
    color: #e74c3c;
    font-size: 48px;
    margin-bottom: 30px;
}

#mission-complete h2 {
    color: #2ecc71;
    font-size: 48px;
    margin-bottom: 30px;
}

#stats {
    background-color: rgba(51, 51, 51, 0.8);
    padding: 20px;
    margin-bottom: 30px;
    width: 300px;
    text-align: center;
}

#stats p {
    margin: 10px 0;
    font-size: 18px;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Damage indicator overlay */
#damageIndicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 0, 0, 0.4);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 100;
}

/* Direction damage indicators */
.damage-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    background-color: rgba(255, 0, 0, 0.5);
    clip-path: polygon(0% 0%, 100% 50%, 0% 100%);
    pointer-events: none;
    animation: fadeInOut 0.5s ease-in-out;
    z-index: 100;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: scale(0.5) rotate(var(--angle)); }
    50% { opacity: 1; transform: scale(1.2) rotate(var(--angle)); }
    100% { opacity: 0; transform: scale(1) rotate(var(--angle)); }
}

/* Low health warning pulse */
@keyframes lowHealthPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

.low-health {
    animation: lowHealthPulse 1s infinite;
}

/* Health text style adjustments */
.health-text {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    text-shadow: 1px 1px 2px #000;
    font-weight: bold;
    font-size: 14px;
}

/* Pause Menu */
#pause-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.8);
    z-index: 900;
}

#pause-menu h2 {
    color: #f1c40f;
    font-size: 48px;
    margin-bottom: 30px;
}

#confirm-exit {
    background-color: rgba(51, 51, 51, 0.9);
    padding: 20px;
    border: 2px solid #f1c40f;
    text-align: center;
    margin-top: 20px;
    width: 80%;
    max-width: 400px;
}

#confirm-exit p {
    margin-bottom: 20px;
    font-size: 18px;
}

.confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.confirm-buttons button {
    min-width: 100px;
} 