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

body {
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    background: #0a0a0a;
    color: #ffffff;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: visible; /* Allow score popups to be visible */
}

#game-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: none;
}

/* UI Overlay */
.ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.ui-overlay > * {
    pointer-events: auto;
}

/* Score Panel */
.score-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 15px 25px;
    min-width: 150px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* High Score Panel */
.high-score-panel {
    position: absolute;
    top: 90px;
    left: 20px;
    background: rgba(255, 215, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 15px;
    padding: 10px 20px;
    min-width: 150px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(255, 215, 0, 0.1);
}

.high-score-panel .high-score-label {
    font-size: 10px;
    color: rgba(255, 215, 0, 0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 3px;
}

.high-score-panel .high-score-value {
    font-size: 20px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.score-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.score-value {
    font-size: 36px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

.score-value.pulse {
    animation: scorePulse 0.5s ease;
}

@keyframes scorePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Power Meter */
.power-meter {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.power-meter.active {
    opacity: 1;
}

.power-label {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.power-bar-container {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.power-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00ff88, #ffff00, #ff0044);
    border-radius: 15px;
    transition: width 0.1s ease;
    box-shadow: 0 0 20px currentColor;
}

/* Target Toggle */
.target-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
}

.toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 12px 20px;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

.toggle-icon {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.toggle-btn.dynamic .toggle-icon {
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Music Controls */
.music-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.track-btn,
.music-btn,
.mute-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    position: relative;
}

.track-btn:hover,
.music-btn:hover,
.mute-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.track-btn {
    flex-direction: column;
    font-size: 16px;
}

.track-btn .track-icon {
    font-size: 20px;
    line-height: 1;
}

.track-btn .track-number {
    font-size: 12px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1;
}

.music-btn.paused .music-icon::after {
    content: '🎶';
}

.mute-btn.muted .mute-icon::after {
    content: '🔇';
}

/* Instructions */
.instructions {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

.instructions kbd {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    margin: 0 4px;
}

/* Crosshair */
.crosshair {
    position: absolute;
    width: 40px;
    height: 40px;
    pointer-events: none;
    z-index: 100;
    opacity: 0.8;
    transition: transform 0.1s ease;
}

.crosshair::before,
.crosshair::after {
    content: '';
    position: absolute;
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.crosshair::before {
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    transform: translateY(-50%);
}

.crosshair::after {
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    transform: translateX(-50%);
}

.crosshair-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #ff0044;
    border-radius: 50%;
    box-shadow: 0 0 20px #ff0044;
}

/* Hit Score Popup */
.hit-score {
    position: absolute;
    font-size: 32px;
    font-weight: bold;
    color: #ffff00;
    text-shadow: 0 0 20px rgba(255, 255, 0, 0.8);
    pointer-events: none;
    z-index: 100;
    animation: scoreFloat 1.5s ease-out forwards;
    /* Add translucent background */
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid currentColor;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transform: translate(-50%, -50%);
    white-space: nowrap;
}

/* Enhanced Hit Score Popup */
.hit-score-enhanced {
    position: absolute;
    pointer-events: none;
    z-index: 100; /* Increased to ensure it's on top */
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    white-space: nowrap;
    transform-origin: center center;
    /* Initial state for animation */
    opacity: 1;
}

.hit-score-enhanced .score-text {
    display: inline-block;
    font-family: 'Arial Black', sans-serif;
    letter-spacing: 1px;
}

.score-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: currentColor;
    pointer-events: none;
    z-index: 99;
}

@keyframes scoreFloat {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(0) scale(0.5);
    }
    20% {
        transform: translate(-50%, -50%) translateY(-20px) scale(1.3);
    }
    70% {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(-80px) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(-120px) scale(0.8);
        filter: blur(4px);
    }
}

/* Disintegrating effect */
.hit-score-enhanced.disintegrating {
    animation: scoreDisintegrate 0.5s ease-out forwards;
}

@keyframes scoreDisintegrate {
    0% {
        filter: blur(0px);
    }
    100% {
        filter: blur(4px);
    }
}

/* Score pixel particles */
.score-pixel {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 1px;
    pointer-events: none;
    z-index: 19;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-text {
    font-size: 24px;
    color: #ffffff;
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* High Score Notification */
.high-score-notification .high-score-text {
    font-size: 12px;
    font-weight: bold;
    color: #FFD700;
    margin-bottom: 2px;
}

.high-score-notification .high-score-value {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
}

/* Play Button */
.play-btn {
    background: rgba(0, 255, 136, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 15px;
    padding: 12px 24px;
    color: #00ff88;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 255, 136, 0.2);
}

.play-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.3);
}

.play-icon {
    font-size: 18px;
}

/* Control Panel */
.control-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 10px 16px;
    color: #ffffff;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.control-btn.play-btn {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    color: #00ff88;
    font-weight: bold;
}

.control-btn.play-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    box-shadow: 0 6px 20px rgba(0, 255, 136, 0.3);
}

.control-btn.level-btn {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    color: #FFD700;
}

.control-btn.level-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.btn-icon, .level-icon {
    font-size: 16px;
}

.btn-text, .level-text {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 11px;
    font-weight: bold;
}

/* Level Display (Center) */
.level-display-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
}

.level-display {
    background: rgba(0, 255, 136, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 255, 136, 0.5);
    border-radius: 20px;
    padding: 20px 40px;
    font-size: 32px;
    font-weight: bold;
    color: #00ff88;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.3);
}

/* Ammo Display */
.ammo-container {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 12px 15px;
    text-align: center;
}

.ammo-label {
    font-size: 14px; /* Increased from 12px */
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 2px; /* Increased spacing */
    margin-bottom: 12px; /* More spacing */
    font-weight: bold;
}

.ammo-bullets {
    display: flex;
    flex-direction: column; /* Changed to vertical stack */
    gap: 10px; /* Increased gap */
    justify-content: center;
    align-items: center;
}

.ammo-bullet {
    width: 30px; /* Larger width for 3D ball */
    height: 30px; /* Square for perfect circle */
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.1));
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%; /* Perfect circle */
    transition: all 0.3s ease;
    position: relative;
    /* 3D effect with box shadow */
    box-shadow: 
        inset -5px -5px 10px rgba(0, 0, 0, 0.3),
        inset 5px 5px 10px rgba(255, 255, 255, 0.3),
        2px 2px 8px rgba(0, 0, 0, 0.4);
}

.ammo-bullet.active {
    background: radial-gradient(circle at 30% 30%, #ffaa00, #ff0044, #990022);
    border-color: #ff0044;
    box-shadow: 
        inset -5px -5px 10px rgba(153, 0, 34, 0.5),
        inset 5px 5px 10px rgba(255, 170, 0, 0.5),
        0 0 20px rgba(255, 0, 68, 0.6),
        2px 2px 8px rgba(0, 0, 0, 0.4);
    transform: scale(1.1); /* Slightly larger when active */
}

.level-label {
    font-size: 24px;
    font-weight: bold;
    color: #00ff88;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 10px;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

/* Center Flash Last Shot Announcement */
.last-shot-center-flash {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    text-align: center;
    pointer-events: none;
}

.last-shot-flash-text {
    font-size: 80px;
    font-weight: 900;
    color: #ff0044;
    text-transform: uppercase;
    letter-spacing: 8px;
    text-shadow: 
        0 0 20px rgba(255, 0, 68, 1),
        0 0 40px rgba(255, 0, 68, 0.8),
        0 0 60px rgba(255, 0, 68, 0.6);
    background: linear-gradient(45deg, #ff0044, #ffaa00, #ff0044);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 0.5s ease-in-out infinite alternate;
}

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

/* Persistent Last Shot Announcement */
.last-shot-announcement {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 20px;
    background: rgba(255, 0, 68, 0.1);
    border: 2px solid #ff0044;
    border-radius: 12px;
    padding: 10px 20px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(255, 0, 68, 0.3);
    white-space: nowrap;
}

.last-shot-text {
    font-size: 18px;
    font-weight: bold;
    color: #ff0044;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(255, 0, 68, 0.8);
}

.last-shot-warning {
    font-size: 12px;
    color: #ffaa00;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

/* Shake animation for last ammo */
@keyframes lastShotShake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-2px) rotate(-5deg); }
    20% { transform: translateX(2px) rotate(5deg); }
    30% { transform: translateX(-2px) rotate(-5deg); }
    40% { transform: translateX(2px) rotate(5deg); }
    50% { transform: translateX(0) rotate(0deg); }
}

.ammo-bullet.last-shot-shake {
    animation: lastShotShake 0.5s ease-in-out infinite;
}

/* Compact Leaderboard */
.leaderboard-compact {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 15px;
    padding: 12px 15px;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.2);
    min-width: 220px;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.leaderboard-title {
    font-size: 14px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.leaderboard-single {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    position: relative;
}

.leaderboard-rank {
    font-size: 14px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    min-width: 28px;
}

.leaderboard-medal {
    font-size: 18px;
    margin-right: 8px;
}

.leaderboard-name {
    font-size: 13px;
    color: #ffffff;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
    max-width: 120px;
    font-weight: 500;
}

.leaderboard-score {
    font-size: 14px;
    font-weight: bold;
    color: #00ff88;
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    margin-left: auto;
}

/* Old leaderboard styles - keep for reference but hide */
.leaderboard {
    display: none;
}

.leaderboard-header {
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.25);
}

.leaderboard-title {
    font-size: 16px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
    margin-bottom: 3px;
}

.leaderboard-subtitle {
    font-size: 10px;
    color: rgba(255, 215, 0, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 8px 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.leaderboard-entry:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-5px);
}

.leaderboard-entry.recent {
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.leaderboard-entry.rank-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.05));
    border-color: rgba(255, 215, 0, 0.3);
}

