@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --color-primary: #0066CC;
    --color-primary-dark: #004D99;
    --color-primary-light: #3388DD;
    --color-accent: #00B894;
    --color-accent-dark: #009975;
    --color-bg: #F4F6F9;
    --color-card: #FFFFFF;
    --color-text: #1A2332;
    --color-text-secondary: #5A6B7F;
    --color-border: #E2E8F0;
    --color-footer-bg: #1A2332;
    --color-footer-text: #CBD5E1;
    --color-progress: #0066CC;
    --color-hover: #E8F0FE;
    --radius: 12px;
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 32px rgba(0, 102, 204, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ===== LAYOUT ===== */
.page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

/* ===== HEADER ===== */
.site-header {
    text-align: center;
    padding: 40px 0 16px;
}

.site-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.site-header .subtitle {
    font-size: 14px;
    color: var(--color-text-secondary);
    margin-top: 6px;
    font-weight: 400;
}

/* ===== AD SLOTS ===== */
.ad-slot {
    text-align: center;
    margin: 16px 0;
    min-height: 50px;
    max-width: 100%;
    overflow-x: hidden;
}

.ad-label {
    font-size: 11px;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

/* ===== QUIZ CARD ===== */
.quiz-card {
    background: var(--color-card);
    border-radius: var(--radius);
    padding: 32px 28px 40px;
    box-shadow: var(--shadow-card);
    margin-top: 20px;
    margin-bottom: 40px;
}

/* Progress bar */
.progress-wrapper {
    margin-bottom: 24px;
}

.progress-track {
    height: 8px;
    background: var(--color-border);
    border-radius: 100px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
    border-radius: 100px;
    width: 0%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-counter {
    text-align: right;
    font-size: 13px;
    color: var(--color-text-secondary);
    font-weight: 500;
    margin-top: 8px;
}

/* Question */
.question-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 20px;
    padding-left: 16px;
    border-left: 4px solid var(--color-primary);
    line-height: 1.5;
}

/* Answer buttons */
.answers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 14px 16px;
    background: #F8FAFC;
    border: 2px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    text-align: left;
    line-height: 1.4;
}

.answer-btn:hover {
    border-color: var(--color-primary);
    background: var(--color-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

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

/* ===== FINISH STATE ===== */
.finish-state {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.finish-state .finish-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
}

.finish-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 8px;
}

.btn-primary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.btn-secondary {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background: #F8FAFC;
    color: var(--color-text-secondary);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* ===== ARTICLE PAGE ===== */
.article-header {
    padding: 40px 0 20px;
}

.article-header h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.article-content {
    background: var(--color-card);
    border-radius: var(--radius);
    padding: 32px 28px;
    box-shadow: var(--shadow-card);
    margin-bottom: 40px;
    max-width: 100%;
    overflow-x: hidden;
}

.article-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin: 28px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-border);
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.article-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 16px;
}

.article-content ul li {
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text-secondary);
    padding: 8px 0 8px 28px;
    position: relative;
    border-bottom: 1px solid #F1F5F9;
}

.article-content ul li:last-child {
    border-bottom: none;
}

.article-content ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: 700;
    font-size: 16px;
}

.article-content strong {
    color: var(--color-text);
    font-weight: 600;
}

.article-content .cta-center {
    text-align: center;
    margin: 24px 0;
}

.article-content .btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3);
    margin: 6px;
}

.article-content .btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 184, 148, 0.4);
}

.article-content .logo-center {
    text-align: center;
    margin: 24px 0;
}

.article-content .logo-center img {
    max-width: 280px;
    height: auto;
    border-radius: 8px;
}

.article-content .note {
    font-size: 13px;
    color: #94A3B8;
    font-style: italic;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--color-footer-bg);
    padding: 20px 16px;
    text-align: center;
    margin-top: auto;
}

.site-footer .copyright {
    font-size: 13px;
    color: var(--color-footer-text);
}

.site-footer .footer-links {
    margin-top: 8px;
}

.site-footer .footer-links a {
    font-size: 13px;
    color: #64748B;
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer .footer-links a:hover {
    color: #CBD5E1;
    text-decoration: underline;
}

.site-footer .footer-links .sep {
    color: #475569;
    margin: 0 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .page-wrapper {
        padding: 0;
    }

    .site-header {
        padding: 28px 12px 12px;
    }

    .site-header h1 {
        font-size: 22px;
    }

    .quiz-card {
        padding: 24px 16px 32px;
        border-radius: 8px;
    }

    .question-text {
        font-size: 16px;
    }

    .answer-btn {
        font-size: 14px;
        padding: 12px 14px;
    }

    .step-counter {
        display: none;
    }

    .finish-actions {
        flex-direction: column;
    }

    .article-header {
        padding: 28px 12px 12px;
    }

    .article-header h1 {
        font-size: 22px;
    }

    .article-content {
        padding: 24px 12px;
        border-radius: 0;
        width: 100%;
        max-width: 100%;
    }

    .article-content h2 {
        font-size: 18px;
    }

    /* Prevent ads from overflowing on mobile */
    .article-content [id^="b"],
    .ad-slot [id^="b"] {
        max-width: 100%;
        overflow-x: hidden;
    }

    .exit-option {
        padding: 14px 12px;
    }

    .exit-option-icon {
        font-size: 20px;
    }

    .exit-option-info strong {
        font-size: 14px;
    }

    .exit-option-info small {
        font-size: 11px;
    }
}

/* ===== EXIT LINK SELECTOR ===== */
.exit-selector {
    margin: 28px 0;
    padding: 24px;
    background: linear-gradient(135deg, #F0F7FF 0%, #E8F4FD 100%);
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.exit-selector-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 16px;
    text-align: center;
}

.exit-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.exit-option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px;
    background: var(--color-card);
    border: 2px solid var(--color-border);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-family: inherit;
}

.exit-option:hover {
    border-color: var(--color-primary);
    background: var(--color-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 102, 204, 0.12);
}

.exit-option:active {
    transform: translateY(0);
}

.exit-option-icon {
    font-size: 24px;
    flex-shrink: 0;
}

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

.exit-option-info strong {
    font-size: 15px;
    color: var(--color-text);
}

.exit-option-info small {
    font-size: 12px;
    color: var(--color-text-secondary);
}
