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

body {
    overflow: hidden;
    font-family: 'Arial', sans-serif;
    background: #000;
    color: #fff;
}

#ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Crosshair */
#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 3px #000;
    user-select: none;
    transition: all 0.2s;
}

#crosshair.pistol {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.9);
}

#crosshair.shotgun {
    font-size: 48px;
    color: rgba(255, 102, 0, 0.7);
}

#crosshair.sniper {
    font-size: 20px;
    color: rgba(0, 170, 255, 0.9);
    font-weight: bold;
}

#crosshair.rocket {
    font-size: 40px;
    color: rgba(255, 0, 0, 0.8);
}

/* Health Bar */
#health-container {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 200px;
    height: 30px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #fff;
    border-radius: 5px;
    overflow: hidden;
}

#health-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #ff0000 0%, #ffaa00 30%, #ffff00 60%, #00ff00 100%);
    transition: width 0.3s;
}

/* Health bar color changes based on width */
#health-container[data-health="low"] #health-bar {
    background: linear-gradient(90deg, #ff0000, #ff3300);
}

#health-container[data-health="medium"] #health-bar {
    background: linear-gradient(90deg, #ff6600, #ffaa00);
}

#health-container[data-health="high"] #health-bar {
    background: linear-gradient(90deg, #00ff00, #88ff00);
}

#health-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 16px;
    text-shadow: 1px 1px 2px #000;
}

/* Weapon Display */
#weapon-display {
    position: absolute;
    bottom: 30px;
    right: 30px;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px #000;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 5px;
    border: 2px solid #ff6600;
    min-width: 200px;
}

#weapon-name {
    color: #ff6600;
}

#weapon-hint {
    display: block;
    font-size: 14px;
    color: #00aaff;
    margin-top: 5px;
    font-weight: normal;
}

#weapon-cooldown-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #ff6600;
    transform-origin: left;
    transition: transform 0.05s linear;
}

/* Powerup Display */
#powerups-container {
    position: absolute;
    bottom: 80px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.powerup-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 20px;
    font-weight: bold;
}

#powerup-speed {
    border: 2px solid #0088ff;
    color: #0088ff;
}

#powerup-shield {
    border: 2px solid #ffff00;
    color: #ffff00;
}

.powerup-icon {
    font-size: 24px;
}

.powerup-timer {
    min-width: 40px;
}

/* Kill Counter */
#kill-counter {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 4px #000;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 5px;
}

#kills {
    color: #ff6600;
}

/* Round Timer */
#round-timer {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 32px;
    font-weight: bold;
    text-shadow: 2px 2px 4px #000;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 30px;
    border-radius: 10px;
    border: 2px solid #ff6600;
}

#timer-text {
    color: #fff;
}

#timer-text.warning {
    color: #ff0000;
    animation: pulse 1s ease-in-out infinite;
}

/* Kill Feed */
#kill-feed {
    position: absolute;
    top: 100px;
    right: 270px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: 300px;
    pointer-events: none;
}

.kill-notification {
    background: rgba(255, 102, 0, 0.9);
    padding: 10px 15px;
    border-radius: 5px;
    border-left: 4px solid #ff0000;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
    animation: slideIn 0.3s ease-out, fadeOut 0.5s ease-in 2.5s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.kill-notification.headshot {
    background: rgba(255, 215, 0, 0.9);
    border-left-color: #ffff00;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

/* Player List */
#player-list {
    position: absolute;
    top: 100px;
    right: 30px;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 5px;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
}

#player-list h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #ff6600;
    text-shadow: 1px 1px 2px #000;
}

.player-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.player-item:last-child {
    border-bottom: none;
}

.player-item span:first-child {
    font-weight: bold;
}

.player-item span:last-child {
    color: #ff6600;
}

/* Start Screen */
#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: all;
}

#start-screen h1 {
    font-size: 72px;
    margin-bottom: 20px;
    text-shadow: 0 0 20px #ff6600;
}

#start-screen p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.8;
}

#player-name-input {
    font-size: 20px;
    padding: 12px 20px;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #ff6600;
    border-radius: 8px;
    color: #fff;
    text-align: center;
    outline: none;
    width: 300px;
    pointer-events: all;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#player-name-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

#player-name-input:focus {
    border-color: #ff0000;
    box-shadow: 0 0 15px rgba(255, 102, 0, 0.5);
}

#start-btn {
    font-size: 24px;
    padding: 15px 40px;
    background: linear-gradient(135deg, #ff6600, #ff0000);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    pointer-events: all;
}

#start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px #ff6600;
}

#start-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

