/* ============================================
   BALLHEAD FPS - STYLE SYSTEM
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;600;700&display=swap');

:root {
    --neon-cyan: #00f0ff;
    --neon-pink: #ff00aa;
    --neon-orange: #ff6600;
    --neon-yellow: #ffcc00;
    --neon-green: #00ff88;
    --neon-red: #ff2244;
    --bg-dark: #0a0a12;
    --bg-card: rgba(15, 15, 30, 0.85);
    --text-primary: #e8e8f0;
    --text-secondary: #8888aa;
}

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

body {
    overflow: hidden;
    background: var(--bg-dark);
    font-family: 'Rajdhani', sans-serif;
    cursor: none;
    user-select: none;
}

canvas {
    display: block;
}

/* ============================================
   START SCREEN
   ============================================ */
#start-screen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 30%, #1a1040 0%, #0a0a12 70%);
}

.start-bg-effects {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.particle-field {
    position: absolute;
    inset: 0;
}

.start-content {
    position: relative;
    z-index: 10;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-container {
    margin-bottom: 40px;
}

.game-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 80px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 0 30px rgba(0, 240, 255, 0.4));
    letter-spacing: 8px;
    animation: titlePulse 3s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% { filter: drop-shadow(0 0 30px rgba(0, 240, 255, 0.4)); }
    50% { filter: drop-shadow(0 0 60px rgba(255, 0, 170, 0.6)); }
}

.game-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-size: 36px;
    color: var(--neon-orange);
    letter-spacing: 30px;
    margin-top: 10px;
    text-shadow: 0 0 20px rgba(255, 102, 0, 0.5);
}

.start-info {
    margin-bottom: 50px;
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 500px;
    margin: 0 auto;
}

.control-item {
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.15);
    border-radius: 12px;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.control-item:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.05);
    transform: translateY(-2px);
}

.control-item .key {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--neon-cyan);
    background: rgba(0, 240, 255, 0.1);
    padding: 4px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0, 240, 255, 0.3);
}

.control-item .label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Neon Button */
.neon-button {
    position: relative;
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--neon-cyan);
    background: transparent;
    border: 2px solid var(--neon-cyan);
    padding: 16px 60px;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    letter-spacing: 4px;
}

.neon-button:hover {
    background: rgba(0, 240, 255, 0.15);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.3), inset 0 0 30px rgba(0, 240, 255, 0.1);
    transform: scale(1.05);
}

.neon-button:active {
    transform: scale(0.98);
}

.btn-glow {
    position: absolute;
    inset: -2px;
    border-radius: 8px;
    background: linear-gradient(45deg, var(--neon-cyan), var(--neon-pink), var(--neon-cyan));
    background-size: 400% 400%;
    z-index: -1;
    opacity: 0;
    animation: glowRotate 3s linear infinite;
    transition: opacity 0.3s ease;
}

.neon-button:hover .btn-glow {
    opacity: 0.4;
}

@keyframes glowRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================
   GAME HUD
   ============================================ */

/* Crosshair */
#crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    pointer-events: none;
}

.ch-line {
    position: absolute;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 1px;
}

.ch-top {
    width: 2px;
    height: 14px;
    left: -1px;
    top: -20px;
}

.ch-bottom {
    width: 2px;
    height: 14px;
    left: -1px;
    top: 6px;
}

.ch-left {
    width: 14px;
    height: 2px;
    top: -1px;
    left: -20px;
}

.ch-right {
    width: 14px;
    height: 2px;
    top: -1px;
    left: 6px;
}

.ch-dot {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--neon-red);
    border-radius: 50%;
    top: -1.5px;
    left: -1.5px;
    box-shadow: 0 0 4px var(--neon-red);
}

/* Health */
#health-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 50;
}

.hud-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 6px rgba(255, 0, 0, 0.5));
}

