
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg: #08111f;
    --panel: #111d2e;
    --panel-light: #17263a;
    --teal: #35e0c1;
    --teal-dark: #17bfa3;
    --orange: #ffad5a;
    --white: #f5f8fc;
    --muted: #93a4b8;
    --green: #35e0c1;
    --red: #ff647c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: 'Outfit', sans-serif;
    background: var(--bg);
    color: var(--white);
    overflow-x: hidden;
    position: relative;
}

button, input {
    font-family: inherit;
}

.background-glow {
    position: fixed;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.14;
    pointer-events: none;
}

.glow-1 {
    background: var(--teal);
    top: -100px;
    left: -100px;
}

.glow-2 {
    background: var(--orange);
    bottom: -150px;
    right: -100px;
}

.app {
    position: relative;
    z-index: 2;
    max-width: 850px;
    width: 100%;
    min-height: 100vh;
    margin: auto;
    padding: 30px 22px;
}

.screen {
    display: none;
    animation: fadeIn 0.45s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 1px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: var(--panel-light);
    border: 1px solid rgba(53, 224, 193, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 14px;
}

.accent {
    color: var(--teal);
}

.hero {
    text-align: center;
    max-width: 650px;
    margin: 60px auto 0;
}

.pill {
    display: inline-flex;
    padding: 9px 16px;
    background: rgba(53, 224, 193, 0.09);
    border: 1px solid rgba(53, 224, 193, 0.2);
    color: var(--teal);
    border-radius: 30px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.hero h1 {
    margin-top: 24px;
    font-size: clamp(42px, 8vw, 78px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -2px;
}

.hero h1 span {
    color: var(--teal);
}

.hero-description {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
    max-width: 510px;
    margin: 22px auto;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 32px 0;
}

.stat-card {
    background: var(--panel);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-icon {
    font-size: 22px;
}

.stat-card strong {
    font-size: 25px;
    font-weight: 800;
}

.stat-card small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}

.name-box {
    text-align: left;
    margin-top: 25px;
}

.name-box label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.name-box input {
    width: 100%;
    padding: 17px 18px;
    border-radius: 14px;
    background: var(--panel);
    border: 1px solid rgba(255,255,255,0.09);
    outline: none;
    color: white;
    font-size: 16px;
    transition: 0.2s;
}

.name-box input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(53,224,193,0.08);
}

.primary-btn {
    width: 100%;
    margin-top: 18px;
    padding: 17px;
    background: var(--teal);
    color: #07141d;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: 0.2s;
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(53,224,193,0.15);
}

.primary-btn:active {
    transform: scale(0.98);
}

.primary-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.primary-btn span {
    margin-left: 8px;
}

.hint {
    margin-top: 20px;
    color: var(--muted);
    font-size: 13px;
}

/* QUIZ */

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.small-brand {
    font-size: 17px;
}

.small-brand .brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
}

.timer {
    background: var(--panel);
    padding: 12px 16px;
    border-radius: 13px;
    font-weight: 800;
    color: var(--orange);
    border: 1px solid rgba(255,173,90,0.2);
}

.timer.warning {
    color: var(--red);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    50% {
        opacity: 0.5;
    }
}

.quiz-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

#score-display {
    color: var(--teal);
}

.progress-track {
    width: 100%;
    height: 8px;
    background: var(--panel-light);
    border-radius: 20px;
    margin-top: 14px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--teal), var(--orange));
    border-radius: 20px;
    transition: width 0.4s;
}

.question-card {
    margin-top: 28px;
    background: var(--panel);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 24px;
    padding: 28px;
}

.question-category {
    color: var(--teal);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

.question-card h2 {
    margin-top: 15px;
    font-size: clamp(22px, 4vw, 31px);
    line-height: 1.4;
}

.options {
    display: grid;
    gap: 12px;
    margin-top: 28px;
}

.option-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
    background: var(--panel-light);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    color: var(--white);
    text-align: left;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s;
}

