/* ============================================
   ACTION DUTY - MAIN STYLESHEET
   Phase 1 - Launch Readiness
   ============================================ */

/* ----- RESET & BASE ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0f0a;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Courier New', monospace;
    user-select: none;
}

#game-container {
    position: relative;
    width: 960px;
    height: 640px;
    background: linear-gradient(145deg, #1a2a1a, #0d1a0d);
    border: 4px solid #3a5a3a;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0, 255, 0, 0.1);
    overflow: hidden;
}

/* Scanline effect */
#game-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 0, 0.03) 2px,
        rgba(0, 255, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 100;
}

/* ----- LOADING SCREEN ----- */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0f0a;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    color: #7cfc00;
    font-family: 'Courier New', monospace;
}

.loading-content h1 {
    font-size: 48px;
    letter-spacing: 6px;
    text-shadow: 0 0 30px rgba(124, 252, 0, 0.3);
    margin-bottom: 30px;
    font-family: 'Impact', 'Arial Black', sans-serif;
    animation: pulse 2s ease-in-out infinite;
}

.loading-bar {
    width: 400px;
    max-width: 80vw;
    height: 4px;
    background: #1a2a1a;
    border-radius: 2px;
    margin: 20px auto;
    overflow: hidden;
    border: 1px solid #2a4a2a;
}

.loading-progress {
    height: 100%;
    background: #7cfc00;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 20px rgba(124, 252, 0, 0.3);
}

.loading-text {
    color: #5a8a5a;
    font-size: 14px;
    margin: 10px 0;
}

.loading-tip {
    color: #3a6a3a;
    font-size: 13px;
    margin-top: 15px;
    animation: pulse 2s ease-in-out infinite;
}

/* ----- SCREENS (Common) ----- */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    z-index: 10;
    background: rgba(10, 15, 10, 0.92);
}

.screen.active {
    display: flex;
    animation: fadeIn 0.5s ease;
}

.screen h2 {
    color: #7cfc00;
    font-size: 36px;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(124, 252, 0, 0.2);
    letter-spacing: 4px;
    font-family: 'Impact', 'Arial Black', sans-serif;
}

/* ----- BUTTONS (Global) ----- */
.menu-btn {
    background: transparent;
    border: 2px solid #3a6a3a;
    color: #8aba8a;
    padding: 16px 24px;
    font-size: 20px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-radius: 4px;
    background: rgba(0, 20, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.menu-btn:hover {
    background: #2a4a2a;
    border-color: #7cfc00;
    color: #7cfc00;
    box-shadow: 0 0 25px rgba(124, 252, 0, 0.2);
    transform: scale(1.02);
}

.menu-btn:active {
    transform: scale(0.98);
}

/* Button glow effect */
.menu-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(124, 252, 0, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.menu-btn:hover::after {
    opacity: 1;
}

/* Small button variant */
.menu-btn.small {
    padding: 12px 40px;
    font-size: 18px;
    letter-spacing: 2px;
}

/* ----- START SCREEN (Main Menu) ----- */
#start-screen h1 {
    font-size: 72px;
    color: #7cfc00;
    text-shadow: 0 0 30px rgba(124, 252, 0, 0.4), 0 4px 0 #1a3a1a;
    margin-bottom: 10px;
    letter-spacing: 8px;
    font-family: 'Impact', 'Arial Black', sans-serif;
    animation: pulse 2s ease-in-out infinite;
}

#start-screen .subtitle {
    color: #5a8a5a;
    font-size: 18px;
    margin-bottom: 40px;
    border-bottom: 1px solid #2a4a2a;
    padding-bottom: 10px;
}

.menu-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 280px;
}

.menu-options .menu-btn {
    width: 100%;
    text-align: center;
}

.version {
    color: #2a4a2a;
    font-size: 12px;
    margin-top: 40px;
    letter-spacing: 2px;
}

