/* ============================================================================
   Bacterio Hunter - Laboratory Bio-Scanner Theme (Mobile-First Portrait CSS3)
   ============================================================================ */

:root {
    --bg-deep: #050b14;
    --bg-panel: rgba(9, 20, 36, 0.92);
    --bg-card: rgba(12, 26, 46, 0.95);
    --bg-hud: rgba(6, 15, 28, 0.82);
    --border-neon: rgba(0, 255, 136, 0.35);
    --border-cyan: rgba(0, 212, 255, 0.35);
    --neon-green: #00ff88;
    --neon-green-dim: rgba(0, 255, 136, 0.16);
    --neon-cyan: #00d4ff;
    --neon-cyan-dim: rgba(0, 212, 255, 0.16);
    --warning-amber: #ffb800;
    --danger-red: #ff4757;
    --text-main: #e6f7ff;
    --text-muted: #93b4c8;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-glow: 0 0 24px rgba(0, 255, 136, 0.16);
    --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'Consolas', 'Courier New', monospace;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    min-height: 100%;
    background-color: var(--bg-deep);
    background-image:
        radial-gradient(circle at 50% 0%, rgba(0, 212, 255, 0.12), transparent 60%),
        linear-gradient(180deg, #050b14 0%, #071324 100%);
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

/* ============================================================================
   App Shell & Header
   ============================================================================ */
.app-shell {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    max-width: 540px;
    margin: 0 auto;
    position: relative;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(5, 11, 20, 0.92);
    border-bottom: 1px solid var(--border-cyan);
    backdrop-filter: blur(8px);
    z-index: 30;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.brand-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--neon-green);
}

.brand-subtitle {
    font-size: 0.72rem;
    color: var(--neon-cyan);
    letter-spacing: 0.04em;
}

.header-user-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-pill {
    font-size: 0.8rem;
    font-family: var(--font-mono);
    background: var(--neon-cyan-dim);
    color: var(--neon-cyan);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-cyan);
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================================
   Views & Cards
   ============================================================================ */
.view-panel {
    flex: 1;
    padding: 18px 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* ============================================================================
   App Footer (Halaman Awal & Akhir Permainan)
   ============================================================================ */
.app-footer {
    margin-top: auto;
    padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    background: rgba(5, 11, 20, 0.92);
    border-top: 1px solid var(--border-cyan);
    backdrop-filter: blur(8px);
    text-align: center;
    z-index: 20;
}

.footer-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 6px 16px;
    background: rgba(0, 212, 255, 0.07);
    border: 1px solid rgba(0, 255, 136, 0.25);
    border-radius: 999px;
    box-shadow: 0 0 14px rgba(0, 255, 136, 0.08);
}

.footer-credit {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-main);
}

.footer-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon-green);
    box-shadow: 0 0 8px var(--neon-green);
    flex-shrink: 0;
}

.lab-card {
    background: var(--bg-card);
    border: 1px solid var(--border-neon);
    border-radius: var(--radius-lg);
    padding: 20px 18px;
    box-shadow: var(--shadow-glow);
}

.card-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--neon-cyan);
    background: var(--neon-cyan-dim);
    border: 1px solid var(--border-cyan);
    padding: 3px 9px;
    border-radius: 999px;
    margin-bottom: 8px;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 6px;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.card-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ============================================================================
   Forms & Buttons
   ============================================================================ */
.lab-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-input {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 212, 255, 0.35);
    background: rgba(4, 10, 20, 0.9);
    color: #ffffff;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--neon-green);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.2);
}

.form-hint {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 18px;
    font-size: 0.96rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.12s ease, opacity 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    user-select: none;
}

.btn:active:not(:disabled) {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 0.82rem;
}

.btn-xs {
    min-height: 32px;
    padding: 4px 10px;
    font-size: 0.76rem;
    border-radius: var(--radius-sm);
}

