body {
    margin: 0;
    overflow: hidden;
    background: #000;
    font-family: 'Courier New', Courier, monospace;
    color: #ff0;
}

#game-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(25, 25, 0, 0.9) 0%, rgba(0, 0, 0, 1) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    pointer-events: auto;
}

.hidden {
    display: none !important;
}

/* Home Screen Styles */
.title-container {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 6rem;
    margin: 0;
    color: #ff0;
    text-shadow: 0 0 30px rgba(255, 255, 0, 0.4), 3px 3px 0px #000;
    letter-spacing: 15px;
    font-weight: 900;
}

.brand-line {
    font-size: 1.2rem;
    letter-spacing: 10px;
    color: #ff0;
    opacity: 0.8;
    margin-top: 10px;
}

.mission-brief {
    max-width: 700px;
    background: rgba(40, 40, 0, 0.3);
    padding: 2.5rem;
    border-left: 5px solid #ff0;
    margin-bottom: 3rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.mission-brief h3 {
    margin-top: 0;
    font-size: 1.8rem;
    color: #ff0;
    border-bottom: 1px solid rgba(255, 255, 0, 0.2);
    padding-bottom: 15px;
}

.mission-brief p {
    color: #bbb;
    line-height: 1.8;
    font-size: 1rem;
}

button {
    background: linear-gradient(to bottom, #4d4d00, #2b2b00);
    border: 1px solid #ff0;
    color: #ff0;
    padding: 1.5rem 4rem;
    font-size: 1.5rem;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

button:hover {
    background: #ff0;
    color: #000;
    box-shadow: 0 0 40px rgba(255, 255, 0, 0.6);
    transform: translateY(-5px);
}

.disclaimer {
    margin-top: 2rem;
    font-size: 0.8rem;
    opacity: 0.4;
    letter-spacing: 2px;
}

#loading-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.3) grayscale(0.5);
    transition: background-image 1s ease-in-out;
    z-index: -1;
}

#loading-background::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 0%, rgba(0,0,0,0.8) 100%);
}

.loading-content {
    width: 80%;
    max-width: 900px;
}

#loading-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: 8px;
    text-align: center;
}

.loading-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 0, 0.1);
    margin: 20px 0;
    position: relative;
    border: 1px solid rgba(255, 255, 0, 0.2);
}

#loading-bar {
    width: 0%;
    height: 100%;
    background: #ff0;
    box-shadow: 0 0 20px #ff0;
    transition: width 0.05s linear;
}

.loading-stats {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.briefing-ticker {
    position: absolute;
    bottom: 5rem;
    width: 100%;
    text-align: center;
    color: #888;
    font-style: italic;
    border-top: 1px solid rgba(255, 255, 0, 0.1);
    padding-top: 2rem;
}

/* Game UI */
#ui-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 50;
}

#game-ui {
    width: 100%;
    height: 100%;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    pointer-events: none;
    transition: transform 0.1s;
}

#crosshair .line {
    position: absolute;
    background: rgba(255, 255, 0, 0.8);
    box-shadow: 0 0 4px #000;
}

#crosshair .line.top { top: 0; left: 11px; width: 2px; height: 8px; }
#crosshair .line.bottom { bottom: 0; left: 11px; width: 2px; height: 8px; }
#crosshair .line.left { top: 11px; left: 0; width: 8px; height: 2px; }
#crosshair .line.right { top: 11px; right: 0; width: 8px; height: 2px; }

.hitmarker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.1s;
}

.hitmarker::before, .hitmarker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 2px;
    background: #fff;
    box-shadow: 0 0 5px #ff0000;
}

.hitmarker::before { transform: translate(-50%, -50%) rotate(45deg); }
.hitmarker::after { transform: translate(-50%, -50%) rotate(-45deg); }

.hitmarker.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

/* --- TACTICAL WAYPOINTS --- */
.waypoint-marker {
    position: fixed;
    pointer-events: none;
    z-index: 55;
    text-align: center;
    color: #ff0;
    font-weight: bold;
    transform: translate(-50%, -100%);
    text-shadow: 2px 2px 4px #000;
}

.waypoint-marker .icon {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.waypoint-marker .dist {
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 3px;
}


.hitmarker.kill {
    background: #ff0000;
}

.hitmarker.kill::before, .hitmarker.kill::after {
    background: #ff0000;
}

#stats {
    position: absolute;
    bottom: 3rem;
    left: 3rem;
    background: rgba(0,0,0,0.7);
    padding: 15px 30px;
    border-left: 4px solid #ff0;
    font-size: 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#health-container {
    width: 200px;
    height: 10px;
    background: rgba(255, 255, 0, 0.1);
    border: 1px solid #ff0;
}

