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

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

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

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

.loading-content {
    text-align: center;
    width: 80%;
    max-width: 500px;
}

.loading-content h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: #f8bb00;
    text-shadow: 0 0 10px rgb(248 187 0 / 70%);
}

.loading-bar-container {
    width: 100%;
    height: 20px;
    background-color: #333333;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

#loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #f8bb00, #ff6b00);
    transition: width 0.3s ease;
}

/* Start Screen */
#start-screen {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgb(0 0 0 / 30%), rgb(0 0 0 / 50%)), 
                url('../assets/images/game-screenshot.jpg') center/cover no-repeat;
    justify-content: center;
    align-items: center;
    z-index: 900;
    display: none;
    overflow: hidden;
    animation: background-scroll 40s linear infinite;
    background-size: 120% auto;
}

@keyframes background-scroll {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 100% 100%;
    }

    100% {
        background-position: 0% 0%;
    }
}

.start-content {
    text-align: center;
    background-color: rgb(0 0 0 / 80%);
    padding: 2rem;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
}

.start-content h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: #f8bb00;
    text-shadow: 0 0 10px rgb(248 187 0 / 70%);
}

.form-group {
    margin-bottom: 1.5rem;
}

#player-name {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    background-color: rgb(255 255 255 / 10%);
    border: 2px solid #f8bb00;
    border-radius: 5px;
    color: #ffffff;
    text-align: center;
}

#start-game-btn {
    background: linear-gradient(90deg, #f8bb00, #ff6b00);
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.2rem;
    color: #ffffff;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-bottom: 1.5rem;
}

#start-game-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgb(248 187 0 / 40%);
}

.controls-info {
    color: #cccccc;
    text-align: left;
}

.controls-info h2 {
    color: #f8bb00;
    margin-bottom: 0.5rem;
    text-align: center;
}

.controls-info p {
    margin-bottom: 0.3rem;
}

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

/* Top UI Elements - Base Styling */
#kill-count, #scoreboard, #match-timer {
    background-color: rgb(30 40 48 / 85%);
    border-radius: 5px;
    color: #ffffff;
    font-family: Arial, sans-serif;
    box-shadow: 0 3px 6px rgb(0 0 0 / 30%);
    backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    border: 1px solid rgb(255 255 255 / 10%);
    padding: 8px 12px;
    position: absolute;
    z-index: 1100;
}

/* Kill counter - left side */
#kill-count {
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    font-size: 16px;
    gap: 5px;
    width: 100px;
}

#kills-counter {
    color: #f8bb00;
    font-weight: bold;
    font-size: 18px;
}

/* Match timer - center */
#match-timer {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    width: auto;
}

/* Players section - right side */
#scoreboard {
    top: 4em;
    right: 1em;
    width: auto;
    padding: 8px;
    min-width: 180px;
}

/* Hide the default h3 title in scoreboard since we already have "Players" in the UI */
#scoreboard h3 {
    display: none;
}

@keyframes timer-pulse {
    0% { transform: translateX(-50%) scale(1); opacity: 1; }
    50% { transform: translateX(-50%) scale(1.05); opacity: 1; }
    100% { transform: translateX(-50%) scale(1); opacity: 1; }
}

.timer-critical {
    color: #ff3333 !important;
    animation: timer-pulse 0.5s infinite;
}

.timer-warning {
    color: #ffaa00 !important;
}

#player-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

#player-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    padding: 4px 6px;
    border-radius: 3px;
    align-items: center;
    width: 100%;
}

#player-list li.local-player {
    background-color: rgb(72 61 139 / 40%);
    border-left: 3px solid #f8bb00;
}

#player-list li.remote-player {
    background-color: rgb(47 79 79 / 40%);
    border-left: 3px solid #4682B4;
}

.player-name {
    font-weight: bold;
    color: #ffffff;
    text-shadow: 1px 1px 1px rgb(0 0 0 / 50%);
    margin-right: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

/* Hide health bars completely as percentage is already shown */
.health-bar-container {
    display: none !important;
}

#health-bar-container {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 15px;
    background-color: rgb(0 0 0 / 60%);
    border-radius: 7px;
    overflow: hidden;
}

#health-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #00ff00, #aaff00);
    transition: width 0.3s ease;
}

#ammo-display {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgb(0 0 0 / 70%);
    padding: 10px 20px;
    border-radius: 5px;
    color: #ffffff;
    font-size: 24px;
}