.btn-primary {
    background: linear-gradient(135deg, #00ff88 0%, #00c4ff 100%);
    color: #03131a;
    box-shadow: 0 4px 16px rgba(0, 255, 136, 0.3);
}

.btn-secondary {
    background: rgba(0, 212, 255, 0.16);
    color: var(--neon-cyan);
    border-color: var(--border-cyan);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: rgba(255, 71, 87, 0.22);
    color: #ff8a94;
    border-color: rgba(255, 71, 87, 0.55);
}

.result-actions {
    margin-bottom: 18px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--neon-green);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
}

/* ============================================================================
   Alerts & Toasts
   ============================================================================ */
.alert-box {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    margin-bottom: 14px;
    border: 1px solid transparent;
}

.alert-error {
    background: rgba(255, 71, 87, 0.15);
    border-color: rgba(255, 71, 87, 0.55);
    color: #ffadb5;
}

.alert-warning {
    background: rgba(255, 184, 0, 0.15);
    border-color: rgba(255, 184, 0, 0.55);
    color: #ffe08a;
}

.global-toast {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 120;
    width: calc(100% - 28px);
    max-width: 480px;
    background: rgba(7, 22, 38, 0.96);
    border: 1px solid var(--neon-cyan);
    color: #ffffff;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.55);
    font-size: 0.88rem;
    text-align: center;
}

/* ============================================================================
   Rules View
   ============================================================================ */
.rules-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 12px;
    background: rgba(5, 14, 26, 0.75);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: var(--radius-md);
}

.rule-icon {
    font-size: 1.3rem;
    line-height: 1.2;
    flex-shrink: 0;
}

.rule-item strong {
    display: block;
    font-size: 0.9rem;
    color: var(--neon-green);
    margin-bottom: 2px;
}

.rule-item p {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.safety-banner {
    padding: 12px 14px;
    background: rgba(255, 184, 0, 0.12);
    border: 1px solid rgba(255, 184, 0, 0.45);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.safety-banner strong {
    display: block;
    color: var(--warning-amber);
    font-size: 0.86rem;
    margin-bottom: 4px;
}

.safety-banner p {
    font-size: 0.8rem;
    color: #ffecb3;
}

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 255, 136, 0.08);
    border: 1px solid var(--border-neon);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    cursor: pointer;
    font-size: 0.88rem;
}

.checkbox-row input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--neon-green);
    flex-shrink: 0;
    margin-top: 2px;
}

/* ============================================================================
   Permissions & Calibration View
   ============================================================================ */
.sensor-checklist {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.sensor-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    background: rgba(5, 14, 26, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
}

.sensor-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sensor-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
}

.sensor-detail {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.status-badge {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.badge-pending {
    background: rgba(255, 184, 0, 0.18);
    color: var(--warning-amber);
    border: 1px solid rgba(255, 184, 0, 0.4);
}

.badge-ready {
    background: rgba(0, 255, 136, 0.18);
    color: var(--neon-green);
    border: 1px solid rgba(0, 255, 136, 0.45);
}

.badge-error {
    background: rgba(255, 71, 87, 0.2);
    color: #ff8a94;
    border: 1px solid rgba(255, 71, 87, 0.5);
}

.badge-info {
    background: rgba(0, 212, 255, 0.18);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 212, 255, 0.4);
}

.camera-preview-box {
    position: relative;
    width: 100%;
    height: 170px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #02060c;
    border: 1px solid var(--border-cyan);
    margin-bottom: 14px;
}

.perm-camera-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.perm-preview-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    background: rgba(4, 10, 20, 0.75);
}

.perm-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ============================================================================
   Active Game Viewport (Camera + AR Overlay + HUD)
   ============================================================================ */
.game-viewport {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    background: #02060d;
    overflow: hidden;
    z-index: 40;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.camera-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.scanner-reticle {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reticle-ring {
    width: 210px;
    height: 210px;
    border-radius: 50%;
    border: 1px dashed rgba(0, 255, 136, 0.32);
    box-shadow: inset 0 0 30px rgba(0, 255, 136, 0.06);
}

.reticle-crosshair-h {
    position: absolute;
    width: 250px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.35), transparent);
}