#start-screen.hidden {
    display: none;
}

/* Map Voting */
#map-voting {
    margin: 20px 0;
    width: 100%;
    max-width: 900px;
    pointer-events: all;
}

#map-voting h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 24px;
}

.map-cards {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.map-card {
    background: rgba(0, 0, 0, 0.7);
    border: 3px solid #444;
    border-radius: 10px;
    padding: 20px;
    width: 250px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.map-card:hover {
    border-color: #ff6600;
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(255, 102, 0, 0.3);
}

.map-card.selected {
    border-color: #00ff00;
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.5);
}

.map-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.map-name {
    font-size: 22px;
    font-weight: bold;
    color: #ff6600;
    margin-bottom: 8px;
}

.map-desc {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 12px;
    min-height: 40px;
}

.map-votes {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    padding-top: 10px;
    border-top: 1px solid #444;
}

.vote-count {
    color: #00ff00;
}

#vote-status {
    text-align: center;
}

/* Resume Screen */
#resume-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: all;
    cursor: pointer;
}

#resume-screen h2 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 0 0 15px #ff6600;
}

#resume-screen p {
    font-size: 24px;
    opacity: 0.9;
}

#resume-screen.hidden {
    display: none;
}

/* Death Message */
#death-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    animation: fadeInOut 2s ease-in-out;
}

#death-message h2 {
    font-size: 64px;
    margin-bottom: 20px;
    color: #ff0000;
    text-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000;
    animation: pulse 0.5s ease-in-out infinite;
}

#death-message p {
    font-size: 28px;
    opacity: 0.9;
}

#death-message.hidden {
    display: none;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Headshot Notification */
#headshot-notification {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: headshotPulse 0.8s ease-out;
}

#headshot-notification h2 {
    font-size: 72px;
    color: #ffff00;
    text-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000, 0 0 60px #ff0000;
}

#headshot-notification.hidden {
    display: none;
}

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

/* Round End Screen */
#round-end-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: all;
    z-index: 1000;
}

#round-end-screen h1 {
    font-size: 72px;
    margin-bottom: 40px;
    text-shadow: 0 0 20px #ff6600;
    animation: pulse 2s ease-in-out infinite;
}

#round-winner {
    font-size: 36px;
    margin-bottom: 20px;
}

#next-round-timer {
    color: #ff6600;
    font-weight: bold;
}

#round-end-screen.hidden {
    display: none;
}

/* Sniper Scope Overlay */
#scope-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 500;
}

#scope-overlay.hidden {
    display: none;
}

.scope-border {
    position: absolute;
    background: #000;
}

.scope-top {
    top: 0;
    left: 0;
    width: 100%;
    height: 20%;
}

.scope-bottom {
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20%;
}

.scope-left {
    top: 20%;
    left: 0;
    width: 25%;
    height: 60%;
}

.scope-right {
    top: 20%;
    right: 0;
    width: 25%;
    height: 60%;
}

.scope-reticle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
}

.scope-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 350px;
    height: 350px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.5);
}

.scope-crosshair-h {
    position: absolute;
    top: 50%;
    left: 25%;
    width: 50%;
    height: 2px;
    background: rgba(0, 170, 255, 0.8);
    transform: translateY(-50%);
}

.scope-crosshair-v {
    position: absolute;
    top: 25%;
    left: 50%;
    width: 2px;
    height: 50%;
    background: rgba(0, 170, 255, 0.8);
    transform: translateX(-50%);
}

/* Small tick marks on crosshair */
.scope-crosshair-h::before,
.scope-crosshair-h::after,
.scope-crosshair-v::before,
.scope-crosshair-v::after {
    content: '';
    position: absolute;
    background: rgba(0, 170, 255, 0.8);
}

.scope-crosshair-h::before {
    left: 40%;
    top: -3px;
    width: 2px;
    height: 8px;
}

.scope-crosshair-h::after {
    right: 40%;
    top: -3px;
    width: 2px;
    height: 8px;
}

.scope-crosshair-v::before {
    top: 40%;
    left: -3px;
    width: 8px;
    height: 2px;
}

.scope-crosshair-v::after {
    bottom: 40%;
    left: -3px;
    width: 8px;
    height: 2px;
}

/* Death Message */
#death-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.9);
    padding: 30px 50px;
    border-radius: 10px;
    text-align: center;
    pointer-events: none;
    animation: fadeInOut 2s ease-in-out;
}

#death-message h2 {
    font-size: 36px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px #000;
}

#death-message p {
    font-size: 20px;
    opacity: 0.9;
}

#death-message.hidden {
    display: none;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}