/* ----- BRIEFING SCREEN ----- */
#howto-screen ul {
    list-style: none;
    color: #8aba8a;
    font-size: 22px;
    line-height: 2.2;
    text-align: left;
    margin-bottom: 40px;
    padding: 20px 30px;
    background: rgba(0, 20, 0, 0.3);
    border: 1px solid #1a2a1a;
    border-radius: 8px;
}

#howto-screen ul li {
    padding: 4px 0;
    border-bottom: 1px solid rgba(58, 106, 58, 0.2);
}

#howto-screen ul li:last-child {
    border-bottom: none;
}

#howto-screen ul li strong {
    color: #7cfc00;
}

/* ----- SETTINGS SCREEN ----- */
.settings-group {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    color: #8aba8a;
    font-size: 20px;
    width: 100%;
    max-width: 450px;
    padding: 12px 20px;
    background: rgba(0, 20, 0, 0.3);
    border: 1px solid #1a2a1a;
    border-radius: 6px;
}

.settings-group label {
    min-width: 140px;
    font-weight: bold;
    color: #7cfc00;
}

.settings-group input[type="range"] {
    flex: 1;
    height: 6px;
    background: #1a2a1a;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;  /* Standard property fallback */
    cursor: pointer;
}

.settings-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;  /* Standard property fallback */
    width: 18px;
    height: 18px;
    background: #7cfc00;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(124, 252, 0, 0.3);
    transition: all 0.2s ease;
}

.settings-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* Firefox support for range slider */
.settings-group input[type="range"]::-moz-range-track {
    height: 6px;
    background: #1a2a1a;
    border-radius: 3px;
    border: none;
}

.settings-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #7cfc00;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(124, 252, 0, 0.3);
}

.settings-group input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
}

.settings-group span {
    min-width: 45px;
    text-align: right;
    color: #7cfc00;
    font-weight: bold;
}

/* Settings buttons */
#settings-screen .menu-btn {
    margin-top: 10px;
}

/* ----- LEADERBOARD SCREEN ----- */
#leaderboard-list {
    width: 100%;
    max-width: 400px;
    margin-bottom: 30px;
    background: rgba(0, 20, 0, 0.3);
    border: 1px solid #1a2a1a;
    border-radius: 8px;
    overflow: hidden;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(58, 106, 58, 0.15);
    color: #8aba8a;
    font-size: 18px;
    transition: background 0.3s ease;
}

.leaderboard-entry:last-child {
    border-bottom: none;
}

.leaderboard-entry:hover {
    background: rgba(42, 74, 42, 0.2);
}

.leaderboard-entry .rank {
    color: #7cfc00;
    font-weight: bold;
    min-width: 40px;
}

.leaderboard-entry .name {
    flex: 1;
    padding: 0 15px;
}

.leaderboard-entry .score {
    color: #ffcc00;
    font-weight: bold;
}

/* Top 3 medal colors */
.leaderboard-entry.top1 .rank { color: #ffd700; }
.leaderboard-entry.top2 .rank { color: #c0c0c0; }
.leaderboard-entry.top3 .rank { color: #cd7f32; }

/* ----- CREDITS SCREEN ----- */
.credits-content {
    text-align: center;
    color: #8aba8a;
    font-size: 20px;
    line-height: 2.2;
    padding: 30px;
    background: rgba(0, 20, 0, 0.3);
    border: 1px solid #1a2a1a;
    border-radius: 8px;
    margin-bottom: 30px;
    max-width: 400px;
    width: 100%;
}

.credits-content p {
    margin: 8px 0;
}

.credits-content strong {
    color: #7cfc00;
}

.credit-version {
    color: #3a6a3a;
    font-size: 14px;
    margin-top: 15px;
    border-top: 1px solid #1a2a1a;
    padding-top: 15px;
}

/* ----- PAUSE MENU ----- */
#pause-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 50;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

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

.pause-menu {
    background: rgba(10, 20, 10, 0.95);
    border: 3px solid #2a5a2a;
    border-radius: 12px;
    padding: 40px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
}

.pause-menu h2 {
    color: #7cfc00;
    font-size: 32px;
    margin-bottom: 25px;
    letter-spacing: 4px;
    font-family: 'Impact', 'Arial Black', sans-serif;
}

.pause-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pause-options .menu-btn {
    width: 100%;
    text-align: center;
}

/* ----- CANVAS ----- */
#gameCanvas {
    display: none;
    width: 100%;
    height: 100%;
    background: #0a0f0a;
    image-rendering: pixelated;
    cursor: crosshair;
}

#gameCanvas.active {
    display: block;
}

/* Canvas loading state */
#gameCanvas.loading::before {
    content: 'LOADING MISSION...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #7cfc00;
    font-size: 24px;
    animation: blink 1s step-end infinite;
}

