/* Quiz Gate v3 — Full page quiz */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--qg-bg, #0f172a);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.qg-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.qg-wrapper {
    width: 100%;
    max-width: 560px;
    padding: 40px 0;
}

/* Header */
.qg-header { text-align: center; margin-bottom: 32px; }

.qg-title {
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.qg-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
    line-height: 1.5;
}

/* Progress */
.qg-progress-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.qg-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
}

.qg-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--qg-accent, #3b82f6);
    border-radius: 6px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.qg-progress-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    white-space: nowrap;
    min-width: 170px;
    text-align: right;
}

/* Questions */
.qg-question { display: none; }
.qg-question.qg-active {
    display: block;
    animation: qgSlideIn 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes qgSlideIn {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

.qg-question-text {
    font-size: 19px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 18px;
    line-height: 1.4;
}

/* Answers */
.qg-answers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qg-answer-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: inherit;
    gap: 12px;
}

.qg-answer-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.qg-answer-btn:active { transform: translateY(0); }

.qg-answer-btn.qg-selected {
    background: color-mix(in srgb, var(--qg-accent) 15%, transparent);
    border-color: var(--qg-accent, #3b82f6);
}

.qg-answer-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.qg-answer-text {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
}

.qg-answer-desc {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.38);
    line-height: 1.4;
    font-weight: 400;
}

.qg-answer-btn:hover .qg-answer-desc {
    color: rgba(255, 255, 255, 0.5);
}

.qg-answer-check {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
    color: var(--qg-accent, #3b82f6);
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.qg-answer-btn.qg-selected .qg-answer-check {
    opacity: 1;
    transform: scale(1);
}

/* Loading screen */
.qg-loading {
    text-align: center;
    padding: 60px 0;
    animation: qgFadeUp 0.3s ease;
}

.qg-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--qg-accent, #3b82f6);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: qgSpin 0.8s linear infinite;
}

@keyframes qgSpin {
    to { transform: rotate(360deg); }
}

.qg-loading-text {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.5);
}

/* Complete screen */
.qg-complete {
    text-align: center;
    animation: qgFadeUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.qg-complete-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--qg-accent, #3b82f6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    margin: 0 auto 18px;
}

.qg-complete-title {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 10px;
}

.qg-complete-intro {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0 16px;
}

.qg-complete-list {
    list-style: none;
    text-align: left;
    max-width: 380px;
    margin: 0 auto 28px;
    padding: 0;
}

.qg-complete-list li {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 0;
    line-height: 1.4;
}

.qg-complete-list li::before {
    content: '✓ ';
    color: var(--qg-accent, #3b82f6);
    font-weight: 700;
    margin-right: 6px;
}

.qg-btn-continue {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 15px 34px;
    background: var(--qg-accent, #3b82f6);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.qg-btn-continue:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--qg-accent) 35%, transparent);
}

.qg-btn-continue:active { transform: translateY(0); }

/* Social proof */
.qg-social-proof {
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.22);
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Mobile */
@media (max-width: 640px) {
    .qg-wrapper { padding: 28px 0; }
    .qg-page { padding: 16px; }
    .qg-title { font-size: 22px; }
    .qg-question-text { font-size: 17px; }
    .qg-answer-btn { padding: 13px 14px; }
    .qg-answer-text { font-size: 14px; }
    .qg-answer-desc { font-size: 12px; }
    .qg-progress-label { min-width: auto; font-size: 11px; }
}