#reload-indicator-container {
    position: absolute;
    bottom: 60px;
    right: 20px;
    width: 100px;
    height: 10px;
    background-color: rgb(0 0 0 / 70%);
    border-radius: 5px;
    overflow: hidden;
}

#reload-indicator {
    width: 0%;
    height: 100%;
    background-color: #FFA726;
    transition: width 0.1s ease-out;
}

#messages {
    position: absolute;
    left: 1rem;
    top: 5rem;
    width: 300px;
    z-index: 1000;
    pointer-events: none;
}

.message {
    background-color: rgb(0 0 0 / 75%);
    color: #ffffff;
    padding: 0.7rem;
    border-radius: 5px;
    margin-bottom: 0.8rem;
    text-align: left;
    font-size: 1.1rem;
    font-weight: bold;
    border-left: 4px solid #FFA726;
    box-shadow: 0 2px 8px rgb(0 0 0 / 30%);
    animation: fadeOut 3s forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; transform: translateX(0); }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translateX(-20px); }
}

/* Game Over */
#game-over {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgb(0 0 0 / 80%);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: #ffffff;
    display: none;
}

.game-over-content {
    text-align: center;
    background-color: rgb(0 0 0 / 80%);
    padding: 2rem;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
}

.game-over-content h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: #f8bb00;
    text-shadow: 0 0 10px rgb(248 187 0 / 70%);
}

#final-stats {
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

#play-again-btn {
    background: linear-gradient(90deg, #f8bb00, #ff6b00);
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1.2rem;
    color: #ffffff;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#play-again-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgb(248 187 0 / 40%);
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
}

.login-container {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
    width: 100%;
    max-width: 400px;
}

h1 {
    text-align: center;
    color: #333333;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555555;
}

input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #dddddd;
    border-radius: 4px;
    font-size: 1rem;
}

button {
    width: 100%;
    padding: 0.75rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #45a049;
}

/* Wasted Screen */
#wasted-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(204 0 0 / 40%);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    color: #ffffff;
    display: none;
    animation: wasted-pulse 1s infinite alternate;
    backdrop-filter: blur(5px);
}

@keyframes wasted-pulse {
    from {
        background-color: rgb(204 0 0 / 40%);
    }

    to {
        background-color: rgb(204 0 0 / 60%);
    }
}

.wasted-content {
    text-align: center;
    background-color: rgb(0 0 0 / 80%);
    padding: 3rem;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    border: 3px solid #ff0000;
    animation: wasted-border-flash 0.5s infinite alternate;
}

@keyframes wasted-border-flash {
    from {
        border-color: #ff0000;
    }

    to {
        border-color: #ff6666;
    }
}

.wasted-title {
    font-size: 4rem;
    font-weight: bold;
    color: #ff0000;
    margin-bottom: 1rem;
    text-transform: uppercase;
    animation: wasted-text-glow 1s infinite alternate;
    letter-spacing: 4px;
}

@keyframes wasted-text-glow {
    from {
        text-shadow: 0 0 10px #ff0000;
    }

    to {
        text-shadow: 0 0 20px #ff0000, 0 0 30px #ff0000;
    }
}

.wasted-message {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.wasted-countdown {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 2rem;
}

.wasted-btn {
    background-color: #ff0000;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.wasted-btn:hover {
    background-color: #cc0000;
    transform: scale(1.05);
}

.hit-flash {
    animation: hit-flash 0.3s;
    pointer-events: none;
}

@keyframes hit-flash {
    0% {
        background-color: rgb(255 0 0 / 0%);
    }

    50% {
        background-color: rgb(255 0 0 / 30%);
    }

    100% {
        background-color: rgb(255 0 0 / 0%);
    }
}

.hit-message {
    background-color: rgb(204 0 0 / 80%);
    color: #ffffff;
    padding: 0.7rem;
    border-radius: 5px;
    margin-bottom: 0.8rem;
    text-align: left;
    font-size: 1.1rem;
    font-weight: bold;
    border-left: 4px solid #ff0000;
    box-shadow: 0 2px 8px rgb(0 0 0 / 30%);
    animation: fadeOut 3s forwards;
}

/* Shake animation for invalid input */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* Error messages */
#username-error {
    color: #ff3333;
    font-size: 14px;
    margin-top: 10px;
    background-color: rgb(255 0 0 / 10%);
    border: 1px solid #ff3333;
    border-radius: 4px;
    padding: 5px 10px;
} 