/* ----- ANIMATIONS ----- */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

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

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

/* ----- RESPONSIVE DESIGN ----- */

/* Tablets and smaller laptops */
@media (max-width: 980px) {
    #game-container {
        border-radius: 0;
        border: none;
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
    }
    
    #start-screen h1 {
        font-size: 48px;
        letter-spacing: 4px;
    }
    
    .menu-options {
        width: 240px;
    }
    
    .menu-options .menu-btn {
        font-size: 16px;
        padding: 14px 20px;
        letter-spacing: 2px;
    }
    
    .screen h2 {
        font-size: 28px;
    }
    
    #howto-screen ul {
        font-size: 18px;
        padding: 15px 20px;
    }
    
    .settings-group {
        font-size: 16px;
        padding: 10px 15px;
        max-width: 350px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .settings-group label {
        min-width: 100px;
        font-size: 14px;
    }
    
    .settings-group input[type="range"] {
        min-width: 100px;
    }
    
    .leaderboard-entry {
        font-size: 15px;
        padding: 10px 15px;
    }
    
    .credits-content {
        font-size: 16px;
        padding: 20px;
    }
    
    .pause-menu {
        padding: 30px;
    }
    
    .pause-menu h2 {
        font-size: 26px;
    }
    
    .loading-content h1 {
        font-size: 36px;
    }
    
    .loading-bar {
        width: 300px;
    }
}

/* Mobile phones */
@media (max-width: 500px) {
    .screen {
        padding: 20px;
    }
    
    #start-screen h1 {
        font-size: 32px;
        letter-spacing: 2px;
    }
    
    #start-screen .subtitle {
        font-size: 14px;
        margin-bottom: 25px;
    }
    
    .menu-options {
        width: 200px;
        gap: 8px;
    }
    
    .menu-options .menu-btn {
        font-size: 13px;
        padding: 12px 16px;
        letter-spacing: 1px;
    }
    
    .screen h2 {
        font-size: 22px;
        margin-bottom: 20px;
        letter-spacing: 2px;
    }
    
    #howto-screen ul {
        font-size: 15px;
        padding: 12px 15px;
        line-height: 1.8;
        margin-bottom: 25px;
    }
    
    .settings-group {
        font-size: 13px;
        padding: 8px 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
        max-width: 100%;
    }
    
    .settings-group label {
        min-width: auto;
        font-size: 13px;
    }
    
    .settings-group input[type="range"] {
        width: 100%;
    }
    
    .settings-group span {
        text-align: center;
    }
    
    .menu-btn.small {
        padding: 10px 25px;
        font-size: 14px;
        letter-spacing: 1px;
    }
    
    .leaderboard-entry {
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .leaderboard-entry .name {
        padding: 0 8px;
    }
    
    .credits-content {
        font-size: 14px;
        padding: 15px;
        line-height: 1.8;
    }
    
    .credit-version {
        font-size: 12px;
    }
    
    .pause-menu {
        padding: 20px;
    }
    
    .pause-menu h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }
    
    .pause-options .menu-btn {
        font-size: 14px;
        padding: 12px 16px;
        letter-spacing: 1px;
    }
    
    .loading-content h1 {
        font-size: 28px;
        letter-spacing: 3px;
    }
    
    .loading-bar {
        width: 200px;
    }
    
    .loading-text {
        font-size: 12px;
    }
    
    .loading-tip {
        font-size: 11px;
    }
    
    .version {
        font-size: 10px;
        margin-top: 25px;
    }
}