.leaderboard-entry.rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.2), rgba(192, 192, 192, 0.05));
}

.leaderboard-entry.rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.2), rgba(205, 127, 50, 0.05));
}

.leaderboard-rank {
    font-size: 14px;
    width: 25px;
    text-align: center;
}

.leaderboard-name {
    flex: 1;
    font-size: 12px;
    color: #ffffff;
    margin: 0 6px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.leaderboard-score {
    font-size: 12px;
    font-weight: bold;
    color: #00ff88;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

.leaderboard-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    padding: 30px 0;
    font-style: italic;
}

.leaderboard-empty p {
    margin: 5px 0;
}

/* Name Modal */
.name-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.name-modal-content {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(0, 255, 136, 0.5);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 50px rgba(0, 255, 136, 0.3);
}

.name-modal-content h2 {
    font-size: 28px;
    color: #00ff88;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.8);
}

.name-modal-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    font-size: 16px;
}

.name-input {
    width: 100%;
    padding: 15px;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 10px;
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.name-input:focus {
    outline: none;
    border-color: #00ff88;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.name-submit-btn {
    background: linear-gradient(135deg, #00ff88, #00cc66);
    border: none;
    border-radius: 10px;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    color: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.name-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.5);
}

/* Epic Score Message */
.epic-score-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    text-align: center;
}