.option-btn:hover:not(:disabled) {
    border-color: var(--teal);
    transform: translateX(3px);
}

.option-letter {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,0.06);
    color: var(--muted);
    font-weight: 900;
}

.option-btn.correct {
    border-color: var(--green);
    background: rgba(53,224,193,0.12);
}

.option-btn.correct .option-letter {
    background: var(--green);
    color: #07141d;
}

.option-btn.wrong {
    border-color: var(--red);
    background: rgba(255,100,124,0.12);
}

.option-btn.wrong .option-letter {
    background: var(--red);
    color: #07141d;
}

.option-btn:disabled {
    cursor: default;
}

.feedback {
    min-height: 28px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
}

.feedback.correct-text {
    color: var(--green);
}

.feedback.wrong-text {
    color: var(--red);
}

.next-btn {
    margin-top: 10px;
}

.quiz-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 22px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

/* RESULT */

.result-content {
    text-align: center;
    max-width: 550px;
    margin: 20px auto;
}

.result-content .brand {
    justify-content: center;
}

.result-emoji {
    font-size: 75px;
    margin: 30px 0 20px;
    animation: bounce 1.2s infinite alternate;
}

@keyframes bounce {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-10px);
    }
}

.result-content h1 {
    font-size: 38px;
    margin-top: 20px;
    font-weight: 900;
}

.result-content > p {
    color: var(--muted);
    margin-top: 12px;
    line-height: 1.6;
}

.score-circle {
    width: 180px;
    height: 180px;
    margin: 30px auto;
    border-radius: 50%;
    border: 9px solid var(--teal);
    box-shadow: 0 0 40px rgba(53,224,193,0.12);
    display: grid;
    place-items: center;
    background: var(--panel);
}

.score-circle div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.score-circle span {
    font-size: 56px;
    font-weight: 900;
    color: var(--teal);
}

.score-circle small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.result-stat {
    padding: 18px 8px;
    background: var(--panel);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.result-stat span {
    font-size: 20px;
}

.result-stat strong {
    font-size: 24px;
}

.result-stat small {
    font-size: 10px;
    color: var(--muted);
    font-weight: 800;
}

.result-extra {
    background: var(--panel);
    border-radius: 16px;
    padding: 18px;
    margin-top: 20px;
    text-align: left;
    color: var(--muted);
    line-height: 2;
    font-size: 14px;
}

.result-extra strong {
    color: var(--white);
}

.secondary-btn {
    width: 100%;
    margin-top: 12px;
    padding: 16px;
    background: transparent;
    color: var(--teal);
    border: 1px solid rgba(53,224,193,0.3);
    border-radius: 15px;
    cursor: pointer;
    font-weight: 900;
    letter-spacing: 1px;
    transition: 0.2s;
}

.secondary-btn:hover {
    background: rgba(53,224,193,0.08);
}

/* TOAST */

.toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    opacity: 0;
    pointer-events: none;
    background: var(--teal);
    color: #07141d;
    padding: 13px 20px;
    border-radius: 12px;
    font-weight: 800;
    z-index: 100;
    transition: 0.3s;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* MOBILE */

@media (max-width: 600px) {
    .app {
        padding: 22px 16px;
    }

    .hero {
        margin-top: 45px;
    }

    .hero h1 {
        letter-spacing: -1px;
    }

    .hero-description {
        font-size: 15px;
    }

    .stats {
        gap: 8px;
    }

    .stat-card {
        padding: 16px 5px;
        border-radius: 15px;
    }

    .question-card {
        padding: 20px;
    }

    .question-card h2 {
        font-size: 23px;
    }

    .option-btn {
        padding: 13px;
        font-size: 14px;
    }

    .quiz-meta {
        margin-top: 30px;
        font-size: 11px;
    }

    .quiz-footer {
        font-size: 9px;
    }

    .result-content h1 {
        font-size: 30px;
    }

    .result-stats {
        gap: 7px;
    }

    .result-stat {
        padding: 14px 4px;
    }
}
