/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

html {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    touch-action: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}

/* Game Container */
.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}

/* Canvas Styles */
#gameCanvas {
    background: radial-gradient(circle at center, #0f0f23 0%, #1a1a2e 70%);
    border: 2px solid #4a5568;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.3);
    max-width: 100vw;
    max-height: 100vh;
    touch-action: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* UI Overlay */
.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    flex-wrap: wrap;
    gap: 10px;
}

.score-display, .wave-display, .ammo-display {
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(5px);
}

.score-label, .wave-label, .ammo-label {
    color: #a0aec0;
    font-size: 14px;
    margin-right: 8px;
}

#score, #wave {
    color: #3b82f6;
    font-weight: bold;
    font-size: 16px;
}

.pause-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    pointer-events: all;
    transition: all 0.2s ease;
}

.pause-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.05);
}

/* Weapon Selection Panel */
.weapon-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    pointer-events: all;
    z-index: 150;
}

.weapon-selection {
    display: flex;
    gap: 12px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 15px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(10px);
    pointer-events: all;
    z-index: 155;
}

.weapon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 60px;
    min-height: 50px;
    pointer-events: all;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.3);
    z-index: 155;
}

.weapon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.weapon-btn.active {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    pointer-events: all;
    touch-action: manipulation;
}

.weapon-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

.weapon-name {
    font-size: 12px;
    font-weight: bold;
}

.ammo-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ammo-label {
    color: #a0aec0;
    font-size: 12px;
}

#ammoCount {
    color: #3b82f6;
    font-weight: bold;
    font-size: 14px;
    min-width: 30px;
}

.reload-btn {
    background: #ef4444;
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reload-btn:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Screen Overlays */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(10px);
    padding: 10px;
    box-sizing: border-box;
    overflow-y: auto;
    touch-action: manipulation;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}

@media (max-width: 768px) {
    .screen {
        padding: 5px;
        align-items: flex-start;
        justify-content: flex-start;
        padding-top: 10px;
    }
}

@media (max-width: 480px) {
    .screen {
        padding: 2px;
        align-items: flex-start;
        justify-content: flex-start;
        padding-top: 5px;
    }
}

