/* RESET & FULLSCREEN LAYOUT */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    background-color: #000000;
}

.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

/* WEBCAM FULLSCREEN BACKGROUND */
#webcam {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    z-index: 1;
}

#motion-canvas {
    display: none;
}

/* STATUS KAMERA BAR (ATAS PERMUKAAN) */
.camera-status-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.85);
    color: #38bdf8;
    text-align: center;
    font-size: 0.85rem;
    padding: 4px 0;
    z-index: 15;
    font-weight: 600;
}

/* HEADER HUD (SKOR & TIMER) */
.game-header {
    position: absolute;
    top: 28px;
    left: 0;
    width: 100%;
    z-index: 12;
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    pointer-events: none;
}

.hud-item {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 8px 18px;
    border-radius: 12px;
    color: #fff;
    text-align: center;
    backdrop-filter: blur(8px);
}

.hud-label {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 700;
}

.hud-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #38bdf8;
}

.timer-active {
    color: #f59e0b;
}

/* CONTAINER PERTANYAAN (MELAYANG DI ATAS TENGAH) */
.question-container {
    position: absolute;
    top: 85px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12;
    background: rgba(15, 23, 42, 0.88);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 14px 28px;
    border-radius: 18px;
    text-align: center;
    width: 75%;
    max-width: 900px;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    pointer-events: none;
}

.case-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #ffffff;
}

#question-text {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
}

/* PEMBAGIAN LAYAR 50% KIRI & 50% KANAN */
.options-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 5;
    display: flex;
    flex-direction: row;
}

.option-card {
    flex: 1; /* 50% Kiri dan 50% Kanan */
    height: 100%;
    padding: 210px 35px 50px 35px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background 0.3s ease, border-color 0.3s ease;
}

/* Opsi Kiri (Zone A) */
.option-card.zone-a {
    background: rgba(16, 185, 129, 0.22); /* Lapisan Hijau Transparan */
    border-right: 2px dashed rgba(255, 255, 255, 0.4);
}

/* Opsi Kanan (Zone B) */
.option-card.zone-b {
    background: rgba(244, 63, 94, 0.22); /* Lapisan Merah Transparan */
}

/* Efek saat pemain berdiri/terdeteksi di zona */
.option-card.active-zone {
    background: rgba(56, 189, 248, 0.45) !important;
}

.option-card.correct-choice {
    background: rgba(16, 185, 129, 0.65) !important;
}

.option-card.wrong-choice {
    background: rgba(244, 63, 94, 0.3) !important;
}

.option-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.option-letter {
    font-size: 2rem;
    font-weight: 900;
    background: #0284c7;
    color: #ffffff;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.zone-tag {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 10px;
    border-radius: 8px;
}

.option-text {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
    margin: 15px 0;
    line-height: 1.4;
}

/* BAR PROGRESS DETEKSI */
.progress-bar-container {
    height: 12px;
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: #38bdf8;
    transition: width 0.1s linear;
}

/* BANNER HASIL / FEEDBACK TENGAH (Sesuai Foto) */
.answer-banner {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    padding: 22px 45px;
    border-radius: 20px;
    font-size: 2.5rem;
    font-weight: 900;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(12px);
    line-height: 1.2;
}

.answer-banner.correct {
    background: rgba(16, 185, 129, 0.92);
    border: 4px solid #a7f3d0;
}

.answer-banner.wrong {
    background: rgba(244, 63, 94, 0.92);
    border: 4px solid #fecdd3;
}

/* TOMBOL KONTROL MANUAL (NAVIGASI CADANGAN) */
.manual-controls {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    gap: 15px;
}

.btn-manual {
    padding: 8px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* MODAL INPUT AWAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-card {
    background: #1e293b;
    padding: 35px;
    border-radius: 20px;
    width: 90%;
    max-width: 480px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #334155;
    background: #0f172a;
    color: #fff;
}

.btn-start {
    width: 100%;
    padding: 14px;
    background: #0284c7;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
}