.reticle-crosshair-v {
    position: absolute;
    width: 1px;
    height: 250px;
    background: linear-gradient(180deg, transparent, rgba(0, 212, 255, 0.35), transparent);
}

/* Overlay Bakteri Virtual di Kamera */
.ar-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
}

.bacteria-sprite {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(6, 22, 34, 0.72);
    border: 2px solid var(--neon-green);
    border-radius: 20px;
    padding: 8px 12px;
    cursor: pointer;
    box-shadow: 0 0 22px rgba(0, 255, 136, 0.45);
    backdrop-filter: blur(4px);
    animation: floatPulse 2.8s ease-in-out infinite;
    transition: left 0.18s linear, top 0.18s linear, transform 0.15s ease;
}

.bacteria-sprite.out-of-range {
    border-color: rgba(0, 212, 255, 0.55);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.25);
    opacity: 0.78;
}

.bacteria-sprite.in-quiz-state {
    border-color: var(--warning-amber);
    box-shadow: 0 0 24px rgba(255, 184, 0, 0.65);
}

.bacteria-sprite-img {
    width: 58px;
    height: 58px;
    filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.6));
}

.bacteria-sprite-label {
    margin-top: 4px;
    font-size: 0.74rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 3px #000;
    white-space: nowrap;
}

.bacteria-sprite-dist {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--neon-green);
    font-weight: 700;
}

.bacteria-sprite-cta {
    margin-top: 3px;
    font-size: 0.66rem;
    font-weight: 800;
    background: var(--neon-green);
    color: #031510;
    padding: 2px 7px;
    border-radius: 999px;
    letter-spacing: 0.04em;
}

@keyframes floatPulse {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0px) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-7px) scale(1.04);
    }
}

/* HUD Atas & Bawah */
.hud-top {
    position: relative;
    z-index: 10;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(4, 10, 20, 0.92) 0%, rgba(4, 10, 20, 0.68) 85%, transparent 100%);
    max-width: 540px;
    width: 100%;
    margin: 0 auto;
}

.hud-top-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.hud-timer-box, .hud-score-box, .hud-progress-box {
    background: var(--bg-hud);
    border: 1px solid var(--border-cyan);
    border-radius: var(--radius-md);
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(6px);
}

.hud-timer-box.timer-warning {
    border-color: var(--danger-red);
    background: rgba(60, 10, 18, 0.85);
}