.bar-wrapper {
    position: relative;
    width: 200px;
    height: 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

#health-bar {
    background: linear-gradient(90deg, var(--neon-red), #ff6644);
    box-shadow: 0 0 10px rgba(255, 34, 68, 0.5);
}

.bar-wrapper span {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* Ammo */
#ammo-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 50;
}

.ammo-icon {
    font-size: 32px;
    filter: drop-shadow(0 0 6px rgba(255, 204, 0, 0.5));
}

.ammo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--neon-yellow);
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.4);
}

#ammo-current {
    font-size: 34px;
}

.ammo-divider {
    color: var(--text-secondary);
    margin: 0 4px;
    font-size: 20px;
}

#ammo-total {
    color: var(--text-secondary);
    font-size: 20px;
}

/* Score */
#score-container {
    position: fixed;
    top: 20px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 50;
}

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

#score-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--neon-yellow);
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.4);
}

/* Wave */
#wave-container {
    position: fixed;
    top: 20px;
    left: 30px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#wave-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

#enemies-left {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Hit Marker */
#hit-marker {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    color: var(--neon-red);
    text-shadow: 0 0 10px var(--neon-red);
    z-index: 110;
    pointer-events: none;
    animation: hitPop 0.3s ease-out forwards;
}

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

/* Damage Overlay */
#damage-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(255, 0, 0, 0) 100%);
    transition: background 0.2s ease;
}

#damage-overlay.active {
    background: radial-gradient(ellipse at center, transparent 30%, rgba(255, 0, 0, 0.4) 100%);
}

/* Kill Feed */
#kill-feed {
    position: fixed;
    top: 60px;
    right: 30px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 300px;
}

.kill-entry {
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--neon-green);
    background: rgba(0, 255, 136, 0.1);
    border-left: 3px solid var(--neon-green);
    padding: 4px 12px;
    border-radius: 0 6px 6px 0;
    animation: killSlideIn 0.3s ease-out;
}

@keyframes killSlideIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Wave Announcement */
#wave-announce {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 200;
    pointer-events: none;
}

.wave-announce-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 60px;
    font-weight: 900;
    color: var(--neon-cyan);
    text-shadow: 0 0 40px rgba(0, 240, 255, 0.6), 0 0 80px rgba(0, 240, 255, 0.3);
    animation: waveAnnounce 2s ease-out forwards;
    text-align: center;
}

@keyframes waveAnnounce {
    0% { opacity: 0; transform: scale(0.5); }
    20% { opacity: 1; transform: scale(1.1); }
    40% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.5) translateY(-30px); }
}

/* Weapon Model */
#weapon-model {
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 40;
    pointer-events: none;
}

#weapon-canvas {
    width: 400px;
    height: 300px;
}

/* ============================================
   GAME OVER
   ============================================ */
#game-over {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 5, 15, 0.92);
    backdrop-filter: blur(10px);
}

.game-over-content {
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.game-over-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 64px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--neon-red), var(--neon-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 40px;
    filter: drop-shadow(0 0 20px rgba(255, 34, 68, 0.5));
}

.final-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px;
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.1);
    border-radius: 8px;
    min-width: 300px;
}

.stat-label {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 600;
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--neon-cyan);
}

/* ============================================
   RELOAD INDICATOR
   ============================================ */
#reload-indicator {
    position: fixed;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--neon-yellow);
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
    z-index: 100;
    pointer-events: none;
    animation: reloadBlink 0.5s ease-in-out infinite;
}

@keyframes reloadBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ============================================
   MINIMAP
   ============================================ */
