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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a2e 50%, #16213e 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, white, transparent),
        radial-gradient(2px 2px at 60% 70%, white, transparent),
        radial-gradient(1px 1px at 50% 50%, white, transparent),
        radial-gradient(1px 1px at 80% 10%, white, transparent),
        radial-gradient(2px 2px at 90% 60%, white, transparent),
        radial-gradient(1px 1px at 33% 80%, white, transparent),
        radial-gradient(1px 1px at 70% 40%, white, transparent);
    background-size: 200% 200%;
    animation: stars 100s linear infinite;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

@keyframes stars {
    from { background-position: 0 0; }
    to { background-position: 100% 100%; }
}

.game-container {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 1200px;
    width: 100%;
}

#game canvas {
    max-width: 100%;
    height: auto !important;
}

.header {
    margin-bottom: 15px;
    animation: slideDown 1s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header h1 {
    font-size: 3.5em;
    font-weight: bold;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #f7dc6f);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    letter-spacing: 5px;
}

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

.subtitle {
    font-size: 1.2em;
    color: #4ecdc4;
    margin-top: 10px;
    text-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
}

#game {
    margin: 0 auto;
    border: 3px solid #4ecdc4;
    border-radius: 15px;
    box-shadow: 
        0 0 20px rgba(78, 205, 196, 0.5),
        0 0 40px rgba(78, 205, 196, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 
            0 0 20px rgba(78, 205, 196, 0.5),
            0 0 40px rgba(78, 205, 196, 0.3),
            inset 0 0 20px rgba(0, 0, 0, 0.5);
    }
    50% {
        box-shadow: 
            0 0 30px rgba(78, 205, 196, 0.7),
            0 0 60px rgba(78, 205, 196, 0.5),
            inset 0 0 20px rgba(0, 0, 0, 0.5);
    }
}

.instructions {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(78, 205, 196, 0.3);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(10px);
    animation: fadeIn 1.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.instructions h3 {
    color: #f7dc6f;
    font-size: 1.5em;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(247, 220, 111, 0.5);
}

.controls-grid {
    display: flex;
    gap: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.control-section {
    text-align: left;
}

.control-section h3 {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.instructions ul {
    list-style: none;
    display: inline-block;
    text-align: left;
}

.instructions li {
    margin: 10px 0;
    font-size: 1.1em;
    padding: 5px 0;
}

.instructions strong {
    color: #ff6b6b;
    font-weight: bold;
}

.weapons {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid rgba(78, 205, 196, 0.3);
}

.weapon-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.weapon-item {
    margin: 4px 0;
    font-size: 1em;
    padding: 8px 14px;
    background: rgba(100, 120, 255, 0.12);
    border: 1px solid rgba(100, 140, 255, 0.25);
    border-radius: 6px;
    display: inline-block;
    min-width: 220px;
}

.unlock {
    font-size: 0.8em;
    color: #888;
    margin-left: 4px;
}

.power-ups {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid rgba(78, 205, 196, 0.3);
}

.power-up-item {
    margin: 8px 0;
    font-size: 1.1em;
    padding: 8px;
    background: rgba(247, 220, 111, 0.1);
    border-radius: 5px;
    display: inline-block;
    min-width: 250px;
}

.features {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid rgba(78, 205, 196, 0.3);
}

.feature-item {
    margin: 8px 0;
    font-size: 1.05em;
    padding: 8px;
    background: rgba(78, 205, 196, 0.1);
    border-radius: 5px;
    display: inline-block;
    min-width: 280px;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .instructions {
        padding: 15px;
    }
    
    .instructions h3 {
        font-size: 1.2em;
    }
}
