:root {
    --ia-cyan: #00f2fe;
    --ia-magenta: #7d2ae8;
    --ia-bg: #060714;
    --ia-card: rgba(16, 18, 45, 0.95);
    --ia-neon-green: #39ff14;
    --ia-neon-red: #ff3131;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--ia-bg);
    color: #e0e0e0;
    min-height: 100vh;
    background-image: radial-gradient(circle at 50% 50%, #1a1b3a 0%, #060714 100%);
}

h1, h2, h3, h4 { font-family: 'Orbitron', sans-serif; color: var(--ia-cyan); text-shadow: 0 0 10px rgba(0, 242, 254, 0.3); }

.container { max-width: 900px; padding: 20px; }

.section {
    background: var(--ia-card);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 15px;
    padding: 35px;
    box-shadow: 0 0 40px rgba(0,0,0,0.8);
    display: none;
    margin-bottom: 30px;
}
.section.active-section { display: block; animation: fadeIn 0.6s ease-out; }

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

.progress-container { background: rgba(255,255,255,0.05); border-radius: 10px; height: 8px; margin: 20px 0; border: 1px solid rgba(0,242,254,0.1); overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--ia-magenta), var(--ia-cyan)); width: 0%; transition: width 0.5s ease; box-shadow: 0 0 10px var(--ia-cyan); }

.question-container { display: none; }
.question-container.active-q { display: block; }

.form-check {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 12px;
    padding: 15px 15px 15px 45px;
    border-radius: 8px;
    transition: all 0.3s;
    cursor: pointer;
}
.form-check:hover { background: rgba(0, 242, 254, 0.05); border-color: var(--ia-cyan); }
.form-check.is-correct { border-color: var(--ia-neon-green) !important; background: rgba(57, 255, 20, 0.1) !important; }
.form-check.is-incorrect { border-color: var(--ia-neon-red) !important; background: rgba(255, 49, 49, 0.1) !important; }

.btn-custom {
    font-family: 'Orbitron', sans-serif;
    padding: 12px 25px;
    border-radius: 5px;
    text-transform: uppercase;
    transition: 0.4s;
    border: 1px solid var(--ia-cyan);
    background: transparent;
    color: var(--ia-cyan);
    font-size: 0.8rem;
}
.btn-custom:hover:not(:disabled) { background: var(--ia-cyan); color: #000; box-shadow: 0 0 20px var(--ia-cyan); }

.feedback { margin-top: 15px; font-family: 'Fira Code', monospace; font-size: 0.9rem; }

.results-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 4, 15, 0.95); z-index: 1000; justify-content: center; align-items: center; backdrop-filter: blur(5px);
}
.results-overlay.active { display: flex; }
.results-modal { background: #0f1126; border: 1px solid var(--ia-cyan); padding: 40px; border-radius: 20px; text-align: center; max-width: 500px; width: 90%; }
.score-circle { width: 100px; height: 100px; border: 2px solid var(--ia-cyan); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 20px auto; font-family: 'Orbitron'; font-size: 1.5rem; color: var(--ia-cyan); box-shadow: 0 0 15px var(--ia-cyan); }

iframe, video { border-radius: 10px; border: 1px solid var(--ia-magenta); width: 100%; margin-bottom: 20px; }

.conclusion-box { background: rgba(0, 242, 254, 0.05); border: 1px solid var(--ia-cyan); padding: 25px; border-radius: 10px; line-height: 1.7; text-align: left; }
.rank-tag { color: gold; font-family: 'Orbitron'; text-shadow: 0 0 10px gold; font-size: 1.2rem; }

/* ── GLOBAL HUD ── */
.global-hud {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 999;
    background: rgba(6, 7, 20, 0.92);
    border-bottom: 1px solid rgba(0, 242, 254, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.6);
    padding: 0 20px;
    height: 64px;
    display: flex;
    align-items: center;
}

.hud-inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.hud-title {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: rgba(0, 242, 254, 0.5);
    letter-spacing: 0.08em;
    white-space: nowrap;
    flex-shrink: 0;
}

.hud-steps {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    justify-content: center;
}

.hud-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: default;
    transition: transform 0.2s;
}

.hud-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(0, 242, 254, 0.25);
    background: transparent;
    transition: all 0.4s ease;
    position: relative;
}

.hud-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.45rem;
    color: rgba(0, 242, 254, 0.3);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: color 0.4s;
    white-space: nowrap;
}

.hud-connector {
    height: 2px;
    width: 28px;
    background: rgba(0, 242, 254, 0.12);
    margin-bottom: 16px;
    flex-shrink: 0;
    transition: background 0.4s;
}

/* DONE state (≥ 50% = pass → green) */
.hud-step.done .hud-dot {
    border-color: var(--ia-neon-green);
    background: var(--ia-neon-green);
    box-shadow: 0 0 8px var(--ia-neon-green);
}
.hud-step.done .hud-label { color: var(--ia-neon-green); }
.hud-step.done + .hud-connector { background: var(--ia-neon-green); box-shadow: 0 0 6px var(--ia-neon-green); }

/* FAIL state (< 50% = fail → red) */
.hud-step.fail .hud-dot {
    border-color: var(--ia-neon-red);
    background: var(--ia-neon-red);
    box-shadow: 0 0 8px var(--ia-neon-red);
}
.hud-step.fail .hud-label { color: var(--ia-neon-red); }
.hud-step.fail + .hud-connector { background: var(--ia-neon-red); box-shadow: 0 0 6px var(--ia-neon-red); }

/* ACTIVE state */
.hud-step.active .hud-dot {
    border-color: var(--ia-cyan);
    background: var(--ia-cyan);
    box-shadow: 0 0 14px var(--ia-cyan), 0 0 4px #fff;
    animation: hud-pulse 1.5s ease-in-out infinite;
}
.hud-step.active .hud-label { color: var(--ia-cyan); font-weight: 700; }

@keyframes hud-pulse {
    0%, 100% { box-shadow: 0 0 8px var(--ia-cyan); }
    50%       { box-shadow: 0 0 20px var(--ia-cyan), 0 0 6px #fff; }
}

/* STATUS badge */
.hud-status {
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    color: var(--ia-cyan);
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 4px;
    padding: 3px 8px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.06em;
    transition: all 0.3s;
}
.hud-status.done { color: var(--ia-neon-green); border-color: var(--ia-neon-green); }

/* Responsive : hide labels on small screens */
@media (max-width: 600px) {
    .hud-title, .hud-status { display: none; }
    .hud-label { display: none; }
    .hud-connector { width: 16px; }
    .hud-dot { width: 10px; height: 10px; }
}