#minimap {
    position: fixed;
    bottom: 80px;
    right: 30px;
    width: 150px;
    height: 150px;
    border: 2px solid rgba(0, 240, 255, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    overflow: hidden;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .game-title {
        font-size: 40px;
        letter-spacing: 4px;
    }
    
    .game-subtitle {
        font-size: 20px;
        letter-spacing: 15px;
    }
    
    .control-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 300px;
    }
    
    .neon-button {
        font-size: 18px;
        padding: 12px 40px;
    }
}
/ *   M O B I L E   C O N T R O L S   * / 
 # m o b i l e - c o n t r o l s   { 
         p o s i t i o n :   f i x e d ; 
         t o p :   0 ;   l e f t :   0 ;   w i d t h :   1 0 0 % ;   h e i g h t :   1 0 0 % ; 
         z - i n d e x :   2 0 0 0 ; 
         p o i n t e r - e v e n t s :   n o n e ; 
 } 
 # j o y s t i c k - z o n e   { 
         p o s i t i o n :   a b s o l u t e ; 
         b o t t o m :   2 0 p x ;   l e f t :   2 0 p x ; 
         w i d t h :   1 5 0 p x ;   h e i g h t :   1 5 0 p x ; 
         p o i n t e r - e v e n t s :   a u t o ; 
 } 
 # j o y s t i c k - b a s e   { 
         w i d t h :   1 0 0 p x ;   h e i g h t :   1 0 0 p x ; 
         b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 2 ) ; 
         b o r d e r :   2 p x   s o l i d   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 5 ) ; 
         b o r d e r - r a d i u s :   5 0 % ; 
         p o s i t i o n :   a b s o l u t e ; 
         b o t t o m :   2 5 p x ;   l e f t :   2 5 p x ; 
 } 
 # j o y s t i c k - s t i c k   { 
         w i d t h :   4 0 p x ;   h e i g h t :   4 0 p x ; 
         b a c k g r o u n d :   r g b a ( 2 5 5 , 1 0 2 , 0 , 0 . 8 ) ; 
         b o r d e r - r a d i u s :   5 0 % ; 
         p o s i t i o n :   a b s o l u t e ; 
         t o p :   3 0 p x ;   l e f t :   3 0 p x ; 
 } 
 # r i g h t - c o n t r o l s   { 
         p o s i t i o n :   a b s o l u t e ; 
         b o t t o m :   3 0 p x ;   r i g h t :   3 0 p x ; 
         d i s p l a y :   f l e x ;   f l e x - d i r e c t i o n :   c o l u m n ;   g a p :   1 5 p x ; 
         p o i n t e r - e v e n t s :   a u t o ; 
         z - i n d e x :   2 0 0 1 ; 
 } 
 . m o b i l e - b t n   { 
         w i d t h :   6 0 p x ;   h e i g h t :   6 0 p x ; 
         b o r d e r - r a d i u s :   5 0 % ; 
         b a c k g r o u n d :   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 2 ) ; 
         b o r d e r :   2 p x   s o l i d   r g b a ( 2 5 5 , 2 5 5 , 2 5 5 , 0 . 5 ) ; 
         c o l o r :   w h i t e ;   f o n t - w e i g h t :   b o l d ; 
         d i s p l a y :   f l e x ;   a l i g n - i t e m s :   c e n t e r ;   j u s t i f y - c o n t e n t :   c e n t e r ; 
 } 
 . m o b i l e - b t n : a c t i v e   { 
         b a c k g r o u n d :   r g b a ( 2 5 5 , 1 0 2 , 0 , 0 . 8 ) ; 
 } 
 # b t n - s h o o t   { 
         w i d t h :   8 0 p x ;   h e i g h t :   8 0 p x ; 
         b a c k g r o u n d :   r g b a ( 2 5 5 , 0 , 0 , 0 . 4 ) ; 
         b o r d e r - c o l o r :   r g b a ( 2 5 5 , 0 , 0 , 0 . 8 ) ; 
 } 
 # b t n - s h o o t : a c t i v e   { 
         b a c k g r o u n d :   r g b a ( 2 5 5 , 0 , 0 , 0 . 8 ) ; 
 } 
 # t o u c h - l o o k - z o n e   { 
         p o s i t i o n :   a b s o l u t e ; 
         t o p :   0 ;   r i g h t :   0 ; 
         w i d t h :   5 0 % ;   h e i g h t :   8 0 % ; 
         p o i n t e r - e v e n t s :   a u t o ; 
 } 
 @ m e d i a   ( h o v e r :   n o n e )   a n d   ( p o i n t e r :   c o a r s e )   { 
         # m o b i l e - c o n t r o l s   {   d i s p l a y :   b l o c k   ! i m p o r t a n t ;   } 
 } 
  
 