.hud-label {
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.hud-timer-value {
    font-family: var(--font-mono);
    font-size: 1.22rem;
    font-weight: 800;
    color: var(--neon-green);
}

.hud-timer-box.timer-warning .hud-timer-value {
    color: #ff6b78;
}

.hud-score-value, .hud-progress-value {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
}

.hud-score-value small {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.hud-stats-bar {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
}

.stat-chip {
    flex: 1;
    text-align: center;
    font-size: 0.74rem;
    padding: 4px 6px;
    border-radius: 6px;
    background: rgba(8, 20, 36, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chip-captured strong { color: var(--neon-green); }
.chip-escaped strong { color: #ff6b78; }
.chip-available strong { color: var(--neon-cyan); }

.hud-telemetry-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.telemetry-pill {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(8, 20, 36, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.pill-good {
    color: var(--neon-green);
    border-color: rgba(0, 255, 136, 0.4);
}

.pill-warn {
    color: var(--warning-amber);
    border-color: rgba(255, 184, 0, 0.5);
}

.pill-bad {
    color: #ff7a85;
    border-color: rgba(255, 71, 87, 0.55);
}

.pill-mode {
    color: var(--neon-cyan);
    border-color: rgba(0, 212, 255, 0.4);
}

.game-recovery-banner {
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(50, 26, 4, 0.92);
    border: 1px solid var(--warning-amber);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.76rem;
    color: #ffe599;
}

.recovery-btn-group {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.hud-bottom {
    position: relative;
    z-index: 10;
    padding: 10px 12px 14px;
    background: linear-gradient(0deg, rgba(4, 10, 20, 0.95) 0%, rgba(4, 10, 20, 0.78) 85%, transparent 100%);
    max-width: 540px;
    width: 100%;
    margin: 0 auto;
}

.radar-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-hud);
    border: 1px solid var(--border-neon);
    border-radius: var(--radius-lg);
    padding: 10px;
    backdrop-filter: blur(8px);
}

.radar-canvas-wrap {
    position: relative;
    width: 124px;
    height: 124px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#radar-canvas {
    width: 124px;
    height: 124px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 45, 36, 0.9) 0%, rgba(4, 14, 24, 0.95) 100%);
    border: 1.5px solid var(--neon-green);
}

.radar-scale-label {
    position: absolute;
    bottom: 4px;
    right: 6px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--neon-cyan);
    background: rgba(0, 0, 0, 0.65);
    padding: 1px 4px;
    border-radius: 4px;
}

.target-guidance-box {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.guidance-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.nearest-distance {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 800;
    color: var(--neon-cyan);
}

.guidance-text {
    font-size: 0.78rem;
    color: var(--text-main);
    line-height: 1.35;
}

.nearby-capture-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.capture-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background: rgba(0, 255, 136, 0.2);
    border: 1px solid var(--neon-green);
    color: #ffffff;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.3);
}

.hud-action-row {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

/* ============================================================================
   Quiz Modal
   ============================================================================ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(3, 8, 16, 0.86);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}

.quiz-card {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border: 1.5px solid var(--neon-green);
    border-radius: var(--radius-lg);
    padding: 18px 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.75);
}

.quiz-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.quiz-species-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
}

.quiz-category-subtitle {
    font-size: 0.78rem;
    color: var(--neon-cyan);
}

.quiz-timer-pill {
    background: rgba(0, 255, 136, 0.14);
    border: 1px solid var(--neon-green);
    border-radius: var(--radius-md);
    padding: 6px 10px;
    text-align: center;
    min-width: 78px;
}

.quiz-timer-pill.urgent {
    background: rgba(255, 71, 87, 0.22);
    border-color: var(--danger-red);
}

.quiz-timer-pill .timer-label {
    display: block;
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
}

.quiz-timer-pill strong {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    color: var(--neon-green);
}

.quiz-timer-pill.urgent strong {
    color: #ff6b78;
}

.quiz-type-hint {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--neon-cyan);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.28);
    border-radius: var(--radius-sm);
    padding: 7px 10px;
    margin-bottom: 10px;
    line-height: 1.35;
}

.quiz-question-text {
    font-size: 0.96rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 14px;
    line-height: 1.45;
}

.quiz-options-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.option-btn {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 11px 13px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 212, 255, 0.3);
    background: rgba(5, 14, 26, 0.85);
    color: var(--text-main);
    text-align: left;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.option-btn:hover {
    border-color: var(--neon-cyan);
}

.option-btn.selected {
    border-color: var(--neon-green);
    background: rgba(0, 255, 136, 0.16);
    box-shadow: 0 0 0 1px var(--neon-green);
}

.option-key {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.18);
    color: var(--neon-cyan);
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.option-btn.selected .option-key {
    background: var(--neon-green);
    color: #031510;
}

.quiz-short-answer-box {
    margin-bottom: 16px;
}

.quiz-short-input {
    margin-top: 6px;
    font-size: 0.96rem;
    font-weight: 600;
    border-color: var(--border-cyan);
    background: rgba(5, 14, 26, 0.9);
}

.option-key.option-check {
    border-radius: 6px;
}

.feedback-banner {
    padding: 14px;
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.feedback-banner.feedback-correct {
    background: rgba(0, 255, 136, 0.16);
    border: 1px solid var(--neon-green);
    color: var(--neon-green);
}

.feedback-banner.feedback-wrong {
    background: rgba(255, 71, 87, 0.16);
    border: 1px solid var(--danger-red);
    color: #ff8a94;
}

.explanation-box {
    padding: 14px;
    background: rgba(5, 14, 26, 0.85);
    border: 1px solid var(--border-cyan);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.explanation-box h4 {
    font-size: 0.84rem;
    color: var(--neon-cyan);
    margin-bottom: 6px;
}

.explanation-box p {
    font-size: 0.88rem;
    color: var(--text-main);
}

/* ============================================================================
   Result View
   ============================================================================ */
.result-reason-banner {
    padding: 10px 12px;
    background: rgba(0, 212, 255, 0.12);
    border: 1px solid var(--border-cyan);
    border-radius: var(--radius-md);
    color: var(--neon-cyan);
    font-size: 0.86rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.score-hero {
    text-align: center;
    padding: 20px 16px;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.18) 0%, rgba(5, 14, 26, 0.9) 100%);
    border: 1px solid var(--border-neon);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.score-hero-label {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--neon-green);
}

.score-hero-value {
    font-family: var(--font-mono);
    font-size: 3rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.1;
    margin: 6px 0;
}

.score-hero-value small {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.score-hero-user {
    font-size: 0.86rem;
    color: var(--neon-cyan);
}

.result-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.metric-card {
    padding: 12px;
    background: rgba(5, 14, 26, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric-label {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.metric-value {
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 800;
}

.metric-captured .metric-value { color: var(--neon-green); }
.metric-escaped .metric-value { color: #ff6b78; }
.metric-unfound .metric-value { color: var(--warning-amber); }
.metric-duration .metric-value { color: var(--neon-cyan); }

.section-subtitle {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--neon-cyan);
    margin-bottom: 10px;
}

/* Papan Skor / Leaderboard */
.leaderboard-section {
    margin-bottom: 22px;
    padding: 14px;
    background: rgba(4, 12, 24, 0.85);
    border: 1px solid var(--border-cyan);
    border-radius: var(--radius-md);
}

.leaderboard-header {
    margin-bottom: 12px;
}

.leaderboard-header .section-subtitle {
    margin-bottom: 2px;
}

.leaderboard-note {
    font-size: 0.74rem;
    color: var(--text-muted);
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.leaderboard-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 11px 12px;
    background: rgba(8, 22, 40, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s;
}

.leaderboard-row.is-me {
    border-color: var(--neon-green);
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 12px rgba(0, 255, 136, 0.16);
}

.leaderboard-row.rank-1 {
    border-left: 3px solid #ffd700;
}

.leaderboard-row.rank-2 {
    border-left: 3px solid #c0c0c0;
}

.leaderboard-row.rank-3 {
    border-left: 3px solid #cd7f32;
}

.leaderboard-left {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.leaderboard-rank {
    font-family: var(--font-mono);
    font-size: 0.84rem;
    font-weight: 800;
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--neon-cyan);
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 8px;
    border-radius: 6px;
}

.leaderboard-row.rank-1 .leaderboard-rank { color: #ffd700; background: rgba(255, 215, 0, 0.12); }
.leaderboard-row.rank-2 .leaderboard-rank { color: #e2e8f0; background: rgba(226, 232, 240, 0.12); }
.leaderboard-row.rank-3 .leaderboard-rank { color: #f6ad55; background: rgba(246, 173, 85, 0.12); }

.leaderboard-user-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.leaderboard-username {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.leaderboard-me-badge {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 800;
    background: var(--neon-green);
    color: #031510;
    padding: 2px 7px;
    border-radius: 999px;
    flex-shrink: 0;
}

.leaderboard-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.leaderboard-stat-capture {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--neon-green);
    background: rgba(0, 255, 136, 0.14);
    border: 1px solid rgba(0, 255, 136, 0.35);
    padding: 3px 9px;
    border-radius: 6px;
    white-space: nowrap;
}

.leaderboard-stat-time {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--neon-cyan);
    background: rgba(0, 212, 255, 0.14);
    border: 1px solid rgba(0, 212, 255, 0.35);
    padding: 3px 9px;
    border-radius: 6px;
    white-space: nowrap;
}

.leaderboard-empty {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
    padding: 12px;
}

.result-bacteria-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-bacteria-item {
    padding: 12px;
    background: rgba(5, 14, 26, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
}

.result-bacteria-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.result-bacteria-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
}

.result-bacteria-explanation {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

