:root {
  color-scheme: dark;
  --bg: #050816;
  --bg-2: #111827;
  --panel: rgba(15, 23, 42, 0.75);
  --panel-strong: rgba(30, 41, 59, 0.95);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #7c3aed;
  --accent-2: #06b6d4;
  --border: rgba(255,255,255,0.12);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 20px 45px rgba(2, 8, 23, 0.45);
}

:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f4f7ff;
  --bg-2: #e2e8f0;
  --panel: rgba(255, 255, 255, 0.8);
  --panel-strong: rgba(255,255,255,0.95);
  --text: #0f172a;
  --muted: #475569;
  --accent: #7c3aed;
  --accent-2: #0891b2;
  --border: rgba(15,23,42,0.08);
  --shadow: 0 15px 35px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(6,182,212,0.25), transparent 30%), linear-gradient(135deg, var(--bg), var(--bg-2));
  color: var(--text);
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  background: url('https://i.ibb.co/Myzp4L6b/x.jpg') center/cover no-repeat;
  filter: blur(14px) brightness(0.35);
  transform: scale(1.05);
  z-index: -2;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  background: linear-gradient(135deg, rgba(2,6,23,0.65), rgba(15,23,42,0.82));
  z-index: -1;
}
.page-shell { width: min(1280px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 72px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border: 1px solid var(--border); border-radius: 999px; background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(16px); position: sticky; top: 16px; z-index: 20; }
.brand { display: flex; gap: 10px; align-items: center; color: var(--text); text-decoration: none; font-weight: 700; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.topnav { display: flex; gap: 18px; }
.topnav a { color: var(--muted); text-decoration: none; transition: color 0.2s ease; }
.topnav a.active, .topnav a:hover { color: var(--text); }
.topbar-actions { display: flex; gap: 10px; }
.icon-btn, .primary-btn, .secondary-btn, .hero-search button { border: none; cursor: pointer; transition: transform 0.2s ease, background 0.2s ease; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--panel); color: var(--text); border: 1px solid var(--border); }
.icon-btn:hover, .primary-btn:hover, .secondary-btn:hover, .hero-search button:hover { transform: translateY(-1px); }
.glass-panel { background: var(--panel); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.hero { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 24px; padding: 48px 0 32px; align-items: center; }
.eyebrow { display: inline-flex; padding: 8px 12px; border-radius: 999px; background: rgba(7, 89, 133, 0.2); color: #7dd3fc; margin-bottom: 14px; font-size: 0.9rem; }
.hero h1 { font-size: clamp(2rem, 4vw, 3.4rem); margin: 0 0 12px; }
.hero p { color: var(--muted); line-height: 1.7; font-size: 1.04rem; }
.hero-search { display: flex; gap: 10px; margin: 24px 0; }
.hero-search input, .analysis-toolbar input, .contact-form input, .contact-form textarea, .filter-group select, .language-selector select {
  width: 100%; border: 1px solid var(--border); background: rgba(255,255,255,0.08); color: var(--text); padding: 14px 16px; border-radius: 999px;
}
.hero-search button, .primary-btn { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; padding: 12px 18px; border-radius: 999px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.hero-stats article, .stats-grid > div, .result-metrics > div { padding: 16px; border-radius: 18px; background: rgba(255,255,255,0.06); border: 1px solid var(--border); }
.hero-stats strong, .stats-grid strong, .result-metrics strong { display: block; font-size: 1.2rem; }
.hero-stats span, .stats-grid span, .result-metrics span { color: var(--muted); font-size: 0.9rem; }
.hero-card { padding: 20px; overflow: hidden; }
.hero-card img { width: 100%; height: 260px; object-fit: cover; border-radius: 20px; }
.hero-card-body { padding-top: 14px; }
.filters-panel { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 18px; margin-bottom: 24px; }
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-group label { color: var(--muted); font-size: 0.9rem; }
.filter-group select { border-radius: 14px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 14px; }
.quiz-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.quiz-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.quiz-card img { width: 100%; height: 160px; object-fit: cover; border-radius: 16px; }
.quiz-card h3 { margin: 0; font-size: 1.08rem; }
.quiz-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 0.9rem; }
.badge { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,0.08); }
.quiz-card .secondary-btn { align-self: flex-start; }
.quiz-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(15,23,42,0.24); }
.footer { text-align: center; padding: 24px 16px 40px; color: var(--muted); }
.toast { position: fixed; right: 20px; bottom: 20px; padding: 14px 18px; border-radius: 14px; background: var(--panel-strong); border: 1px solid var(--border); color: var(--text); opacity: 0; transform: translateY(10px); pointer-events: none; transition: 0.25s ease; z-index: 40; }
.toast.show { opacity: 1; transform: translateY(0); }
.loader { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,0.5); z-index: 50; }
.loader.hidden { display: none; }
.spinner { width: 50px; height: 50px; border-radius: 50%; border: 4px solid rgba(255,255,255,0.2); border-top-color: white; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.content-page, .analysis-page, .result-page { padding-top: 32px; }
.about-card, .contact-card, .result-card { padding: 24px; }
.contact-form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.contact-form textarea { border-radius: 16px; min-height: 110px; }
.faq details { margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,0.06); }
.hidden { display: none !important; }
