/* ===== RESET & BASE ===== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;-webkit-text-size-adjust:100%}
body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,sans-serif;line-height:1.6;min-height:100vh}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}

/* ===== QUIZ THEME (dark) ===== */
.quiz-page{background:#0f172a;color:#fff;min-height:100vh;display:flex;flex-direction:column;align-items:center}
.quiz-header{width:100%;padding:16px 20px 0;text-align:center}
.quiz-logo{font-size:24px;font-weight:800;letter-spacing:-0.5px;color:#fff}
.quiz-logo span{color:#3b82f6}

/* Progress bar */
.progress-wrap{width:100%;max-width:480px;margin:20px auto 0;padding:0 20px}
.progress-bar{height:8px;background:#1e293b;border-radius:99px;overflow:hidden}
.progress-fill{height:100%;border-radius:99px;background:linear-gradient(90deg,#3b82f6,#6366f1);transition:width .4s ease}

/* Question card */
.quiz-body{width:100%;max-width:480px;padding:24px 20px 40px;flex:1;display:flex;flex-direction:column}
.quiz-step-label{font-size:13px;color:#94a3b8;margin-bottom:6px;text-transform:uppercase;letter-spacing:1px}
.quiz-question{font-size:22px;font-weight:700;margin-bottom:24px;line-height:1.3}

/* Ad slot on quiz */
.quiz-ad-slot{display:flex;justify-content:center;margin-bottom:24px;min-height:250px}

/* Answer buttons */
.answers{display:flex;flex-direction:column;gap:12px}
.answer-btn{background:#fff;color:#0f172a;border:2px solid transparent;border-radius:16px;padding:16px 20px;font-size:16px;font-weight:600;cursor:pointer;transition:all .2s ease;text-align:left;box-shadow:0 2px 8px rgba(0,0,0,.15)}
.answer-btn:hover{border-color:#3b82f6;transform:translateY(-1px);box-shadow:0 4px 16px rgba(59,130,246,.25)}
.answer-btn.selected{border-color:#3b82f6;background:#eff6ff;color:#1d4ed8}

/* Loader */
.loader-overlay{position:fixed;inset:0;background:#0f172a;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:9999}
.spinner{width:56px;height:56px;border:5px solid #1e293b;border-top-color:#3b82f6;border-radius:50%;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.loader-text{margin-top:24px;font-size:18px;font-weight:600;color:#e2e8f0;animation:pulse 1.5s ease-in-out infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.4}}
.loader-sub{margin-top:8px;font-size:14px;color:#64748b}

/* ===== ARTICLE THEME (light) ===== */
.article-page{background:#f8fafc;color:#1e293b;min-height:100vh}
.article-header{background:#0f172a;padding:16px 20px;text-align:center}
.article-header .quiz-logo{font-size:20px}
.article-wrap{max-width:768px;margin:0 auto;padding:24px 20px 60px}
.article-wrap h1{font-size:28px;font-weight:800;line-height:1.25;margin-bottom:16px;color:#0f172a}
.article-wrap h2{font-size:22px;font-weight:700;margin:32px 0 12px;color:#0f172a}
.article-wrap h3{font-size:18px;font-weight:700;margin:24px 0 8px;color:#0f172a}
.article-wrap p{margin-bottom:16px;color:#334155;font-size:16.5px;line-height:1.75}
.article-wrap ul,.article-wrap ol{margin:0 0 16px 24px;color:#334155}
.article-wrap li{margin-bottom:6px;line-height:1.65}
.article-ad-slot{display:flex;justify-content:center;margin:28px 0;min-height:250px}

/* Card links */
.card-links{display:grid;gap:16px;margin-top:36px}
.card-link{display:block;padding:24px 20px;border-radius:16px;color:#fff;font-weight:700;font-size:17px;transition:transform .15s ease,box-shadow .15s ease}
.card-link:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(0,0,0,.18)}
.card-link.blue{background:linear-gradient(135deg,#2563eb,#3b82f6)}
.card-link.green{background:linear-gradient(135deg,#059669,#10b981)}
.card-link.purple{background:linear-gradient(135deg,#7c3aed,#8b5cf6)}
.card-link span{display:block;font-weight:400;font-size:14px;opacity:.85;margin-top:4px}

/* Footer */
.site-footer{text-align:center;padding:32px 20px;font-size:13px;color:#94a3b8;border-top:1px solid #e2e8f0}
.site-footer a{color:#3b82f6;text-decoration:underline}

/* ===== HOMEPAGE ===== */
.home-page{background:#0f172a;color:#fff;min-height:100vh;display:flex;flex-direction:column}
.home-hero{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;text-align:center}
.home-hero h1{font-size:36px;font-weight:800;margin-bottom:12px;line-height:1.2}
.home-hero h1 span{color:#3b82f6}
.home-hero p{font-size:18px;color:#94a3b8;margin-bottom:32px;max-width:480px}
.cta-btn{display:inline-block;background:linear-gradient(135deg,#2563eb,#6366f1);color:#fff;font-size:18px;font-weight:700;padding:16px 48px;border-radius:99px;transition:transform .15s ease,box-shadow .15s ease}
.cta-btn:hover{transform:translateY(-2px);box-shadow:0 8px 32px rgba(59,130,246,.4)}
.home-features{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;max-width:640px;width:100%;margin-top:48px}
.feature{background:#1e293b;padding:20px;border-radius:12px;text-align:center}
.feature h3{font-size:15px;font-weight:700;margin-top:8px}
.feature p{font-size:13px;color:#94a3b8;margin-top:4px}

/* ===== PRIVACY ===== */
.privacy-page .article-wrap h1{font-size:24px}
.privacy-page .article-wrap h2{font-size:19px}

/* ===== RESPONSIVE ===== */
@media(min-width:640px){
  .quiz-question{font-size:26px}
  .answers{flex-direction:row;flex-wrap:wrap}
  .answer-btn{flex:1 1 45%}
  .home-hero h1{font-size:48px}
  .card-links{grid-template-columns:1fr 1fr}
}