#health-bar {
    width: 100%;
    height: 100%;
    background: #ff0;
    transition: width 0.3s;
}

#health-bar.bleeding {
    background: #f00;
    animation: pulseRed 1s infinite;
}

#medic-status {
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* --- TACTICAL COMPASS --- */
#compass-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 40px;
    background: linear-gradient(90deg, transparent, rgba(0,20,0,0.8), transparent);
    border-bottom: 2px solid #ff0;
    overflow: hidden;
    z-index: 60;
}

#compass-tape {
    position: absolute;
    top: 10px;
    left: 0;
    width: 2000px;
    display: flex;
    gap: 50px;
    font-weight: bold;
    letter-spacing: 5px;
    transition: transform 0.1s linear;
}

#compass-marker {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 10px;
    background: #ff0;
}

/* --- CLASS UI --- */
#class-indicator {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    text-align: right;
    background: rgba(0,0,0,0.7);
    padding: 15px 30px;
    border-right: 4px solid #ff0;
    font-size: 1.1rem;
}

#class-indicator span {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    color: #ff0;
}

/* --- KILLSTREAK UI --- */
#killstreak-container {
    position: fixed;
    bottom: 3rem;
    left: 45rem;
    background: rgba(0,0,0,0.7);
    padding: 10px 20px;
    border-bottom: 3px solid #666;
    font-size: 0.9rem;
    color: #888;
    min-width: 150px;
    transition: all 0.3s;
}

#killstreak-container.ready {
    border-bottom: 3px solid #ff0;
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.2);
}

#killstreak-container span {
    display: block;
    font-size: 1.1rem;
    font-weight: 900;
}


/* --- RANK UI --- */
#rank-indicator {
    position: fixed;
    bottom: 3rem;
    left: 25rem;
    background: rgba(0,0,0,0.7);
    padding: 10px 20px;
    border-bottom: 3px solid #ff0;
    font-size: 0.9rem;
    color: #fff;
    min-width: 150px;
}

#rank-indicator span {
    color: #ff0;
    font-weight: 900;
    font-size: 1.1rem;
}


/* --- FULL TACTICAL MAP (M) --- */
#full-map-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vh;
    height: 80vh;
    background: rgba(0, 20, 0, 0.9);
    border: 3px solid #ff0;
    display: none;
    z-index: 80;
    box-shadow: 0 0 100px rgba(0,0,0,1);
}

#full-map-overlay.active {
    display: block;
}

#full-map-canvas {
    width: 100%;
    height: 100%;
}

#full-map-title {
    position: absolute;
    top: -40px;
    left: 0;
    color: #ff0;
    font-weight: bold;
    letter-spacing: 5px;
}

/* --- POST-GAME SCOREBOARD --- */
#scoreboard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: #ff0;
}

#scoreboard-overlay.active {
    display: flex;
}

.sb-box {
    width: 600px;
    background: rgba(20, 20, 0, 0.5);
    border: 2px solid #ff0;
    padding: 3rem;
    box-shadow: 0 0 50px rgba(255, 255, 0, 0.1);
}

.sb-stat {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    margin: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 0, 0.2);
    padding-bottom: 5px;
}

.sb-rank-up {
    margin-top: 2rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 5px;
}




@keyframes pulseRed {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}


#minimap-container {
    position: absolute;
    top: 3rem;
    right: 3rem;
    width: 200px;
    height: 200px;
    border: 4px solid #ff0;
    border-radius: 50%;
    background: #000;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    overflow: hidden;
}

#minimap-canvas {
    width: 100%;
    height: 100%;
}

/* Utils */
.typewriter {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 0.4s steps(40, end);
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

#loading-tip {
    transition: opacity 0.5s;
}

/* --- SUPPRESSION SYSTEM --- */
#suppression-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 40;
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0);
    transition: box-shadow 0.1s;
    backdrop-filter: blur(0px);
}

#suppression-overlay.active {
    box-shadow: inset 0 0 200px rgba(0, 0, 0, 0.8), inset 0 0 50px rgba(255, 0, 0, 0.2);
    backdrop-filter: blur(2px);
}

/* --- TACTICAL HUD: KILL FEED --- */
#kill-feed {
    position: fixed;
    top: 2rem;
    right: 3rem;
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    pointer-events: none;
    z-index: 60;
}

