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

:root {
  --primary: #1668f5;
  --primary-dark: #0f4fc2;
  --primary-light: #e8f0fe;
  --accent: #ff6b35;
  --success: #10b981;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #f8faff;
  --white: #ffffff;
  --shadow: 0 4px 24px rgba(22, 104, 245, 0.12);
  --shadow-card: 0 2px 16px rgba(0, 0, 0, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== AD PLACEHOLDER ===== */
.ad-placeholder {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
  border: 2px dashed #c7d8fc;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ab0f5;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 14px;
  min-height: 90px;
  margin: 20px auto;
  width: 100%;
  max-width: 728px;
}
.ad-placeholder.ad-rectangle { min-height: 250px; max-width: 336px; }
.ad-placeholder.ad-leaderboard { min-height: 90px; }
.ad-placeholder.ad-sticky {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  border-radius: 0;
  border: none;
  border-top: 2px dashed #c7d8fc;
  z-index: 999;
  max-width: 100%;
  margin: 0;
}
.ad-label {
  background: #e0e9ff;
  color: #5080d0;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 8px;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== NAV ===== */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.nav-logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 201;
}
.nav-logo .logo-icon { font-size: 22px; }
.nav-link {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--primary); }

/* Hamburger button */
.ham-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  z-index: 201;
  transition: background 0.2s;
}
.ham-btn:hover { background: var(--primary-light); }
.ham-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}
.ham-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.ham-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.ham-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Drawer overlay */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.38);
  z-index: 198;
  backdrop-filter: blur(2px);
  animation: overlayIn 0.25s ease;
}
.drawer-overlay.open { display: block; }
@keyframes overlayIn { from { opacity:0; } to { opacity:1; } }

/* Drawer panel */
.drawer {
  display: none;
  position: fixed;
  top: 0; right: 0;
  width: min(300px, 82vw);
  height: 100%;
  background: var(--white);
  z-index: 199;
  box-shadow: -8px 0 40px rgba(0,0,0,0.16);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  flex-direction: column;
  overflow-y: auto;
}
.drawer.open {
  display: flex;
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}
.drawer-logo {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.drawer-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #f3f4f6;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.drawer-close:hover { background: #e5e7eb; }

.drawer-nav {
  padding: 12px 0;
  flex: 1;
}
.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.18s;
}
.drawer-nav a:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
}
.drawer-nav a.active {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
}
.drawer-nav .nav-icon { font-size: 20px; width: 26px; text-align: center; }
.drawer-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 22px;
}
.drawer-cta {
  padding: 16px 20px 24px;
  border-top: 1px solid var(--border);
}
.drawer-cta a {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), #2979ff);
  color: white;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 20px;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(22,104,245,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.drawer-cta a:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(22,104,245,0.4); }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #2979ff);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(22, 104, 245, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(22, 104, 245, 0.45); }
.btn-primary:active { transform: translateY(0); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }
.btn-lg { padding: 18px 48px; font-size: 18px; }
.btn-block { width: 100%; }

/* ===== PROGRESS BAR ===== */
.progress-wrap {
  padding: 20px 0 10px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}
.progress-bar-track {
  background: #e5e7eb;
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  transition: width 0.5s ease;
}
.step-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}
.step-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #d1d5db;
  transition: all 0.3s;
}
.step-dot.active { background: var(--primary); transform: scale(1.2); }
.step-dot.done { background: var(--success); }

/* ===== CARD ===== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 28px;
  border: 1px solid rgba(255,255,255,0.8);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 28px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 48px;
}
.footer-links { display: flex; gap: 20px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 12px; }
.footer-links a:hover { color: var(--primary); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}
.fade-in { animation: fadeIn 0.5s ease forwards; }
.fade-up { animation: fadeInUp 0.5s ease forwards; }
.fade-up-2 { animation: fadeInUp 0.5s 0.1s ease both; }
.fade-up-3 { animation: fadeInUp 0.5s 0.2s ease both; }
.fade-up-4 { animation: fadeInUp 0.5s 0.3s ease both; }

/* ===== PAGE TRANSITION ===== */
body.page-exit {
  animation: fadeOut 0.3s ease forwards;
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateY(-10px); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  .btn-lg { padding: 16px 32px; font-size: 16px; }
  .card { padding: 20px; }
  .ad-placeholder { min-height: 70px; font-size: 11px; }
}