/* Very small screens (below 400px) */
@media (max-width: 400px) {
    #start-screen h1 {
        font-size: 24px;
        letter-spacing: 1px;
    }
    
    .menu-options {
        width: 170px;
    }
    
    .menu-options .menu-btn {
        font-size: 11px;
        padding: 10px 12px;
        letter-spacing: 0px;
    }
    
    .screen h2 {
        font-size: 18px;
    }
    
    #howto-screen ul {
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .pause-menu h2 {
        font-size: 18px;
    }
    
    .pause-options .menu-btn {
        font-size: 12px;
        padding: 10px 12px;
    }
    
    .leaderboard-entry {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .credits-content {
        font-size: 12px;
        padding: 12px;
    }
}

/* ----- UTILITY CLASSES ----- */
.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }

/* ============================================
   GAME MANAGER OVERLAYS (Phase 2)
   ============================================ */

/* ----- GAME OVERLAY (Base) ----- */
.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9998;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.4s ease;
}

.game-overlay.active {
    display: flex;
}

.overlay-content {
    background: rgba(10, 20, 10, 0.95);
    border: 3px solid #2a5a2a;
    border-radius: 16px;
    padding: 40px 50px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.9), 0 0 40px rgba(124, 252, 0, 0.05);
    animation: slideUp 0.5s ease;
}

.overlay-icon {
    font-size: 64px;
    margin-bottom: 10px;
    animation: pulse 1.5s ease-in-out infinite;
}

.overlay-content h1 {
    color: #7cfc00;
    font-size: 36px;
    letter-spacing: 4px;
    font-family: 'Impact', 'Arial Black', sans-serif;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(124, 252, 0, 0.2);
}

/* ----- GAME OVER OVERLAY ----- */
.game-over-content h1 {
    color: #ff3333;
    text-shadow: 0 0 40px rgba(255, 0, 0, 0.3);
}

.overlay-stats {
    background: rgba(0, 20, 0, 0.4);
    border: 1px solid #1a2a1a;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(58, 106, 58, 0.1);
    color: #8aba8a;
    font-size: 18px;
    font-family: 'Courier New', monospace;
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row .stat-label {
    color: #5a8a5a;
}

.stat-row .stat-value {
    color: #7cfc00;
    font-weight: bold;
}

.stat-row .stat-value.highlight {
    color: #ffcc00;
}

/* ----- LEVEL COMPLETE OVERLAY ----- */
.level-complete-content h1 {
    color: #7cfc00;
    text-shadow: 0 0 40px rgba(124, 252, 0, 0.3);
}

.level-badge {
    display: inline-block;
    background: rgba(124, 252, 0, 0.1);
    border: 2px solid #2a5a2a;
    border-radius: 20px;
    padding: 6px 24px;
    color: #7cfc00;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

/* ----- LEVEL START OVERLAY ----- */
.level-start-content .level-start-badge {
    font-size: 48px;
    color: #7cfc00;
    font-family: 'Impact', 'Arial Black', sans-serif;
    letter-spacing: 4px;
    text-shadow: 0 0 30px rgba(124, 252, 0, 0.2);
    margin-bottom: 5px;
}

.level-start-content h2 {
    color: #7cfc00;
    font-size: 28px;
    margin-bottom: 8px;
    font-family: 'Impact', 'Arial Black', sans-serif;
    letter-spacing: 2px;
}

.level-start-content p {
    color: #8aba8a;
    font-size: 18px;
    font-family: 'Courier New', monospace;
    margin-bottom: 15px;
}

.level-start-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #5a8a5a;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    margin-bottom: 25px;
}

.level-start-info #level-start-boss {
    color: #ff00ff;
    font-weight: bold;
}

