/* RESET & BASE */
* { margin: 0; padding: 0; box-sizing: border-box; user-select: none; -webkit-tap-highlight-color: transparent; }
body, html { width: 100%; height: 100%; overflow: hidden; background-color: #0f0c29; font-family: 'Courier New', Courier, monospace; display: flex; justify-content: center; align-items: center; }

/* GAME CONTAINER */
#game-container {
    position: relative; width: 100%; height: 100%;
    background: linear-gradient(to bottom, #0f0c29, #302b63, #24243e); /* Space Gradient */
    overflow: hidden; box-shadow: 0 0 30px rgba(0,0,0,0.8);
}
@media (min-width: 768px) {
    #game-container { width: 450px; height: 90vh; border-radius: 20px; border: 8px solid #444; }
}

canvas { display: block; width: 100%; height: 100%; }

/* UI ELEMENTS */
#ui-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 10; }

/* TEXT STYLES */
.neon-text { color: #fff; text-shadow: 0 0 10px #00f2fe, 0 0 20px #00f2fe; font-size: 3rem; margin-bottom: 10px; line-height: 1; }
.red-neon { color: #ff0055; text-shadow: 0 0 10px #ff0055; font-size: 2.5rem; margin-bottom: 10px; }
p { color: #a8c0ff; font-weight: bold; font-size: 1.1rem; margin-bottom: 20px; text-shadow: 1px 1px 2px #000; }

/* SCORE */
#score-display { position: absolute; top: 10%; font-size: 4rem; color: rgba(255,255,255,0.8); font-weight: 900; display: none; }

/* BUTTONS */
#start-screen, #game-over-screen { text-align: center; pointer-events: auto; width: 90%; max-width: 350px; }

.btn {
    display: block; width: 100%; padding: 15px; margin-bottom: 10px;
    background: linear-gradient(45deg, #f12711, #f5af19);
    border: none; border-radius: 50px;
    color: white; font-size: 1.2rem; font-weight: 900; letter-spacing: 2px;
    cursor: pointer; box-shadow: 0 5px 15px rgba(245, 175, 25, 0.4);
    transition: transform 0.1s; text-transform: uppercase;
}
.btn:active { transform: scale(0.95); }
.btn-restart { background: linear-gradient(45deg, #00f2fe, #4facfe); box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4); }
.btn-home { background: transparent; border: 2px solid #555; color: #aaa; box-shadow: none; font-size: 0.9rem; margin-top: 10px;}

/* INFO BUTTONS */
.info-group { margin-top: 30px; display: flex; justify-content: center; gap: 15px; }
.btn-small { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #ccc; padding: 8px 15px; border-radius: 20px; cursor: pointer; backdrop-filter: blur(5px); }

/* MODAL */
.modal { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); z-index: 100; display: flex; justify-content: center; align-items: center; pointer-events: auto; backdrop-filter: blur(5px); }
.modal-content { background: #16213e; padding: 30px; border-radius: 15px; border: 1px solid #0f3460; width: 85%; max-width: 320px; text-align: center; box-shadow: 0 0 30px rgba(0,242,254,0.1); color: #fff; }
.modal-content h2 { border-bottom: 1px solid #333; padding-bottom: 10px; margin-bottom: 15px; color: #00f2fe; }
.modal-content ul { text-align: left; padding-left: 20px; margin-bottom: 20px; color: #ddd; font-size: 0.9rem; }
.btn-close { background: #e94560; border: none; padding: 10px 30px; border-radius: 50px; color: white; font-weight: bold; cursor: pointer; }
.btn-link { background: none; border: none; color: #4facfe; text-decoration: underline; cursor: pointer; }

/* --- TAMBAHAN UNTUK LEVEL BUTTONS --- */
.btn-easy { background: linear-gradient(45deg, #2ecc71, #26de81); }
.btn-medium { background: linear-gradient(45deg, #f1c40f, #f39c12); color: #000; }
.btn-hard { background: linear-gradient(45deg, #e74c3c, #c0392b); }

/* --- BACKGROUND THEMES (UNTUK LEVEL UP) --- */
/* Default (0-100) sudah ada di #game-container */

/* Level 2 (100-200): Red Nebula */
.bg-stage-2 {
    background: linear-gradient(to bottom, #4a0000, #800000, #2c3e50) !important;
}

/* Level 3 (200+): Bright Hyperspace */
.bg-stage-3 {
    background: linear-gradient(to bottom, #00c6ff, #0072ff) !important;
}