/* ============================================================
   ExamFiles Bot — Design System (Light Mode Only)
   ============================================================ */

/* ── CSS Custom Properties ───────────────────────────────── */
:root {
  /* Brand */
  --brand: #0033a1;
  --brand-light: #2563eb;
  --brand-pale: #dbeafe;
  --brand-glow: rgba(0, 51, 161, 0.08);

  /* Light mode */
  --bg: #eef3ff;
  --bg-card: #ffffff;
  --bg-card-alt: #f4f7ff;
  --bg-hero: linear-gradient(135deg, #0033a1 0%, #1d4ed8 100%);
  --text: #071437;
  --text-secondary: #64748b;
  --text-hero: #ffffff;
  --text-hero-sub: #dbeafe;
  --border: #dbe5ff;
  --shadow: rgba(0, 51, 161, 0.08);
  --tag-bg: #dbeafe;
  --tag-text: #0033a1;
  --badge-bg: rgba(255, 255, 255, 0.094);
  --badge-border: rgba(255, 255, 255, 0.133);
  --topbar-bg: #0033a1;
  --footer-bg: #0033a1;
  --footer-text: #dbeafe;
  --card-stripe: linear-gradient(90deg, #0033a1, #2563eb);
  --success: #16a34a;
  --scroll-fade-start: rgba(238, 243, 255, 1);
  --scroll-fade-end: rgba(238, 243, 255, 0);
}

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

a { text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Container ───────────────────────────────────────────── */
.container {
  width: min(1180px, 92%);
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

/* ── Top Bar ─────────────────────────────────────────────── */
.topbar {
  background: var(--topbar-bg);
  height: 6px;
  width: 100%;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  background: var(--bg-hero);
  color: var(--text-hero);
  padding: 80px 20px 130px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  right: -200px;
  top: -200px;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  left: -150px;
  bottom: -150px;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--badge-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--badge-border);
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 32px;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -2px;
  max-width: 800px;
}

.hero p {
  max-width: 720px;
  line-height: 1.85;
  font-size: 18px;
  color: var(--text-hero-sub);
}

.hero-cta {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 30px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: #ffffff;
  color: var(--brand);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.25);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.btn-blue {
  background: var(--brand);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

/* ── Stats Bar ───────────────────────────────────────────── */
.stats-bar {
  width: min(1180px, 92%);
  margin: -65px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  position: relative;
  z-index: 10;
}

.stat-card {
  background: var(--bg-card);
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 10px 40px var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.4s ease;
}

.stat-card h2 {
  font-size: 32px;
  color: var(--brand-light);
  margin-bottom: 6px;
  font-weight: 800;
}

.stat-card p {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

/* ── Section ─────────────────────────────────────────────── */
.section {
  width: min(1180px, 92%);
  margin: 90px auto;
}

.section-title {
  text-align: center;
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--brand);
  letter-spacing: -1px;
}

.section-sub {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 48px;
  font-size: 16px;
}

/* ── Withdrawal Ticker ───────────────────────────────────── */
.ticker-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 12px 0;
}

/* edge fade */
.ticker-wrapper::before,
.ticker-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 5;
  pointer-events: none;
}

.ticker-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--scroll-fade-start), var(--scroll-fade-end));
}

.ticker-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--scroll-fade-start), var(--scroll-fade-end));
}

.ticker {
  display: flex;
  gap: 22px;
  width: max-content;
  animation: ticker-scroll 60s linear infinite;
}

.ticker.reverse {
  animation-direction: reverse;
  animation-duration: 70s;
}

.ticker:hover { animation-play-state: paused; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Withdrawal Card ─────────────────────────────────────── */
.w-card {
  min-width: 310px;
  max-width: 310px;
  background: var(--bg-card);
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 8px 36px var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  flex-shrink: 0;
}

.w-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--card-stripe);
}

.w-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.w-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.w-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.w-status {
  font-size: 13px;
  color: var(--success);
  margin-top: 3px;
  font-weight: 500;
}

.w-amount {
  font-size: 36px;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 16px;
}

.w-method {
  background: var(--bg-card-alt);
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.w-tag {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* ── Features Grid ───────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 70px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: 22px;
  padding: 32px;
  box-shadow: 0 8px 36px var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 50px var(--shadow);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--tag-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.feature-card h3 {
  color: var(--text);
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 700;
}

.feature-card p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 15px;
}

/* ── Payment Providers ───────────────────────────────────── */
.providers-section {
  margin-top: 90px;
}

.providers-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

.provider-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 22px 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 4px 16px var(--shadow);
  transition: all 0.3s ease;
}

.provider-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow);
}

.provider-chip img {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background: var(--footer-bg);
  color: #fff;
  text-align: center;
  padding: 80px 20px;
  margin-top: 100px;
}

.footer h2 {
  font-size: clamp(32px, 5vw, 44px);
  margin-bottom: 16px;
  font-weight: 800;
  letter-spacing: -1px;
}