/* ----- OVERLAY BUTTONS ----- */
.overlay-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}

.overlay-options .menu-btn {
    width: 100%;
    text-align: center;
}

/* ----- NOTIFICATION SYSTEM ----- */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 350px;
    width: 100%;
}

.notification {
    background: rgba(10, 20, 10, 0.92);
    border: 2px solid #2a4a2a;
    border-left: 6px solid #7cfc00;
    border-radius: 8px;
    padding: 14px 20px;
    color: #8aba8a;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    pointer-events: auto;
    backdrop-filter: blur(10px);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(50%);
    opacity: 0;
}

.notification .notification-icon {
    font-size: 24px;
    flex-shrink: 0;
    animation: bounce 0.6s ease;
}

.notification .notification-message {
    flex: 1;
    line-height: 1.4;
}

/* Notification Types */
.notification-kill { border-left-color: #ff3333; }
.notification-combo { border-left-color: #ff6600; }
.notification-score { border-left-color: #ffcc00; }
.notification-level { border-left-color: #7cfc00; }
.notification-warning { border-left-color: #ffaa00; }
.notification-success { border-left-color: #00ff88; }
.notification-info { border-left-color: #44ccff; }
.notification-boss { border-left-color: #ff00ff; }

/* ----- ANIMATIONS (Additional) ----- */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.4); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* ----- OVERLAY RESPONSIVE ----- */
@media (max-width: 500px) {
    .overlay-content {
        padding: 25px 20px;
        max-width: 95%;
    }
    
    .overlay-content h1 {
        font-size: 28px;
        letter-spacing: 2px;
    }
    
    .overlay-icon {
        font-size: 48px;
    }
    
    .stat-row {
        font-size: 15px;
    }
    
    .level-start-content .level-start-badge {
        font-size: 32px;
    }
    
    .level-start-content h2 {
        font-size: 22px;
    }
    
    .level-start-content p {
        font-size: 15px;
    }
    
    .notification-container {
        top: 10px;
        right: 10px;
        max-width: 280px;
    }
    
    .notification {
        font-size: 13px;
        padding: 10px 14px;
    }
    
    .notification .notification-icon {
        font-size: 20px;
    }
}

@media (max-width: 400px) {
    .overlay-content {
        padding: 20px 15px;
    }
    
    .overlay-content h1 {
        font-size: 22px;
    }
    
    .stat-row {
        font-size: 13px;
        padding: 4px 0;
    }
    
    .level-start-content .level-start-badge {
        font-size: 24px;
    }
    
    .level-start-content h2 {
        font-size: 18px;
    }
    
    .level-start-content p {
        font-size: 13px;
    }
    
    .notification-container {
        max-width: 220px;
    }
    
    .notification {
        font-size: 11px;
        padding: 8px 12px;
    }
    
    .notification .notification-icon {
        font-size: 16px;
    }
}

/* Mobile Controls */
#mobile-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: none;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 40;
    pointer-events: none;
}

#mobile-controls.active {
    display: flex;
}

#joystick-container {
    width: 120px;
    height: 120px;
    pointer-events: auto;
}

#joystick-base {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(124, 252, 0, 0.3);
    position: relative;
}

#joystick-thumb {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(124, 252, 0, 0.6);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid #7cfc00;
}

#action-buttons {
    display: flex;
    gap: 12px;
    pointer-events: auto;
    align-items: flex-end;
}

.mobile-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(10, 20, 10, 0.85);
    border: 2px solid #2a5a2a;
    color: #7cfc00;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

.mobile-btn:active {
    transform: scale(0.9);
    background: #2a4a2a;
}

.mobile-btn.shoot-btn {
    width: 80px;
    height: 80px;
    font-size: 32px;
    border-color: #ff3333;
    background: rgba(255, 0, 0, 0.2);
}

@media (max-width: 768px) {
    #mobile-controls.active {
        display: flex;
    }
}