/* Reset & Base */
body {
    margin: 0;
    background-color: #050011;
    color: white;
    font-family: 'Orbitron', sans-serif;
    overflow: hidden;
    touch-action: none;
}

.main-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* === HUD GAMEPLAY (DIPERBAIKI) === */
#game-screen {
    position: relative;
    width: 100%;
    height: 100%;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#hud-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between; /* Kiri - Tengah - Kanan */
    align-items: flex-start;
    z-index: 50; /* Di atas canvas */
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    pointer-events: none;
}

.hud-box {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 5px #00d2ff;
    flex: 1; /* Membagi ruang sama rata */
}

#score { text-align: center; font-size: 1.5rem; color: #ffff00; }

/* === PERINGATAN / WARNING OVERLAY (BARU) === */
#warning-overlay {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    color: #ff0055;
    text-shadow: 4px 4px 0px #000;
    z-index: 100; /* SUPER PENTING: Agar di depan pipa */
    display: none; /* Default sembunyi */
    pointer-events: none;
}

.glitch-warning {
    animation: flashWarn 0.2s infinite;
}

@keyframes flashWarn {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-52%, -48%) scale(1.05); color: #fff; }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* === MODIFIKASI SCREEN === */
#start-screen, #end-screen {
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00d2ff;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
    z-index: 20;
}

.cyber-nav {
    position: absolute; /* Mengambang di atas */
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent); /* Gradasi gelap ke transparan */
    z-index: 1000; /* Pastikan paling atas (di atas canvas) */
    display: flex;
    justify-content: center;
}

.cyber-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.cyber-nav a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Orbitron', sans-serif; /* Font Cyber */
    font-size: 0.9rem;
    font-weight: bold;
    letter-spacing: 1px;
    transition: 0.3s;
    border-bottom: 2px solid transparent;
    padding-bottom: 5px;
}

.cyber-nav a:hover {
    color: #00d2ff; /* Warna Neon Biru saat disentuh */
    text-shadow: 0 0 10px #00d2ff;
    border-bottom: 2px solid #00d2ff;
}

/* Penyesuaian Main Container agar tidak tertutup Nav */
.main-container {
    /* ... style lama ... */
    margin-top: 0; /* Pastikan tidak ada margin aneh */
    padding-top: 50px; /* Beri sedikit ruang di atas jika perlu */
}

.title { font-size: 2.5rem; margin-bottom: 10px; color: #fff; }
.mission-briefing { display: flex; flex-wrap: wrap; gap: 10px; margin: 15px 0; }
.briefing-column { flex: 1; min-width: 250px; background: #111; padding: 10px; border: 1px solid #333; }
.info-item { display: flex; align-items: center; font-size: 0.9rem; margin-bottom: 5px; text-align: left; }
.icon { width: 25px; margin-right: 5px; text-align: center; }
h3 { margin-top: 0; color: #ff0055; font-size: 1rem; border-bottom: 1px solid #555; padding-bottom: 5px; }

#name-input { padding: 10px; width: 70%; background: #000; border: 1px solid #00d2ff; color: #fff; text-align: center; font-family: inherit; }
button { padding: 10px 20px; background: #ff0055; color: white; border: none; font-family: inherit; cursor: pointer; clip-path: polygon(10% 0, 100% 0, 100% 80%, 90% 100%, 0 100%, 0 20%); }
button:hover { background: #ff3377; }
button:disabled { background: #555; cursor: not-allowed; }

.mobile-hint { position: absolute; bottom: 20px; width: 100%; text-align: center; color: rgba(255,255,255,0.5); font-size: 0.9rem; z-index: 10; pointer-events: none;}

