:root {
    --bg-dark: #0b0f19;
    --bg-card: rgba(26, 32, 53, 0.85);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent-orange: #f97316;
    --accent-orange-hover: #ea580c;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Nunito', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(76, 29, 149, 0.3), transparent 35%),
        radial-gradient(circle at 85% 30%, rgba(37, 99, 235, 0.3), transparent 35%);
    color: var(--text-light);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Latar Belakang Bintang */
.stars-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 160px 120px, #ddd, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: starsAnimation 100s linear infinite;
    z-index: 1;
    opacity: 0.6;
}

@keyframes starsAnimation {
    from { background-position: 0 0; }
    to { background-position: -10000px 5000px; }
}

/* Container Utama */
.app-container {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    width: 90%;
    max-width: 480px;
    min-height: 550px;
    padding: 2.5rem;
    position: relative;
    z-index: 10;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 40px rgba(59, 130, 246, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Typography Khusus Game */
h1, h2, .question-text, .huge-score {
    font-family: 'Fredoka One', cursive;
    letter-spacing: 1px;
}

/* Manajemen Halaman */
.screen {
    display: none;
    flex-direction: column;
    height: 100%;
    animation: fadeIn 0.4s ease-out;
    flex-grow: 1;
}

.screen.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header & Logo */
.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.astronaut-icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

h1 {
    font-size: 2.5rem;
    background: linear-gradient(to right, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 10px rgba(0, 242, 254, 0.3);
}

.logo-container p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Tombol dan Interaksi */
.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn:active {
    transform: translateY(1px);
}

.level-selection {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.level-selection h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    text-align: center;
    color: #cbd5e1;
}

.btn-level {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
    border: 2px solid rgba(255,255,255,0.1);
    justify-content: flex-start;
    padding-left: 1.5rem;
}

.btn-level:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--primary);
}

.btn-level .icon {
    font-size: 1.5rem;
}

/* Layar Bermain */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 2px dashed rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 800;
}

#score {
    color: var(--accent-green);
    font-size: 1.4rem;
}

.game-area {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
}

.question-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.05);
}

.question-text {
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-option {
    font-size: 1.8rem;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.btn-option:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-option.correct {
    background: var(--accent-green);
    border-color: var(--accent-green);
    animation: pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-option.wrong {
    background: var(--accent-red);
    border-color: var(--accent-red);
    animation: shake 0.4s;
}

.feedback {
    text-align: center;
    height: 30px;
    margin-top: 1.5rem;
    font-size: 1.2rem;
    font-weight: 800;
    opacity: 0;
    transition: opacity 0.3s;
}

.feedback.show {
    opacity: 1;
}

.feedback.success { color: var(--accent-green); }
.feedback.error { color: var(--accent-red); }

/* Layar Game Over */
#game-over-screen {
    justify-content: center;
    align-items: center;
    text-align: center;
}

#game-over-screen h2 {
    font-size: 2.5rem;
    color: var(--accent-red);
    margin-bottom: 2rem;
}

.final-score-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 2rem;
    border-radius: 24px;
    margin-bottom: 1.5rem;
    width: 100%;
    border: 2px solid rgba(255, 255, 255, 0.05);
}

.final-score-box p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.huge-score {
    font-size: 5rem;
    color: var(--accent-green);
    background: linear-gradient(to right, #10b981, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.evaluation {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    font-weight: 800;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(to right, #f97316, #f59e0b);
}

.btn-primary:hover {
    background: linear-gradient(to right, #ea580c, #d97706);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Animasi Bantuan */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

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

.shake-screen {
    animation: shake 0.4s;
}