.screen-content {
    text-align: center;
    max-width: 400px;
    padding: 20px;
    background: linear-gradient(145deg, rgba(26, 32, 44, 0.9), rgba(45, 55, 72, 0.9));
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.game-title {
    font-size: 2.5em;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.instructions {
    margin: 20px 0;
    text-align: left;
}

.instructions h2 {
    color: #3b82f6;
    margin-bottom: 15px;
    text-align: center;
}

.instructions h3 {
    color: #06b6d4;
    margin: 15px 0 10px 0;
    font-size: 16px;
}

.instructions p {
    margin: 8px 0;
    color: #a0aec0;
    line-height: 1.5;
}

/* Enemy Guide */
.enemy-guide {
    margin-top: 15px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.enemy-type {
    display: flex;
    align-items: center;
    margin: 5px 0;
    font-size: 14px;
}

.enemy-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.enemy-color.red {
    background: #ef4444;
}

.enemy-color.green {
    background: #22c55e;
}

.enemy-color.purple {
    background: #a855f7;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 8px;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.btn.primary {
    background: linear-gradient(45deg, #3b82f6, #06b6d4);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn.secondary {
    background: linear-gradient(45deg, #6b7280, #9ca3af);
    color: white;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn:active {
    transform: translateY(0);
}

/* Final Score Display */
.final-score, .wave-reached {
    font-size: 18px;
    margin: 15px 0;
    color: #3b82f6;
}

/* Controls Hint */
.controls-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    animation: fadeInOut 3s infinite;
    pointer-events: none;
    z-index: 5;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .top-bar {
        padding: 10px 15px;
    }
    
    .score-display, .wave-display {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .weapon-panel {
        bottom: 10px;
        pointer-events: all;
        z-index: 150;
    }
    
    .weapon-selection {
        padding: 8px;
        gap: 10px;
    }
    
    .weapon-btn {
        padding: 8px 10px;
        min-width: 50px;
        min-height: 44px;
        pointer-events: all;
        touch-action: manipulation;
        z-index: 155;
    }
    
    .weapon-icon {
        font-size: 16px;
    }
    
    .weapon-name {
        font-size: 10px;
    }
    
    .game-title {
        font-size: 2em;
    }
    
    .screen-content {
        margin: 20px;
        padding: 15px;
    }
    
    .instructions p {
        font-size: 14px;
    }
    
    .controls-hint {
        bottom: 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .top-bar {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .score-display {
        order: 1;
    }
    
    .wave-display {
        order: 2;
    }
    
    .pause-btn {
        order: 3;
        align-self: center;
    }
    
    .weapon-panel {
        bottom: 5px;
        gap: 8px;
        pointer-events: all;
        z-index: 150;
    }
    
    .weapon-selection {
        gap: 8px;
        padding: 6px;
    }
    
    .weapon-btn {
        padding: 6px 8px;
        min-width: 48px;
        min-height: 44px;
        pointer-events: all;
        touch-action: manipulation;
        z-index: 155;
    }
    
    .ammo-display {
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* Modern Game Over Screen Styles */
.game-over-content {
    text-align: center;
    max-width: 500px;
    padding: 40px;
    background: linear-gradient(135deg, 
        rgba(15, 15, 35, 0.95) 0%, 
        rgba(25, 25, 50, 0.95) 50%, 
        rgba(35, 15, 35, 0.95) 100%);
    border-radius: 20px;
    border: 2px solid rgba(255, 50, 100, 0.3);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 60px rgba(255, 50, 100, 0.2);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

@media (min-width: 769px) {
    .stats-actions-container {
        flex-direction: row;
        gap: 30px;
        margin: 30px 0;
    }
    
    .stats-container {
        flex-direction: row;
        justify-content: space-around;
        flex: 1;
    }
    
    .game-over-actions {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.game-over-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 40%, rgba(255, 0, 100, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(100, 0, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.game-over-header {
    margin-bottom: 30px;
    position: relative;
}

.skull-icon {
    font-size: 60px;
    margin-bottom: 15px;
    animation: skullPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 50, 50, 0.8));
}

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

.game-over-title {
    font-size: 3em;
    font-weight: 900;
    margin: 0;
    background: linear-gradient(45deg, #ff3366, #ff6b35, #ffff00, #33ff88);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(255, 51, 102, 0.5);
    letter-spacing: 3px;
}

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

.new-high-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
    padding: 8px 16px;
    background: linear-gradient(45deg, rgba(255, 215, 0, 0.2), rgba(255, 140, 0, 0.2));
    border: 2px solid rgba(255, 215, 0, 0.6);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    animation: newHighScorePulse 2s ease-in-out infinite;
}

.new-high-score.celebrate {
    animation: celebrate 1s ease-out, newHighScorePulse 2s ease-in-out infinite 1s;
}

.trophy-icon {
    font-size: 24px;
    margin-bottom: 4px;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

.high-score-text {
    font-size: 12px;
    font-weight: 800;
    color: #ffd700;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

@keyframes newHighScorePulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    }
}

@keyframes celebrate {
    0% { transform: scale(0.5) rotate(-10deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(5deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.glitch-line {
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, transparent, #ff3366, transparent);
    margin-top: 10px;
    animation: glitchMove 2s linear infinite;
}

@keyframes glitchMove {
    0% { transform: translateX(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

.stats-actions-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 20px 0;
    gap: 20px;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex: 1;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    border: 1px solid rgba(100, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2.5em;
    font-weight: 800;
    color: #00ffff;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.8);
    font-family: 'Courier New', monospace;
}

.stat-divider {
    width: 2px;
    height: 60px;
    background: linear-gradient(to bottom, transparent, #ff3366, transparent);
    margin: 0 20px;
}

.game-over-actions {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-modern {
    position: relative;
    padding: 15px 40px;
    background: linear-gradient(45deg, #ff3366, #ff6b35);
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(255, 51, 102, 0.4);
}

.btn-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 51, 102, 0.6);
}

.btn-modern .btn-text {
    position: relative;
    z-index: 2;
}

.btn-modern .btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-modern:hover .btn-glow {
    left: 100%;
}

.defeat-message {
    margin-top: 20px;
    opacity: 0.8;
}

.message-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    animation: messageFlicker 4s ease-in-out infinite;
}

@keyframes messageFlicker {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.9; }
}

/* Modern Start Screen Styles */
.start-content {
    text-align: center;
    max-width: 600px;
    padding: 40px;
    background: linear-gradient(135deg, 
        rgba(15, 25, 35, 0.95) 0%, 
        rgba(25, 35, 50, 0.95) 50%, 
        rgba(15, 35, 25, 0.95) 100%);
    border-radius: 20px;
    border: 2px solid rgba(0, 255, 150, 0.3);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 60px rgba(0, 255, 150, 0.2);
    backdrop-filter: blur(20px);
    position: relative;
}

.start-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 100, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(0, 100, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.title-section {
    margin-bottom: 0px;
    position: relative;
}

.modern-game-title {
    font-size: 3.5em;
    font-weight: 900;
    margin: 0 0 15px 0;
    line-height: 1.1;
}

.title-word {
    display: inline-block;
    background: linear-gradient(45deg, #00ff88, #0088ff, #8800ff, #ff0088);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titlePulse 4s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
    letter-spacing: 3px;
    margin: 0 10px;
}

.title-word:nth-child(2) {
    animation-delay: 0.5s;
}

@keyframes titlePulse {
    0%, 100% { 
        background-position: 0% 50%;
        transform: scale(1);
    }
    25% { 
        background-position: 100% 50%;
        transform: scale(1.05);
    }
    50% { 
        background-position: 100% 100%;
    }
    75% { 
        background-position: 0% 100%;
        transform: scale(1.02);
    }
}

.subtitle {
    font-size: 14px;
    color: rgba(0, 255, 150, 0.8);
    font-weight: 600;
    letter-spacing: 4px;
    margin-bottom: 10px;
    animation: subtitleGlow 3s ease-in-out infinite;
}

@keyframes subtitleGlow {
    0%, 100% { text-shadow: 0 0 10px rgba(0, 255, 150, 0.5); }
    50% { text-shadow: 0 0 20px rgba(0, 255, 150, 0.8); }
}

.version-tag {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(45deg, rgba(0, 255, 150, 0.2), rgba(0, 150, 255, 0.2));
    border: 1px solid rgba(0, 255, 150, 0.5);
    border-radius: 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    letter-spacing: 1px;
}

.stats-section {
    margin: 20px 0;
    width: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 150, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.stat-box:hover {
    border-color: rgba(0, 255, 150, 0.4);
    transform: translateY(-2px);
}

.stat-box.highlight {
    border-color: rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 140, 0, 0.1));
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.stat-icon {
    font-size: 20px;
    margin-bottom: 6px;
    filter: drop-shadow(0 0 8px rgba(0, 255, 150, 0.5));
}

.stat-box.highlight .stat-icon {
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.8));
}

.stat-number {
    font-size: 16px;
    font-weight: 800;
    color: #00ff88;
    font-family: 'Courier New', monospace;
    margin-bottom: 3px;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.stat-box.highlight .stat-number {
    color: #ffd700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.stat-name {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    letter-spacing: 1px;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.feature-card {
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 15px;
    border: 1px solid rgba(0, 255, 150, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: rgba(0, 255, 150, 0.5);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 255, 150, 0.2);
}

.feature-icon {
    font-size: 30px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 10px rgba(0, 255, 150, 0.8));
}

.feature-title {
    font-size: 14px;
    font-weight: 700;
    color: #00ff88;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.feature-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.controls-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.control-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.control-key {
    padding: 8px 16px;
    background: linear-gradient(45deg, rgba(0, 255, 150, 0.2), rgba(0, 150, 255, 0.2));
    border: 1px solid rgba(0, 255, 150, 0.5);
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    color: #00ff88;
    letter-spacing: 1px;
}

.control-action {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
}

.start-actions {
    margin: 0px 0 20px 0;
}

.start-btn {
    font-size: 18px;
    padding: 18px 50px;
    background: linear-gradient(45deg, #00ff88, #0088ff);
    letter-spacing: 3px;
}

.start-btn:hover {
    background: linear-gradient(45deg, #00cc66, #0066cc);
    box-shadow: 0 12px 35px rgba(0, 255, 136, 0.6);
}

.mission-brief {
    margin-top: 20px;
    opacity: 0.8;
}

.brief-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    animation: briefFlicker 5s ease-in-out infinite;
}

@keyframes briefFlicker {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.9; }
}

/* Modern Pause Screen Styles */
.pause-content {
    text-align: center;
    max-width: 400px;
    padding: 40px;
    background: linear-gradient(135deg, 
        rgba(25, 25, 35, 0.95) 0%, 
        rgba(35, 35, 50, 0.95) 50%, 
        rgba(25, 35, 45, 0.95) 100%);
    border-radius: 20px;
    border: 2px solid rgba(100, 150, 255, 0.3);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 0 60px rgba(100, 150, 255, 0.2);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.pause-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 40% 40%, rgba(100, 150, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.pause-header {
    margin-bottom: 40px;
    position: relative;
}

.pause-icon {
    font-size: 50px;
    margin-bottom: 15px;
    animation: pausePulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(100, 150, 255, 0.8));
}

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

.pause-title {
    font-size: 2.5em;
    font-weight: 900;
    margin: 0;
    background: linear-gradient(45deg, #64a6ff, #66ccff, #88ddff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: pauseGradient 3s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(100, 150, 255, 0.5);
    letter-spacing: 4px;
}

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

.pause-line {
    height: 2px;
    width: 60%;
    margin: 15px auto 0;
    background: linear-gradient(90deg, transparent, #64a6ff, transparent);
    animation: pauseLineGlow 2s ease-in-out infinite;
}

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

.pause-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.btn-modern.secondary {
    background: linear-gradient(45deg, #666666, #888888);
    box-shadow: 0 8px 25px rgba(102, 102, 102, 0.4);
}

.btn-modern.secondary:hover {
    background: linear-gradient(45deg, #555555, #777777);
    box-shadow: 0 12px 35px rgba(102, 102, 102, 0.6);
}

/* Mobile Responsive for Start Screen */
@media (max-width: 768px) {
    .start-content {
        max-width: 98vw;
        max-height: 95vh;
        padding: 8px;
        margin: 0;
        box-sizing: border-box;
        overflow-y: auto;
    }

    .title-section {
        margin-bottom: 0px;
    }

    .modern-game-title {
        font-size: 1.8em;
        line-height: 1.1;
        margin-bottom: 8px;
    }

    .stats-section {
        margin: 12px 0;
    }

    .stats-grid {
        gap: 8px;
    }

    .stat-box {
        padding: 8px 6px;
    }

    .stat-icon {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .stat-number {
        font-size: 14px;
    }

    .stat-name {
        font-size: 7px;
    }

    .new-high-score {
        margin-top: 6px;
        padding: 5px 12px;
    }

    .trophy-icon {
        font-size: 18px;
        margin-bottom: 2px;
    }

    .high-score-text {
        font-size: 10px;
        letter-spacing: 1px;
    }

    .title-word {
        margin: 0 3px;
        letter-spacing: 1px;
    }

    .subtitle {
        font-size: 10px;
        letter-spacing: 2px;
        margin-bottom: 5px;
    }

    .version-tag {
        padding: 2px 8px;
        font-size: 9px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        margin: 15px 0;
    }

    .feature-card {
        padding: 8px;
    }

    .feature-icon {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .feature-title {
        font-size: 11px;
        margin-bottom: 2px;
    }

    .feature-desc {
        font-size: 9px;
    }

    .controls-info {
        gap: 15px;
        margin: 12px 0;
    }

    .control-key {
        padding: 4px 8px;
        font-size: 9px;
    }

    .control-action {
        font-size: 8px;
    }

    .start-actions {
        margin: 15px 0 8px 0;
    }

    .start-btn {
        font-size: 14px;
        padding: 10px 25px;
        letter-spacing: 1px;
    }

    .mission-brief {
        margin-top: 8px;
    }

    .brief-text {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .start-content {
        max-width: 99vw;
        max-height: 97vh;
        padding: 5px;
        margin: 0;
        overflow-y: auto;
    }

    .title-section {
        margin-bottom: 0px;
    }

    .modern-game-title {
        font-size: 1.5em;
        margin-bottom: 5px;
    }

    .stats-section {
        margin: 8px 0;
    }

    .stats-grid {
        gap: 6px;
    }

    .stat-box {
        padding: 6px 4px;
    }

    .stat-icon {
        font-size: 14px;
        margin-bottom: 3px;
    }

    .stat-number {
        font-size: 12px;
    }

    .stat-name {
        font-size: 6px;
    }

    .new-high-score {
        margin-top: 4px;
        padding: 4px 10px;
    }

    .trophy-icon {
        font-size: 16px;
        margin-bottom: 1px;
    }

    .high-score-text {
        font-size: 9px;
        letter-spacing: 0.5px;
    }

    .title-word {
        margin: 0 2px;
        letter-spacing: 0.5px;
    }

    .subtitle {
        font-size: 9px;
        letter-spacing: 1px;
        margin-bottom: 3px;
    }

    .version-tag {
        padding: 1px 6px;
        font-size: 8px;
    }

    .features-grid {
        gap: 6px;
        margin: 10px 0;
    }

    .feature-card {
        padding: 6px;
    }

    .feature-icon {
        font-size: 18px;
        margin-bottom: 3px;
    }

    .feature-title {
        font-size: 10px;
        margin-bottom: 2px;
    }

    .feature-desc {
        font-size: 8px;
    }

    .controls-info {
        gap: 10px;
        margin: 10px 0;
    }

    .control-key {
        padding: 3px 6px;
        font-size: 8px;
    }

    .control-action {
        font-size: 7px;
    }

    .start-actions {
        margin: 10px 0 5px 0;
    }

    .start-btn {
        font-size: 12px;
        padding: 8px 20px;
        letter-spacing: 0.5px;
    }

    .mission-brief {
        margin-top: 5px;
    }

    .brief-text {
        font-size: 9px;
    }
}

@media (max-width: 320px) {
    .start-content {
        max-width: 100vw;
        max-height: 98vh;
        padding: 3px;
        margin: 0;
        overflow-y: auto;
    }

    .modern-game-title {
        font-size: 1.3em;
        margin-bottom: 3px;
    }

    .stats-section {
        margin: 6px 0;
    }

    .stats-grid {
        gap: 4px;
    }

    .stat-box {
        padding: 4px 3px;
    }

    .stat-icon {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .stat-number {
        font-size: 10px;
    }

    .stat-name {
        font-size: 5px;
    }

    .new-high-score {
        margin-top: 3px;
        padding: 3px 8px;
    }

    .trophy-icon {
        font-size: 14px;
        margin-bottom: 1px;
    }

    .high-score-text {
        font-size: 8px;
        letter-spacing: 0px;
    }

    .title-word {
        margin: 0 1px;
        letter-spacing: 0px;
    }

    .subtitle {
        font-size: 8px;
        margin-bottom: 2px;
    }

    .version-tag {
        padding: 1px 4px;
        font-size: 7px;
    }

    .features-grid {
        gap: 4px;
        margin: 8px 0;
    }

    .feature-card {
        padding: 4px;
    }

    .feature-icon {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .feature-title {
        font-size: 9px;
        margin-bottom: 1px;
    }

    .feature-desc {
        font-size: 7px;
    }

    .controls-info {
        flex-direction: column;
        gap: 6px;
        margin: 8px 0;
    }

    .control-key {
        padding: 2px 4px;
        font-size: 7px;
    }

    .control-action {
        font-size: 6px;
    }

    .start-btn {
        font-size: 11px;
        padding: 6px 15px;
        letter-spacing: 0px;
    }

    .brief-text {
        font-size: 8px;
    }
}

/* Game Over Mobile Responsive */
@media (max-width: 768px) {
    .game-over-content {
        max-width: 100vw;
        max-height: 100vh;
        padding: 5px;
        margin: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .game-over-header {
        margin-bottom: 5px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .skull-icon {
        font-size: 25px;
        margin-bottom: 3px;
    }

    .game-over-title {
        font-size: 1.3em;
        letter-spacing: 0.5px;
        margin: 0;
    }

    .glitch-line {
        margin-top: 3px;
        height: 1px;
    }

    .stats-actions-container {
        flex-direction: row;
        gap: 10px;
        margin: 8px 0;
        width: 100%;
    }

    .stats-container {
        padding: 6px;
        flex-direction: row;
        justify-content: space-around;
        flex: 1;
    }

    .stat-divider {
        width: 1px;
        height: 30px;
        margin: 0 5px;
    }

    .stat-label {
        font-size: 8px;
        margin-bottom: 2px;
    }

    .stat-value {
        font-size: 1em;
    }

    .game-over-actions {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-modern {
        padding: 8px 20px;
        font-size: 12px;
    }

    .defeat-message {
        margin-top: 3px;
    }

    .message-text {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .game-over-content {
        max-width: 100vw;
        max-height: 100vh;
        padding: 3px;
        margin: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .skull-icon {
        font-size: 20px;
        margin-bottom: 2px;
    }

    .game-over-title {
        font-size: 1.1em;
        letter-spacing: 0.3px;
    }

    .stats-actions-container {
        flex-direction: row;
        gap: 8px;
        margin: 5px 0;
        width: 100%;
    }

    .stats-container {
        padding: 4px;
        flex-direction: row;
        justify-content: space-around;
        flex: 1;
    }

    .stat-divider {
        width: 1px;
        height: 25px;
        margin: 0 4px;
    }

    .stat-label {
        font-size: 7px;
        margin-bottom: 1px;
    }

    .stat-value {
        font-size: 0.9em;
    }

    .game-over-actions {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-modern {
        padding: 6px 15px;
        font-size: 11px;
        letter-spacing: 0.3px;
    }

    .defeat-message {
        margin-top: 2px;
    }

    .message-text {
        font-size: 8px;
    }
}

@media (max-width: 320px) {
    .game-over-content {
        max-width: 100vw;
        max-height: 100vh;
        padding: 2px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .skull-icon {
        font-size: 18px;
        margin-bottom: 1px;
    }

    .game-over-title {
        font-size: 1em;
        letter-spacing: 0px;
    }

    .glitch-line {
        margin-top: 1px;
        height: 1px;
    }

    .stats-actions-container {
        flex-direction: row;
        gap: 5px;
        margin: 3px 0;
        width: 100%;
    }

    .stats-container {
        padding: 2px;
        flex-direction: row;
        justify-content: space-around;
        flex: 1;
    }

    .stat-divider {
        width: 1px;
        height: 20px;
        margin: 0 3px;
    }

    .stat-label {
        font-size: 6px;
        margin-bottom: 1px;
    }

    .stat-value {
        font-size: 0.8em;
    }

    .game-over-actions {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-modern {
        padding: 5px 12px;
        font-size: 10px;
        letter-spacing: 0px;
    }

    .defeat-message {
        margin-top: 1px;
    }

    .message-text {
        font-size: 7px;
    }
}

/* Pause Mobile Responsive */
@media (max-width: 768px) {
    .pause-content {
        max-width: 95vw;
        max-height: 90vh;
        padding: 15px;
        margin: 0;
        overflow-y: auto;
    }

    .pause-header {
        margin-bottom: 20px;
    }

    .pause-icon {
        font-size: 35px;
        margin-bottom: 10px;
    }

    .pause-title {
        font-size: 1.8em;
        letter-spacing: 2px;
    }

    .pause-actions {
        gap: 12px;
    }

    .btn-modern {
        padding: 10px 25px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .pause-content {
        max-width: 98vw;
        max-height: 95vh;
        padding: 10px;
    }

    .pause-header {
        margin-bottom: 15px;
    }

    .pause-icon {
        font-size: 30px;
        margin-bottom: 8px;
    }

    .pause-title {
        font-size: 1.5em;
        letter-spacing: 1px;
    }

    .pause-line {
        margin: 10px auto 0;
    }

    .pause-actions {
        gap: 10px;
    }

    .btn-modern {
        padding: 8px 20px;
        font-size: 12px;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 320px) {
    .pause-content {
        max-width: 99vw;
        max-height: 97vh;
        padding: 8px;
    }

    .pause-icon {
        font-size: 25px;
        margin-bottom: 5px;
    }

    .pause-title {
        font-size: 1.3em;
        letter-spacing: 0.5px;
    }

    .btn-modern {
        padding: 6px 15px;
        font-size: 11px;
        letter-spacing: 0px;
    }
}

/* Landscape orientation on mobile */
@media (orientation: landscape) and (max-height: 500px) {
    .weapon-panel {
        bottom: 10px;
        left: 20px;
        transform: none;
        flex-direction: row;
        align-items: center;
        pointer-events: all;
        z-index: 150;
    }
    
    .weapon-selection {
        flex-direction: row;
        padding: 8px;
        gap: 10px;
        pointer-events: all;
        z-index: 155;
    }
    
    .weapon-btn {
        padding: 8px 10px;
        min-width: 50px;
        min-height: 44px;
        pointer-events: all;
        touch-action: manipulation;
        z-index: 155;
    }
    
    .screen-content, .start-content, .game-over-content, .pause-content {
        max-width: 85vw;
        max-height: 85vh;
        overflow-y: auto;
        padding: 15px;
    }
    
    .modern-game-title, .game-title {
        font-size: 1.8em;
        margin-bottom: 10px;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin: 15px 0;
    }
    
    .feature-card {
        padding: 8px;
    }
    
    .feature-icon {
        font-size: 20px;
        margin-bottom: 5px;
    }
    
    .feature-title {
        font-size: 11px;
    }
    
    .feature-desc {
        font-size: 9px;
    }
    
    .controls-info {
        margin: 15px 0;
        gap: 15px;
    }
    
    .instructions {
        margin: 10px 0;
    }
    
    .start-btn, .btn-modern {
        padding: 10px 25px;
        font-size: 14px;
    }
    
    .subtitle {
        font-size: 10px;
        margin-bottom: 5px;
    }
    
    .mission-brief, .defeat-message {
        margin-top: 10px;
    }
    
    .brief-text, .message-text {
        font-size: 10px;
    }
}

/* Extra Security - Prevent all unwanted interactions */
* {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* Prevent text selection on all elements */
::selection {
    background: transparent;
}

::-moz-selection {
    background: transparent;
}

/* Prevent zoom and scroll on touch devices */
@media screen and (max-width: 768px) {
    body {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    /* Prevent pull-to-refresh */
    body {
        overscroll-behavior-y: contain;
    }
}

/* Prevent context menu on all elements */
* {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow text selection only for input elements if needed */
input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Prevent highlighting on mobile */
* {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    -webkit-tap-highlight-color: transparent;
}