.kill-msg {
    background: rgba(0, 0, 0, 0.6);
    padding: 5px 15px;
    border-right: 3px solid #ff0;
    font-size: 0.9rem;
    color: #fff;
    text-transform: uppercase;
    animation: slideInRight 0.3s ease-out;
}

.kill-msg span.allied { color: #0f0; }
.kill-msg span.enemy { color: #f00; }
.kill-msg span.player { color: #ff0; font-weight: bold; }

/* --- TACTICAL HUD: XP / SCORES --- */
#tactical-notify {
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.xp-popup {
    font-size: 1.5rem;
    font-weight: 900;
    color: #ff0;
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
    margin: 5px 0;
    animation: popupFade 1.5s ease-out forwards;
}

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

@keyframes popupFade {
    0% { transform: scale(0.5); opacity: 0; }
    20% { transform: scale(1.1); opacity: 1; }
    100% { transform: translateY(-50px); opacity: 0; }
}

/* --- SNIPER SCOPE --- */
#scope-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 45;
    pointer-events: none;
}

.scope-circle {
    width: 80vh;
    height: 80vh;
    border: 300px solid black;
    border-radius: 50%;
    position: relative;
    box-shadow: inset 0 0 50px rgba(0,0,0,1);
}

.reticle-v, .reticle-h {
    position: absolute;
    background: black;
}

.reticle-v { left: 50%; top: 0; width: 2px; height: 100%; transform: translateX(-50%); }
.reticle-h { top: 50%; left: 0; width: 100%; height: 2px; transform: translateY(-50%); }

.scope-black-l, .scope-black-r {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    background: black;
    z-index: -1;
}
.scope-black-l { left: 0; }
.scope-black-r { right: 0; }


/* --- SQUAD COMMAND MENU --- */
#command-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    gap: 15px;
    background: rgba(0, 20, 0, 0.8);
    padding: 2rem;
    border: 2px solid #ff0;
    z-index: 70;
    text-align: center;
}

#command-menu.active {
    display: flex;
}

.command-btn {
    background: #000;
    border: 1px solid #ff0;
    color: #ff0;
    padding: 10px 20px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
}

.command-btn:hover {
    background: #ff0;
    color: #000;
}

/* --- MOBILE CONTROLS STYLES --- */
#mobile-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

#mobile-controls:not(.hidden) {
    display: block !important;
}

#joystick-base {
    position: absolute;
    bottom: 50px;
    left: 50px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    pointer-events: auto;
    touch-action: none;
}

#joystick-stick {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

#shoot-btn {
    position: absolute;
    bottom: 40px;
    right: 40px;
    width: 100px;
    height: 100px;
    background: rgba(255, 0, 0, 0.3);
    border: 3px solid #f00;
    border-radius: 50%;
    color: #fff;
    font-family: 'Bebas Neue', cursive;
    font-size: 1.5rem;
    font-weight: bold;
    pointer-events: auto;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 2px;
}

#jump-btn {
    position: absolute;
    bottom: 160px;
    right: 60px;
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    color: #fff;
    font-family: 'Bebas Neue', cursive;
    font-size: 1rem;
    pointer-events: auto;
    touch-action: none;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
}

#shoot-btn:active, #jump-btn:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

/* --- MOBILE ORIENTATION & FULLSCREEN --- */
#orientation-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
    color: #ff0;
    z-index: 10000;
    display: none !important; /* Hide the force-rotate warning */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.rotate-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: rotateShake 2s infinite;
}

@keyframes rotateShake {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(90deg); }
    50% { transform: rotate(90deg); }
    75% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

#mobile-fullscreen-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1001;
    padding: 10px 20px;
    font-size: 0.8rem;
    background: rgba(0,0,0,0.6);
    border: 1px solid #ff0;
    color: #ff0;
    letter-spacing: 1px;
    pointer-events: auto;
}

/* Hide HUD elements if orientation is wrong */
@media (orientation: portrait) {
    #orientation-overlay { display: flex; }
    #ui-layer { display: none; }
}

@media (max-width: 1024px) {
    #stats { bottom: 10px; left: 10px; scale: 0.7; transform-origin: left bottom; }
    #class-indicator { bottom: 10px; right: 10px; scale: 0.7; transform-origin: right bottom; }
    #minimap-container { top: 10px; right: 10px; width: 100px; height: 100px; border-width: 2px; }
    #compass-container { width: 200px; top: 10px; }
    #kill-feed { top: 10px; left: 10px; right: auto; scale: 0.7; transform-origin: left top; }
}



