/* =========================================================
   TruthLens — styles
   Dark gradient by default, light mode via [data-theme="light"]
   ========================================================= */

:root {
  --font: 'Lato', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --g1: #22d3ee;           /* cyan   */
  --g2: #8b5cf6;           /* violet */
  --g3: #ec4899;           /* pink   */
  --grad: linear-gradient(120deg, var(--g1), var(--g2) 55%, var(--g3));

  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;

  --radius: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

[data-theme="dark"] {
  --bg: radial-gradient(1200px 700px at 10% -10%, #1d1452 0%, transparent 60%),
        radial-gradient(900px 600px at 110% 10%, #3b0d4a 0%, transparent 55%),
        linear-gradient(160deg, #060818 0%, #0b0820 45%, #120a2c 100%);
  --text: #e9e7ff;
  --muted: #a3a0c8;
  --card: rgba(255, 255, 255, .045);
  --card-solid: #141032;
  --border: rgba(255, 255, 255, .09);
  --input: rgba(255, 255, 255, .05);
  --header: rgba(8, 7, 26, .7);
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --orb-opacity: .55;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: radial-gradient(1100px 650px at 0% -10%, #dfe7ff 0%, transparent 60%),
        radial-gradient(900px 600px at 110% 0%, #f6e3ff 0%, transparent 55%),
        linear-gradient(160deg, #f7f8ff 0%, #f1f0ff 50%, #fbf5ff 100%);
  --text: #18163a;
  --muted: #5d5a85;
  --card: rgba(255, 255, 255, .78);
  --card-solid: #ffffff;
  --border: rgba(40, 30, 110, .1);
  --input: #f6f5ff;
  --header: rgba(255, 255, 255, .75);
  --shadow: 0 18px 50px rgba(60, 40, 140, .12);
  --orb-opacity: .3;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  transition: color .3s var(--ease);
}
html[lang="mr"] body { line-height: 1.75; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--g2); color: #fff; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hp { position: absolute; left: -9999px; opacity: 0; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.c-red { color: var(--bad); }

/* ---------- background orbs ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-orbs span {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: var(--orb-opacity);
  animation: float 18s ease-in-out infinite alternate;
}
.bg-orbs span:nth-child(1) { width: 420px; height: 420px; background: #3b2bd6; top: -120px; left: -100px; }
.bg-orbs span:nth-child(2) { width: 360px; height: 360px; background: #a21caf; top: 30%; right: -140px; animation-delay: -6s; }
.bg-orbs span:nth-child(3) { width: 300px; height: 300px; background: #0e7490; bottom: -120px; left: 30%; animation-delay: -12s; }
@keyframes float { to { transform: translate(60px, 40px) scale(1.12); } }

/* ---------- preloader ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 999; display: grid; place-content: center; justify-items: center; gap: 18px;
  background: #0b0820;
}
[data-theme="light"] #preloader { background: #f5f4ff; }
.pre-lens { position: relative; width: 92px; height: 92px; display: grid; place-items: center; }
.pre-lens img { width: 54px; height: 54px; }
.pre-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid transparent; border-top-color: var(--g1); border-right-color: var(--g2);
  animation: spin 1s linear infinite;
}
.pre-name { font-weight: 900; font-size: 1.4rem; letter-spacing: .5px; }
.pre-name span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: transparent; border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.site-header.scrolled { background: var(--header); border-color: var(--border); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 900; letter-spacing: .2px; }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.main-nav { display: flex; gap: 6px; margin-left: auto; }
.main-nav a { padding: 8px 14px; border-radius: 999px; color: var(--muted); font-weight: 700; font-size: .95rem; transition: color .2s, background .2s; }
.main-nav a:hover, .main-nav a.active { color: var(--text); background: var(--card); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.lang-toggle {
  position: relative; display: flex; padding: 4px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border);
}
.lang-toggle button {
  position: relative; z-index: 1; border: 0; background: none; padding: 6px 12px; border-radius: 999px;
  font-weight: 700; font-size: .85rem; color: var(--muted); transition: color .25s; min-width: 46px;
}
.lang-toggle button.active { color: #fff; }
.lang-slider {
  position: absolute; top: 4px; bottom: 4px; left: 4px; border-radius: 999px; background: var(--grad);
  box-shadow: 0 4px 14px rgba(139, 92, 246, .45);
}

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  transition: transform .2s var(--ease), border-color .2s;
}
.icon-btn:hover { transform: translateY(-2px); border-color: var(--g2); }
[data-theme="dark"] .i-moon, [data-theme="light"] .i-sun { display: none; }
.menu-btn { display: none; gap: 4px; align-content: center; }
.menu-btn span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s, opacity .25s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 1rem; line-height: 1.2; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s, border-color .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--grad); background-size: 160% 100%; color: #fff; box-shadow: 0 10px 30px rgba(139, 92, 246, .38); }
.btn-primary:hover { background-position: 100% 0; transform: translateY(-2px); box-shadow: 0 14px 38px rgba(139, 92, 246, .5); }
.btn-ghost { background: var(--card); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--g2); transform: translateY(-2px); }
.btn-lg { padding: 14px 30px; font-size: 1.05rem; }
.btn-sm { padding: 9px 16px; font-size: .9rem; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.link-btn { border: 0; background: none; color: var(--muted); font-weight: 700; font-size: .85rem; }
.link-btn:hover { color: var(--bad); }

/* ---------- hero ---------- */
.hero { text-align: center; padding-top: 64px; padding-bottom: 40px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border); font-size: .88rem; font-weight: 700; color: var(--muted);
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); line-height: 1.08; font-weight: 900; letter-spacing: -1px; margin: 22px auto 18px; max-width: 900px; }
html[lang="mr"] .hero h1 { line-height: 1.3; letter-spacing: 0; }
.hero-sub { max-width: 680px; margin: 0 auto; color: var(--muted); font-size: 1.12rem; }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 56px auto 0; max-width: 900px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.stat { background: var(--card-solid); padding: 22px 12px; display: flex; flex-direction: column; gap: 2px; }
[data-theme="dark"] .stat { background: rgba(14, 11, 38, .85); }
.stat b { font-size: 1.9rem; font-weight: 900; }
.stat span { color: var(--muted); font-size: .88rem; font-weight: 700; }

/* ---------- sections & cards ---------- */
.section { padding-top: 70px; padding-bottom: 30px; }
.section-head { text-align: center; margin-bottom: 36px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 900; letter-spacing: 2px; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
html[lang="mr"] .eyebrow { letter-spacing: .5px; font-size: .9rem; }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.2; margin: 8px 0 0; font-weight: 900; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}

/* ---------- verify ---------- */
.verify-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 22px; align-items: start; }
.verify-card { position: relative; padding: 22px; overflow: hidden; }
.tabs { position: relative; display: flex; gap: 6px; padding: 5px; border-radius: 14px; background: var(--input); border: 1px solid var(--border); margin-bottom: 18px; }
.tab {
  position: relative; z-index: 1; flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px; border: 0; background: none; border-radius: 10px; font-weight: 700; color: var(--muted); transition: color .25s;
}
.tab.active { color: var(--text); }
.tab-ink { position: absolute; top: 5px; bottom: 5px; left: 5px; border-radius: 10px; background: var(--card-solid); box-shadow: 0 4px 16px rgba(0, 0, 0, .18); }
[data-theme="dark"] .tab-ink { background: rgba(255, 255, 255, .09); }

.pane { display: none; }
.pane.active { display: block; }
textarea, input[type="url"], input[type="email"], input[type="text"] {
  width: 100%; border: 1px solid var(--border); background: var(--input); border-radius: var(--radius-sm);
  padding: 14px 16px; outline: none; transition: border-color .2s, box-shadow .2s; resize: vertical;
}
textarea:focus, input:focus { border-color: var(--g2); box-shadow: 0 0 0 4px rgba(139, 92, 246, .18); }
textarea::placeholder, input::placeholder { color: var(--muted); opacity: .75; }
.field-foot { text-align: right; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.url-field { position: relative; }
.url-field svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.url-field input { padding-left: 46px; height: 56px; }
.hint { color: var(--muted); font-size: .86rem; margin: 10px 2px 0; }

.samples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 4px; font-size: .88rem; color: var(--muted); }
.chip { border: 1px dashed var(--border); background: transparent; padding: 6px 12px; border-radius: 999px; font-size: .84rem; font-weight: 700; color: var(--text); transition: border-color .2s, background .2s; }
.chip:hover { border-color: var(--g1); background: var(--card); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* scanning loader */
.scan-overlay {
  position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: var(--card-solid); z-index: 5; padding: 24px; text-align: center;
}
[data-theme="dark"] .scan-overlay { background: rgba(12, 9, 34, .97); }
.scanner { position: relative; width: 150px; height: 170px; }
.scan-doc { position: absolute; inset: 0; border-radius: 14px; border: 1px solid var(--border); background: var(--input); padding: 22px 18px; display: flex; flex-direction: column; gap: 12px; }
.scan-doc i { display: block; height: 9px; border-radius: 6px; background: var(--border); }
.scan-doc i:nth-child(2) { width: 80%; } .scan-doc i:nth-child(4) { width: 65%; } .scan-doc i:nth-child(5) { width: 45%; }
.scan-beam {
  position: absolute; left: -10px; right: -10px; height: 3px; top: 0; border-radius: 3px;
  background: var(--grad); box-shadow: 0 0 18px 4px rgba(34, 211, 238, .55);
  animation: beam 1.6s ease-in-out infinite alternate;
}
@keyframes beam { to { top: calc(100% - 3px); } }
.scan-lens { position: absolute; width: 64px; height: 64px; right: -22px; bottom: -14px; border-radius: 50%; background: var(--card-solid); border: 1px solid var(--border); display: grid; place-items: center; animation: bob 1.4s ease-in-out infinite; }
.scan-lens img { width: 38px; }
@keyframes bob { 50% { transform: translate(-10px, -12px) rotate(-8deg); } }
.scan-step { font-weight: 700; min-height: 1.6em; margin: 0; }
.scan-progress { width: min(260px, 80%); height: 6px; border-radius: 6px; background: var(--border); overflow: hidden; }
.scan-progress span { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 6px; }

/* result */
.result-card { padding: 24px; min-height: 420px; }
.result-empty { height: 100%; min-height: 370px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; }
.result-empty h3 { margin: 18px 0 4px; font-size: 1.25rem; }
.result-empty p { margin: 0; color: var(--muted); max-width: 320px; }
.empty-art { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; background: var(--input); border: 1px dashed var(--border); animation: bob 4s ease-in-out infinite; }
.empty-art img { width: 56px; opacity: .85; }

.result-head { display: flex; align-items: center; gap: 22px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.gauge { position: relative; width: 128px; height: 128px; flex: none; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.g-track { fill: none; stroke: var(--border); stroke-width: 10; }
.g-bar { fill: none; stroke: url(#gGrad); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: 326.73; }
.gauge[data-v="credible"] { --g1: #22c55e; --g2: #22d3ee; }
.gauge[data-v="questionable"] { --g1: #f59e0b; --g2: #f97316; }
.gauge[data-v="misleading"] { --g1: #ef4444; --g2: #ec4899; }
.g-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.g-center b { font-size: 2.3rem; font-weight: 900; line-height: 1; }
.g-center small { color: var(--muted); font-weight: 700; }
.verdict-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; font-weight: 900; font-size: .95rem; }
.verdict-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.verdict-badge.credible { color: var(--ok); background: rgba(34, 197, 94, .13); }
.verdict-badge.questionable { color: var(--warn); background: rgba(245, 158, 11, .14); }
.verdict-badge.misleading { color: var(--bad); background: rgba(239, 68, 68, .14); }
.verdict-sum { margin: 10px 0 0; color: var(--muted); }
.seen { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }

.sub-h { margin: 20px 0 10px; font-size: .82rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
html[lang="mr"] .sub-h { letter-spacing: .3px; font-size: .92rem; }
.signals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.signals li {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: start;
  padding: 11px 12px; border-radius: var(--radius-sm); background: var(--input); border: 1px solid var(--border);
  opacity: 0; transform: translateY(8px);
}
.sig-ico { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: .9rem; }
.sig-positive .sig-ico { background: rgba(34, 197, 94, .15); color: var(--ok); }
.sig-negative .sig-ico { background: rgba(239, 68, 68, .15); color: var(--bad); }
.sig-neutral .sig-ico { background: rgba(163, 160, 200, .18); color: var(--muted); }
.sig-text { font-size: .95rem; padding-top: 2px; }
.sig-text em { font-style: normal; color: var(--muted); font-size: .86rem; display: block; }
.sig-w { font-size: .78rem; font-weight: 900; padding: 3px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); margin-top: 2px; }
.sig-positive .sig-w { color: var(--ok); } .sig-negative .sig-w { color: var(--bad); }

.fc-list { display: flex; flex-direction: column; gap: 10px; }
.fc { padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); border-left: 4px solid var(--warn); background: var(--input); }
.fc.false { border-left-color: var(--bad); } .fc.true { border-left-color: var(--ok); }
.fc-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 4px; }
.fc-rating { font-size: .75rem; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; padding: 3px 9px; border-radius: 999px; background: rgba(245, 158, 11, .15); color: var(--warn); }
.fc.false .fc-rating { background: rgba(239, 68, 68, .15); color: var(--bad); }
.fc.true .fc-rating { background: rgba(34, 197, 94, .15); color: var(--ok); }
.fc-claim { font-weight: 700; margin: 0 0 4px; }
.fc p { margin: 0; font-size: .9rem; color: var(--muted); }
.fc a { font-size: .85rem; font-weight: 700; color: var(--g1); display: inline-block; margin-top: 6px; }

.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.result-actions .btn-primary { margin-left: auto; }
.disclaimer { margin: 16px 0 0; font-size: .82rem; color: var(--muted); padding: 10px 12px; border-radius: 10px; background: var(--input); }

/* history */
.history-card { margin-top: 22px; padding: 20px 22px; }
.history-head { display: flex; justify-content: space-between; align-items: center; }
.history-head h4 { margin: 0; }
.history { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.history li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--input); border: 1px solid var(--border); cursor: pointer; transition: border-color .2s, transform .2s; }
.history li:hover { border-color: var(--g2); transform: translateY(-2px); }
.h-score { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: .95rem; color: #fff; }
.h-score.credible { background: linear-gradient(135deg, #22c55e, #0ea5e9); }
.h-score.questionable { background: linear-gradient(135deg, #f59e0b, #f97316); }
.h-score.misleading { background: linear-gradient(135deg, #ef4444, #ec4899); }
.h-text { min-width: 0; }
.h-text b { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-text small { color: var(--muted); }

/* how */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { position: relative; padding: 28px 24px; transition: transform .3s var(--ease), border-color .3s; }
.step:hover { transform: translateY(-6px); border-color: var(--g2); }
.step-no { position: absolute; top: 18px; right: 22px; font-size: 2.6rem; font-weight: 900; opacity: .08; }
.step-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 10px 26px rgba(139, 92, 246, .35); }
.step-ico svg { width: 26px; height: 26px; }
.step h3 { margin: 18px 0 6px; font-size: 1.2rem; }
.step p { margin: 0; color: var(--muted); }

/* tips */
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tip { padding: 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); transition: background .3s, transform .3s var(--ease); }
.tip:hover { transform: translateY(-4px); }
.tip span { font-size: 1.7rem; }
.tip h4 { margin: 10px 0 4px; font-size: 1.08rem; }
.tip p { margin: 0; color: var(--muted); font-size: .95rem; }

/* report */
.report-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.report-grid .muted { font-size: 1.05rem; }
.trusted-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.trusted-links a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); font-weight: 700; font-size: .9rem; transition: border-color .2s; }
.trusted-links a:hover { border-color: var(--g1); }
.report-form { padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.report-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: .92rem; }
.report-form .btn { align-self: flex-start; margin-top: 4px; }

/* footer */
.site-footer { margin-top: 80px; border-top: 1px solid var(--border); padding: 30px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-inner p { margin: 0; }

/* utility widgets */
.to-top {
  position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: var(--grad); color: #fff; font-size: 1.2rem; font-weight: 900; box-shadow: 0 10px 26px rgba(139, 92, 246, .45);
  display: none; z-index: 40;
}
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 100;
  padding: 12px 20px; border-radius: 12px; background: var(--card-solid); border: 1px solid var(--border);
  box-shadow: var(--shadow); font-weight: 700; display: none; max-width: calc(100% - 32px); text-align: center;
}
.toast.error { border-color: var(--bad); color: var(--bad); }
.toast.success { border-color: var(--ok); }

.reveal { opacity: 0; transform: translateY(24px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }

.btn-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: spin .8s linear infinite; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .verify-grid, .report-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .tips { grid-template-columns: repeat(2, 1fr); }
  .report-grid { gap: 24px; }
}

@media (max-width: 820px) {
  .menu-btn { display: grid; }
  .main-nav {
    position: absolute; top: 72px; left: 12px; right: 12px; flex-direction: column; gap: 2px; padding: 10px;
    background: var(--card-solid); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
    display: none;
  }
  .main-nav a { display: block; padding: 12px 14px; border-radius: 10px; }
  .header-inner { gap: 10px; }
  .header-actions { margin-left: auto; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero { padding-top: 40px; }
  .hero-sub { font-size: 1rem; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 40px; }
  .stat b { font-size: 1.5rem; }
  .tips { grid-template-columns: 1fr; }
  .section { padding-top: 54px; }
  .verify-card, .result-card { padding: 16px; }
  .result-head { flex-direction: column; text-align: center; }
  .gauge { width: 116px; height: 116px; }
  .form-actions .btn { flex: 1; }
  .result-actions .btn { flex: 1 1 auto; }
  .result-actions .btn-primary { margin-left: 0; flex-basis: 100%; }
  .signals li { grid-template-columns: 26px 1fr; }
  .sig-w { grid-column: 2; justify-self: start; }
  .brand span { font-size: 1.15rem; }
  .lang-toggle button { padding: 6px 9px; min-width: 40px; }
  .icon-btn { width: 40px; height: 40px; }
  .tab span { font-size: .9rem; }
}

@media (max-width: 380px) {
  .brand span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