.epic-content {
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #FFD700;
    border-radius: 30px;
    padding: 50px;
    box-shadow: 0 0 100px rgba(255, 215, 0, 0.5);
}

.epic-content h1 {
    font-size: 36px;
    color: #FFD700;
    margin-bottom: 20px;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    animation: epicPulse 1s ease-in-out infinite;
}

.epic-score {
    font-size: 72px;
    font-weight: bold;
    color: #ffffff;
    margin: 20px 0;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.epic-content p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .last-shot-flash-text {
        font-size: 50px; /* Smaller on mobile */
        letter-spacing: 4px;
    }
    
    .last-shot-center-flash {
        top: 35%; /* Adjust position for mobile */
    }
    
    .score-panel {
        top: 10px;
        left: 10px;
        padding: 10px 15px;
        min-width: 120px;
    }
    
    .score-label {
        font-size: 12px;
    }
    
    .score-value {
        font-size: 28px;
    }
    
    .target-toggle {
        top: 10px;
        right: 10px;
    }
    
    .toggle-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .power-meter {
        width: 250px;
        bottom: 30px;
    }
    
    .instructions {
        font-size: 12px;
        padding: 8px 15px;
        bottom: 80px;
    }
    
    .leaderboard {
        width: 180px;
        padding: 10px;
        top: 10px;
        right: 10px;
    }
    
    .leaderboard-title {
        font-size: 14px;
    }
    
    .leaderboard-name {
        font-size: 11px;
    }
    
    .leaderboard-score {
        font-size: 11px;
    }
    
    .ammo-container {
        left: 10px;
        padding: 8px 10px;
    }
    
    .ammo-bullet {
        width: 24px; /* Smaller on mobile but still circular */
        height: 24px;
    }
    
    .control-panel {
        top: 10px;
        left: 10px;
        gap: 8px;
    }
    
    .control-btn {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .btn-text, .level-text {
        font-size: 10px;
    }
    
    .btn-icon, .level-icon {
        font-size: 14px;
    }
    
    .leaderboard-compact {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        min-width: 180px;
    }
    
    .leaderboard-rank {
        font-size: 12px;
        min-width: 24px;
    }
    
    .leaderboard-medal {
        font-size: 14px;
        margin-right: 6px;
    }
    
    .leaderboard-name {
        font-size: 11px;
        max-width: 80px;
    }
    
    .leaderboard-score {
        font-size: 11px;
    }
    
    .level-display {
        font-size: 24px;
        padding: 15px 30px;
    }
}
/* =====================================================
   Mobile Touch Controls
   ===================================================== */

/* Touch indicator styling */
.touch-indicator {
    position: fixed;
    width: 80px;
    height: 80px;
    border: 3px solid rgba(0, 255, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
    display: none;
    transform: translate(-50%, -50%);
    z-index: 100;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.2), transparent);
    transition: transform 0.1s ease-out, border-color 0.1s ease-out;
}

