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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    color: white;
    overflow: hidden;
    height: 100vh;
}

#gameContainer {
    width: 100vw;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
}

.hidden {
    display: none !important;
}

/* Start Screen Styles */
#startScreen {
    background: linear-gradient(135deg, #2d1b69, #1a0b3d, #0f051f);
    position: relative;
}

#startScreen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, #fff, transparent),
        radial-gradient(1px 1px at 90px 40px, #eee, transparent),
        radial-gradient(1px 1px at 130px 80px, #fff, transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    opacity: 0.3;
    animation: twinkle 3s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    100% { opacity: 0.6; }
}

#startScreen h1 {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(255, 255, 255, 0.5); }
    to { text-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.3); }
}

.planet-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
}

.title-planet {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.instructions {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 500px;
}

.instructions h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ffd700;
}

.instructions p {
    font-size: 1.2rem;
    margin: 0.8rem 0;
    text-align: left;
}

.game-button {
    background: linear-gradient(45deg, #8b5cf6, #a855f7);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    position: relative;
    z-index: 1000;
    pointer-events: auto;
}

.game-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
    background: linear-gradient(45deg, #a855f7, #c084fc);
}

.game-button:active {
    transform: translateY(0);
    background: linear-gradient(45deg, #7c3aed, #9333ea);
}

/* Game Screen Styles */
#gameScreen {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    position: relative;
}

#gameCanvas {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: linear-gradient(135deg, #0f0f23, #1a1a2e);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

#gameUI {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 30px;
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

#gameUI div {
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 15px;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

/* Game Instructions */
.game-instructions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.instruction-item {
    background: rgba(0, 0, 0, 0.4);
    padding: 5px 10px;
    border-radius: 5px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-only {
    display: none;
}

/* Mobile Controls */
.mobile-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.mobile-btn {
    width: 60px;
    height: 60px;
    background: rgba(139, 92, 246, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.mobile-btn:active {
    transform: scale(0.95);
    background: rgba(168, 85, 247, 1);
}

.shoot-btn {
    background: rgba(239, 68, 68, 0.8);
    margin-top: 10px;
}

.shoot-btn:active {
    background: rgba(239, 68, 68, 1);
}

/* Game Over Screen Styles */
#gameOverScreen {
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    position: relative;
}

#gameOverScreen h1 {
    font-size: 4rem;
    color: #ff6b6b;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
    animation: pulse 1s ease-in-out infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

.game-over-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 500px;
}

.game-over-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #ffd700;
}

.game-over-content p {
    font-size: 1.2rem;
    margin: 1rem 0;
}

.final-score {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 1.5rem 0;
    color: #ffd700;
}

/* Responsive Design */
@media (max-width: 900px) {
    #gameCanvas {
        width: 90vw;
        height: 70vh;
    }
    
    #startScreen h1 {
        font-size: 3rem;
    }
    
    .planet-title {
        font-size: 2.5rem;
    }
    
    .instructions {
        margin: 0 20px 2rem 20px;
        padding: 1.5rem;
    }
    
    .instructions h2 {
        font-size: 1.5rem;
    }
    
    .instructions p {
        font-size: 1rem;
    }
    
    /* Show mobile controls on tablets and phones */
    .mobile-controls {
        display: flex !important;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    .game-instructions {
        top: 10px;
        right: 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    #startScreen h1 {
        font-size: 2.5rem;
    }
    
    .planet-title {
        font-size: 2rem;
    }
    
    .title-planet {
        width: 40px;
        height: 40px;
    }
    
    .game-button {
        padding: 12px 30px;
        font-size: 1.2rem;
    }
    
    /* Mobile specific adjustments */
    .mobile-controls {
        bottom: 10px;
        right: 10px;
    }
    
    .mobile-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    #gameUI {
        top: 10px;
        left: 10px;
        font-size: 1rem;
    }
}