.footer p {
  color: var(--footer-text);
  line-height: 1.8;
  font-size: 17px;
  max-width: 560px;
  margin-inline: auto;
}

.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  background: #fff;
  color: var(--brand);
  font-weight: 700;
  padding: 16px 30px;
  border-radius: 14px;
  font-size: 15px;
  transition: all 0.3s ease;
}

.footer-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.footer-note {
  margin-top: 28px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
}

/* ── Counter Animation ───────────────────────────────────── */
.counter { display: inline-block; }

/* ============================================================
   Dashboard Styles (shared with dashboard.html)
   ============================================================ */

/* ── Dashboard Header ────────────────────────────────────── */
.dash-header {
  background: var(--bg-hero);
  padding: 20px;
}

.dash-header-inner {
  width: min(600px, 92%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
}

.dash-header-logo .logo-icon {
  font-size: 24px;
}

.dash-header-nav {
  display: flex;
  gap: 8px;
}

.dash-header-nav a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.dash-header-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.dash-header-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

/* ── Loading & Error ─────────────────────────────────────── */
.dash-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 16px;
  color: var(--text-secondary);
}

.dash-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── Dashboard Grid ──────────────────────────────────────── */
.dash-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: min(600px, 92%);
  margin: 24px auto;
  padding-bottom: 40px;
}

.dash-profile {
  background: var(--bg-card);
  border-radius: 22px;
  padding: 28px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: 0 8px 36px var(--shadow);
}

.dash-profile h2 { font-size: 22px; margin-bottom: 8px; }

.dash-plan {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 13px;
  font-weight: 700;
}

.dash-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.dash-stat-card {
  background: var(--bg-card);
  border-radius: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 24px var(--shadow);
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
}

.stat-value.gold { color: #f59e0b; }
.stat-value.green { color: var(--success); }

.dash-ref-link,
.dash-withdraw {
  background: var(--bg-card);
  border-radius: 22px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 6px 24px var(--shadow);
}

.dash-ref-link h3,
.dash-withdraw h3 {
  font-size: 16px;
  margin-bottom: 14px;
}

.ref-link-box {
  display: flex;
  gap: 8px;
}

.ref-link-box input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card-alt);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
}

.ref-link-box button {
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s ease;
}

.ref-link-box button.copied {
  background: var(--success);
}

.withdraw-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.withdraw-detail:last-child { border-bottom: none; }

.wd-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.wd-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* ── Dashboard Quick Actions ─────────────────────────────── */
.dash-actions {
  display: flex;
  gap: 10px;
}

.dash-actions .btn {
  flex: 1;
  justify-content: center;
  white-space: nowrap;
  min-width: 0;
  padding: 14px 16px;
  font-size: 14px;
}

/* ── Stat label with toggle ──────────────────────────────── */
.stat-label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.usd-toggle {
  background: var(--tag-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  padding: 2px 6px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s ease;
  font-family: inherit;
  color: var(--tag-text);
}

.usd-toggle:hover,
.usd-toggle.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.usd-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 400;
}

/* ── Dash Note ───────────────────────────────────────────── */
.dash-note {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ── Payment Update Form ─────────────────────────────────── */
.payment-form {
  background: var(--bg-card-alt);
  border-radius: 14px;
  padding: 18px;
  margin: 14px 0 0;
  border: 1px solid var(--border);
}

.payment-form h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group select,
.form-group input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.form-group select:focus,
.form-group input[type="text"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(0, 51, 161, 0.08);
}

/* ── Form Messages ───────────────────────────────────────── */
.form-msg {
  font-size: 13px;
  margin-top: 10px;
  min-height: 18px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.form-msg.center { text-align: center; }
.form-msg.msg-success { color: var(--success); }
.form-msg.msg-error   { color: #dc2626; }
.form-msg.msg-info    { color: var(--text-secondary); }

/* ── Small Button ────────────────────────────────────────── */
.btn-sm {
  padding: 10px 18px;
  font-size: 13px;
  border-radius: 10px;
}

/* ── Withdrawal Button ───────────────────────────────────── */
.btn-withdraw {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: 2px dashed var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.btn-withdraw:not(:disabled) {
  border: 2px solid var(--success);
  background: #f0fdf4;
  color: var(--success);
}

.btn-withdraw.ready:hover {
  background: var(--success);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.25);
}

.btn-withdraw:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 700px) {
  .hero { padding: 60px 20px 110px; }
  .hero h1 { letter-spacing: -1px; }
  .w-card { min-width: 275px; max-width: 275px; }
  .w-amount { font-size: 30px; }
  .stats-bar { gap: 14px; }
  .stat-card { padding: 22px; }
  .stat-card h2 { font-size: 26px; }
  .features-grid { gap: 16px; }
  .feature-card { padding: 24px; }
  .provider-chip { padding: 10px 16px 10px 12px; font-size: 13px; }
  .provider-chip img { width: 22px; height: 22px; }
  .dash-actions .btn { font-size: 13px; padding: 12px 10px; }
}