/* Mobile-specific adjustments */
@media (max-width: 768px), (hover: none) {
    /* Show cursor on mobile since touch is used */
    #game-canvas {
        cursor: default;
    }

    /* Make UI elements more touch-friendly */
    .toggle-btn,
    .track-btn,
    .music-btn,
    .mute-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 12px;
    }

    /* Adjust score panel for mobile */
    .score-panel {
        top: 10px;
        left: 10px;
        padding: 10px 15px;
    }

    .score-value {
        font-size: 32px;
    }

    /* Adjust power meter for mobile */
    .power-meter {
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 80%;
        max-width: 300px;
    }

    /* Adjust instructions for mobile */
    .instructions {
        bottom: 80px;
        font-size: 12px;
        padding: 8px 12px;
    }

    /* Make crosshair smaller on mobile */
    .crosshair {
        width: 30px;
        height: 30px;
    }

    .crosshair-dot {
        width: 4px;
        height: 4px;
    }

    .crosshair::before,
    .crosshair::after {
        width: 12px;
        height: 2px;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 896px) and (orientation: landscape) {
    .score-panel {
        top: 5px;
        left: 5px;
        padding: 8px 12px;
    }

    .power-meter {
        bottom: 10px;
    }

    .instructions {
        bottom: 50px;
        font-size: 11px;
    }
}

/* Prevent text selection on touch devices */
@media (hover: none) {
    * {
        -webkit-user-select: none;
        -moz-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }
}
