/* VocabCatcher site: dark theme (v3) */
:root {
  /* The extension's palette (popup.css) */
  --bg: #070b1f;
  --bg-2: #0d1433;
  --surface: #121b3d;
  --surface-hover: #182552;
  --ink: #f5f7ff;
  --soft: #c4cae2;
  --muted: #8e9abf;
  --line: rgba(145, 164, 224, .16);
  --line-strong: rgba(103, 232, 249, .36);
  --cyan: #35d9f1;
  --cyan-hover: #62e6f8;
  --on-cyan: #04161f;
  --teal: #2de2b7;
  --violet: #8b5cf6;
  --screen: #0a1030;
  --caption: #fde047;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --radius-lg: 22px;
  --radius-sm: 10px;
  color-scheme: dark;
}
:lang(ar) { --display: "IBM Plex Sans Arabic", Tahoma, system-ui, sans-serif; --body: "IBM Plex Sans Arabic", Tahoma, system-ui, sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; color: var(--ink); font: 17px/1.6 var(--body); background: radial-gradient(1100px 620px at 8% -8%, rgba(53, 217, 241, .12), transparent 60%), radial-gradient(900px 600px at 96% 2%, rgba(139, 92, 246, .16), transparent 60%), var(--bg); background-repeat: no-repeat; }
::selection { background: rgba(53, 217, 241, .32); color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--cyan-hover); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; padding: 10px 14px; background: var(--cyan); color: var(--on-cyan); border-radius: 8px; z-index: 50; }
.skip:focus { top: 12px; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(7, 11, 31, .72); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; }
.site-head.scrolled { border-bottom-color: var(--line); }
.head-row { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 700 20px/1 var(--display); letter-spacing: -0.01em; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.nav { display: flex; align-items: center; gap: 22px; margin-inline-start: auto; }
.nav a { color: var(--soft); text-decoration: none; font-weight: 500; font-size: 15.5px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav .lang { font-weight: 600; }
.nav .login { color: var(--ink); font-weight: 600; padding: 8px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(145, 164, 224, .3); }
.nav .login:hover { box-shadow: inset 0 0 0 1px var(--line-strong); background: rgba(53, 217, 241, .08); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0; font: 600 16px/1 var(--body); text-decoration: none; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.btn-primary { background: var(--cyan); color: var(--on-cyan); font-weight: 700; }
.btn-primary:hover { background: var(--cyan-hover); color: var(--on-cyan); }
.btn-primary:active { transform: translateY(1px); }
.btn-quiet { background: rgba(255, 255, 255, .03); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(145, 164, 224, .3); }
.btn-quiet:hover { color: var(--ink); background: rgba(53, 217, 241, .08); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn svg { width: 20px; height: 20px; flex: none; }
.nav .btn { min-height: 40px; padding: 0 16px; font-size: 15px; color: var(--on-cyan); }

/* Hero */
.hero { padding: 56px 0 88px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.hero h1 { font: 800 clamp(40px, 5.2vw, 64px)/1.02 var(--display); letter-spacing: -0.035em; margin: 0 0 22px; }
:lang(ar) .hero h1 { letter-spacing: 0; line-height: 1.25; }
.lede { font-size: 19.5px; line-height: 1.6; color: var(--soft); max-width: 34ch; margin: 0 0 32px; }
:lang(ar) .lede { max-width: 38ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin: 18px 0 0; font-size: 14.5px; color: var(--muted); }

/* The player: the site's one bold moment */
.player { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius-lg); overflow: hidden; background: var(--screen); box-shadow: 0 0 0 1px rgba(103, 232, 249, .18), 0 40px 90px -20px rgba(0, 0, 0, .7), 0 0 80px -20px rgba(53, 217, 241, .22); isolation: isolate; }
/* The scene: a night street out of focus. Soft bokeh lights in the extension's colours, slowly drifting,
   with film grain and a darker base so the caption always reads. */
.scene { position: absolute; inset: 0; z-index: -1; overflow: hidden;
  background: radial-gradient(90% 70% at 70% 20%, rgba(139, 92, 246, .35), transparent 60%), radial-gradient(80% 60% at 15% 35%, rgba(53, 217, 241, .18), transparent 65%), linear-gradient(170deg, #1b1650 0%, #111a45 45%, #0a1030 100%); }
.scene::before { content: ""; position: absolute; inset: -12%; filter: blur(7px); animation: drift 26s ease-in-out infinite alternate;
  background:
    radial-gradient(circle at 12% 22%, rgba(255, 196, 120, .9) 0 14px, rgba(255, 196, 120, .25) 15px 30px, transparent 44px),
    radial-gradient(circle at 24% 58%, rgba(53, 217, 241, .75) 0 10px, rgba(53, 217, 241, .2) 11px 24px, transparent 36px),
    radial-gradient(circle at 36% 18%, rgba(255, 140, 170, .6) 0 8px, transparent 26px),
    radial-gradient(circle at 48% 36%, rgba(255, 210, 140, .55) 0 22px, rgba(255, 210, 140, .14) 23px 44px, transparent 62px),
    radial-gradient(circle at 63% 14%, rgba(139, 92, 246, .8) 0 12px, rgba(139, 92, 246, .22) 13px 28px, transparent 42px),
    radial-gradient(circle at 74% 44%, rgba(45, 226, 183, .6) 0 9px, transparent 28px),
    radial-gradient(circle at 86% 24%, rgba(255, 190, 110, .85) 0 18px, rgba(255, 190, 110, .2) 19px 38px, transparent 54px),
    radial-gradient(circle at 92% 62%, rgba(53, 217, 241, .5) 0 7px, transparent 24px),
    radial-gradient(circle at 6% 70%, rgba(139, 92, 246, .5) 0 16px, transparent 40px),
    radial-gradient(circle at 56% 66%, rgba(255, 170, 120, .35) 0 12px, transparent 34px); }
.scene::after { content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, transparent 35%, rgba(7, 11, 31, .55) 70%, rgba(7, 11, 31, .9) 100%),
    radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(7, 11, 31, .6) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes drift { from { transform: translate3d(-2%, -1%, 0) scale(1.02); } to { transform: translate3d(2%, 1.5%, 0) scale(1.06); } }
.player-bar { position: absolute; inset-inline: 18px; bottom: 14px; display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.85); font: 500 12.5px/1 var(--body); direction: ltr; }
.player-bar .track { flex: 1; height: 4px; border-radius: 4px; background: rgba(255,255,255,.25); overflow: hidden; }
.player-bar .track i { display: block; width: 38%; height: 100%; background: #ff4b4b; }
.player-bar svg { width: 16px; height: 16px; }

.caption-zone { position: absolute; inset-inline: 0; bottom: 56px; display: flex; justify-content: center; direction: ltr; }
.caption { position: relative; max-width: calc(100% - 120px); padding: 12px 24px 13px; border-radius: 14px; background: rgba(8, 10, 24, .82); border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 10px 30px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); text-align: center; }
.caption::before { content: "Tap a word"; position: absolute; top: -11px; left: 50%; translate: -50% 0; padding: 2px 10px; border-radius: 999px; background: var(--cyan); color: var(--on-cyan); font: 700 11px/1.5 var(--body); letter-spacing: .02em; white-space: nowrap; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
:lang(ar) .caption::before { content: "اضغط أي كلمة"; font-family: "IBM Plex Sans Arabic", Tahoma, sans-serif; }
.cap-en { margin: 0; color: #fff; font: 700 clamp(15px, 1.9vw, 21px)/1.45 var(--body); }
.cap-tr { margin: 4px 0 0; color: var(--caption); font: 600 clamp(14px, 1.6vw, 18px)/1.5 "IBM Plex Sans Arabic", Tahoma, sans-serif; }
.w { cursor: pointer; border-radius: 6px; padding: 0 2px; transition: background .12s ease; }
.w:hover, .w:focus-visible { background: rgba(94, 230, 245, .28); outline: none; }
.w.on { background: var(--cyan); color: var(--screen); }
.cap-nav { position: absolute; top: 50%; translate: 0 -50%; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(12,14,30,.72); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.cap-nav:hover { background: #25a8d4; }
.cap-prev { left: -46px; } .cap-next { right: -46px; }

/* Word bubble, drawn like the extension's */
.bubble { position: absolute; z-index: 3; width: min(330px, calc(100% - 24px)); padding: 10px 12px 12px; border-radius: 16px; background: rgba(40, 44, 66, .9); backdrop-filter: blur(14px); color: #fff; box-shadow: 0 18px 40px rgba(0,0,0,.45); direction: ltr; transform-origin: 50% 100%; }
.bubble[hidden] { display: none; }
.bubble.pop { animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }
.b-row { display: flex; align-items: center; gap: 8px; }
.b-say { all: unset; cursor: pointer; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: rgba(255,255,255,.8); }
.b-say:hover { background: rgba(255,255,255,.12); }
.b-say svg { width: 17px; height: 17px; }
.b-word { font: 700 19px/1.2 var(--body); color: var(--cyan); text-decoration: underline 2px rgba(94,230,245,.6); text-underline-offset: 4px; }
.b-mean { margin-inline-start: auto; font: 600 18px/1.3 "IBM Plex Sans Arabic", Tahoma, sans-serif; direction: rtl; }
.b-meta { display: flex; align-items: center; gap: 10px; margin: 8px 2px 0; color: rgba(255,255,255,.66); font-size: 13px; }
.b-save { all: unset; cursor: pointer; margin-inline-start: auto; padding: 5px 12px; border-radius: 999px; background: #2ee6b3; color: #07352a; font: 700 13px/1.2 var(--body); }
.b-save.saved { background: rgba(46,230,179,.18); color: #7ff3d3; }
.b-phrase { all: unset; cursor: pointer; display: flex; align-items: center; gap: 8px; margin-top: 10px; width: 100%; box-sizing: border-box; padding: 6px 12px; border-radius: 999px; border: 1px dashed rgba(94,230,245,.6); font-size: 14px; }
.b-phrase:hover { background: rgba(94,230,245,.12); }
.b-phrase b { color: var(--cyan); }
.b-phrase small { font-size: 12px; opacity: .65; }
.player-hint { margin: 14px 4px 0; font-size: 14.5px; color: var(--muted); text-align: center; }

/* How it works: a real sequence */
.section { padding: 88px 0; }
.section-alt { background: rgba(13, 20, 51, .72); border-block: 1px solid var(--line); }
.section h2 { font: 800 clamp(30px, 3.6vw, 42px)/1.1 var(--display); letter-spacing: -0.025em; margin: 0 0 14px; }
:lang(ar) .section h2 { letter-spacing: 0; line-height: 1.3; }
.section-intro { max-width: 58ch; color: var(--soft); font-size: 18.5px; margin: 0 0 48px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
@media (max-width: 1100px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; } }
.steps li { counter-increment: step; }
.steps figure { margin: 0 0 20px; border-radius: 18px; overflow: hidden; background: var(--bg-2); aspect-ratio: 47 / 30; border: 1px solid var(--line); }
.steps figure img { width: 100%; height: 100%; object-fit: contain; }
.steps h3 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 6px; font: 700 21px/1.3 var(--display); }
.steps h3::before { content: counter(step); font: 800 34px/1 var(--display); color: var(--cyan); }
.steps p { margin: 0; color: var(--soft); }

/* Details: a plain list, not cards */
.details { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; margin: 0; }
.detail { padding: 22px 0; border-top: 1px solid var(--line); }
.detail dt { font: 700 19px/1.35 var(--display); margin: 0 0 4px; }
.detail dd { margin: 0; color: var(--soft); }
.detail strong { color: var(--cyan); font-weight: 600; }
.detail code, .prose code { font-size: .88em; background: rgba(53, 217, 241, .1); color: #a5f0fb; padding: 1px 6px; border-radius: 5px; }

/* Privacy promise and closing call */
.promise { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; align-items: center; }
.promise p { color: var(--soft); font-size: 18.5px; margin: 0 0 18px; }
.promise ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.promise li { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.promise li svg { flex: none; width: 22px; height: 22px; color: var(--teal); margin-top: 2px; }
.closing { text-align: center; padding: 96px 0; }
.closing h2 { margin: 0 auto; max-width: 18ch; font: 800 clamp(30px, 3.6vw, 42px)/1.1 var(--display); letter-spacing: -0.025em; }
:lang(ar) .closing h2 { letter-spacing: 0; line-height: 1.3; }
.closing .cta-row { justify-content: center; margin-top: 28px; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding: 36px 0 44px; color: var(--muted); font-size: 15px; }
.foot-row { display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; }
.foot-row nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-inline-start: auto; }
.foot-row a { color: var(--muted); text-decoration: none; }
.foot-row a:hover { color: var(--ink); }

/* Document pages (privacy, support) */
.doc { padding: 48px 0 96px; }
.doc-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; align-items: start; }
.toc { position: sticky; top: 96px; font-size: 15px; }
.toc p { margin: 0 0 10px; font-weight: 700; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }
.prose { max-width: 70ch; }
.prose h1 { font: 800 clamp(34px, 4vw, 48px)/1.1 var(--display); letter-spacing: -0.03em; margin: 0 0 10px; }
:lang(ar) .prose h1 { letter-spacing: 0; line-height: 1.3; }
.prose .updated { color: var(--muted); margin: 0 0 32px; }
.prose h2 { font: 700 23px/1.3 var(--display); margin: 44px 0 10px; }
.prose p, .prose li { color: var(--soft); }
.prose strong { color: var(--ink); }
.prose ul { padding-inline-start: 22px; }
.prose li + li { margin-top: 6px; }
.prose .summary { font-size: 19px; line-height: 1.6; color: var(--ink); padding: 20px 24px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); border-inline-start: 3px solid var(--cyan); }
.table-scroll { overflow-x: auto; margin: 12px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; min-width: 560px; }
.prose th, .prose td { text-align: start; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--muted); font-weight: 600; }
.lang-switch { display: inline-block; margin-bottom: 18px; font-weight: 600; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; cursor: pointer; font: 600 18px/1.4 var(--display); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 26px/1 var(--body); color: var(--cyan); transition: transform .15s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 0 20px; color: var(--soft); }
.faq summary:hover { color: var(--cyan-hover); }
.faq .answer p { margin: 0 0 10px; }
.contact-box { margin-top: 44px; padding: 24px 28px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.contact-box h2 { margin-top: 0; }

.not-found { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 64px 0; }
.not-found h1 { font: 800 clamp(34px, 4vw, 48px)/1.1 var(--display); margin: 0 0 12px; }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid, .promise { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr; max-width: 560px; }
  .details { grid-template-columns: 1fr; }
  .doc-grid { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
  .nav a:not(.btn):not(.lang):not(.login) { display: none; }
}
@media (max-width: 560px) {
  .wrap { width: min(1180px, 100% - 32px); }
  .hero { padding-top: 28px; }
  .player { aspect-ratio: 4 / 5; }
  .caption { max-width: calc(100% - 28px); padding: 10px 14px; }
  .cap-nav { display: none; }
  .caption-zone { bottom: 44px; }
  .nav .btn { display: none; }
  .desk-only { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.cta-row.center { justify-content: center; }
