/* =========================================================
   freecourses — design system
   ========================================================= */

:root {
  --accent: #ff3131;
  --accent-2: #ff7a45;
  --accent-hover: #ff4a4a;
  --accent-contrast: #ffffff;
  --accent-soft: rgba(255, 49, 49, 0.10);
  --accent-softer: rgba(255, 49, 49, 0.05);
  --accent-glow: rgba(255, 49, 49, 0.40);
  --main-color: #4053ef;

  --bg: #fbf7f7;
  --bg-2: #f4eeee;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-solid: #ffffff;
  --surface-hover: rgba(255, 255, 255, 0.92);
  --text: #16101a;
  --text-muted: #6d6470;
  --border: rgba(22, 16, 26, 0.09);
  --border-strong: rgba(22, 16, 26, 0.16);

  --easy: #14a06a;
  --intermediate: #d9a300;
  --advanced: #f0640c;
  --very-advanced: #8b5cf6;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 10px;
  --radius-pill: 10px;

  --shadow-sm: 0 1px 2px rgba(16, 10, 20, 0.05);
  --shadow: 0 2px 6px rgba(16, 10, 20, 0.05), 0 18px 40px -24px rgba(16, 10, 20, 0.35);
  --shadow-glow: 0 0 0 1px rgba(255, 49, 49, 0.45), 0 20px 60px -18px rgba(255, 49, 49, 0.45);

  --font: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="dark"] {
  --accent: #ff4646;
  --accent-2: #ff8a5c;
  --accent-hover: #ff6161;
  --accent-soft: rgba(255, 70, 70, 0.16);
  --accent-softer: rgba(255, 70, 70, 0.08);
  --accent-glow: rgba(255, 70, 70, 0.45);

  --bg: #0c0a0d;
  --bg-2: #131015;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-solid: #16131a;
  --surface-hover: rgba(255, 255, 255, 0.08);
  --text: #f6f2f7;
  --text-muted: #a49daa;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);

  --shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 24px 60px -28px rgba(0, 0, 0, 0.9);
  --shadow-glow: 0 0 0 1px rgba(255, 70, 70, 0.5), 0 24px 70px -18px rgba(255, 70, 70, 0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(720px 420px at 12% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 65%),
    radial-gradient(620px 420px at 92% 4%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 62%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  opacity: .9;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #fff; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 22px; }

/* ---------------- Navbar ---------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 12px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 19px; color: var(--text);
  letter-spacing: -0.03em;
}
.brand-logo {
  width: 32px; height: 32px; border-radius: 9px; object-fit: contain;
  transition: transform .35s var(--ease);
}
.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.06); }
.brand-text span { color: var(--accent); }
.brand-text {color: var(--main-color);}
.brand-text:hover {color: var(--main-color)}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--text-muted); padding: 8px 14px; border-radius: var(--radius-pill);
  font-weight: 500; font-size: 15px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.nav-links a:hover { background: var(--surface-hover); color: var(--text); }
.nav-links a.active { color: var(--text); background: var(--accent-soft); }

.lang-switch {
  display: inline-flex; gap: 2px; border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 3px; margin-left: 8px;
  background: var(--surface);
}
.lang-switch button {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; padding: 6px 12px; border-radius: var(--radius-pill);
  font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-muted); cursor: pointer;
  transition: all .2s var(--ease);
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active { background: var(--accent); color: #fff; }

.nav-actions-mobile { display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-pill);
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-size: 15px; cursor: pointer;
  transition: all .2s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.theme-toggle.desktop { margin-left: 6px; }
.nav-actions-mobile .theme-toggle { display: none; }
.menu-toggle {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: 16px; cursor: pointer;
}

/* ---------------- Flags ---------------- */
.flag-img {
  width: 22px; height: 15px; border-radius: 3px; object-fit: cover;
  box-shadow: 0 0 0 1px var(--border); display: inline-block;
}
.flag-img.sm { width: 18px; height: 12px; }
.flag-img.xl { width: 96px; height: 64px; border-radius: 10px; box-shadow: var(--shadow); }
.flag {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px; border-radius: 7px; background: var(--surface); border: 1px solid var(--border);
}

/* ---------------- Hero ---------------- */
.hero { padding: 104px 0 76px; text-align: center; }
.badge-free {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent);
  font-weight: 600; font-size: 13px; letter-spacing: 0.01em;
  margin-bottom: 22px; border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.badge-free::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 4px var(--accent-softer);
}
.hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02; letter-spacing: -0.045em; margin: 0 0 20px; font-weight: 700;
}
.hero h1 .accent {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { max-width: 640px; margin: 0 auto 28px; font-size: 18px; color: var(--text-muted); }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 30px; }
.hero-points span {
  background: var(--surface); border: 1px solid var(--border); padding: 8px 16px;
  border-radius: var(--radius-pill); font-size: 14px; color: var(--text-muted); font-weight: 500;
  -webkit-backdrop-filter:blur(10px); backdrop-filter: blur(10px);
}
.hero-points span::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 7px; }

/* ---------------- Sections ---------------- */
.section { padding: 72px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 30px; gap: 16px; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 38px); margin: 0; letter-spacing: -0.035em; font-weight: 700; }
.section-head p { margin: 8px 0 0; color: var(--text-muted); }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 24px; border-radius: var(--radius-pill); font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: all .25s var(--ease);
}
.btn-primary {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  color: #fff; box-shadow: 0 12px 30px -12px var(--accent-glow);
}
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 40px -12px var(--accent-glow); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border);-webkit-backdrop-filter:blur(10px); backdrop-filter: blur(10px); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-block-center { display: flex; justify-content: center; margin-top: 36px; }

/* ---------------- Grids ---------------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ---------------- Cards ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
  display: flex; flex-direction: column; gap: 12px; color: var(--text);
  position: relative; overflow: hidden;
}
a.card:hover { color: var(--text); }
.card h3 { margin: 0; font-size: 19px; letter-spacing: -0.025em; font-weight: 650; transition: color .25s var(--ease); }
.card p { margin: 0; color: var(--text-muted); font-size: 14.5px; }
.card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card-meta .count { color: var(--text-muted); font-size: 13px; margin-left: auto; }

.course-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px 200px at 50% -30%, var(--accent-soft), transparent 70%);
  opacity: 0; transition: opacity .35s var(--ease);
}
.course-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: var(--shadow-glow);
  background: var(--surface-hover);
}
.course-card:hover::after { opacity: 1; }
.course-card:hover h3 { color: var(--accent); }

/* Level pills */
.level {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 5px 11px; border-radius: var(--radius-pill); color: #fff;
}
.level-easy { background: var(--easy); }
.level-intermediate { background: var(--intermediate); color: #2b2100; }
.level-advanced { background: var(--advanced); }
.level-very-advanced { background: var(--very-advanced); }

/* Category cards */
.cat-card { padding: 0; }
.cat-card .cat-img {
  width: 100%; aspect-ratio: 16/10;
  background-size: cover; background-position: center;
  transition: transform .6s var(--ease), filter .4s var(--ease);
}
.cat-card .cat-img-fallback {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  color: var(--accent); font-weight: 800; font-size: 52px;
}
.cat-card .cat-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 6px; }
.cat-card:hover, .lang-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: var(--shadow-glow);
}
.cat-card:hover .cat-img { transform: scale(1.07); filter: saturate(1.12); }
.cat-card:hover h3, .lang-card:hover h3 { color: var(--accent); }

/* Language cards */
.lang-card { padding: 0; }
.lang-card .lang-flag {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16/6;
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  transition: transform .5s var(--ease);
}
.lang-card:hover .lang-flag { transform: scale(1.08); }
.lang-card .cat-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 6px; }

/* ---------------- Filters ---------------- */
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 26px; }
.filter-row .label { color: var(--text-muted); font-size: 14px; font-weight: 600; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 15px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.active { background: var(--accent); color: #fff; border-color: transparent; }
.chip.active .flag-img { box-shadow: none; }

/* ---------------- Progress ---------------- */
.progress { height: 6px; background: var(--accent-softer); border-radius: var(--radius-pill); overflow: hidden; border: 1px solid var(--border); }
.progress > span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width .4s var(--ease);
}
.progress-row { display: flex; align-items: center; gap: 12px; }
.progress-row .progress { flex: 1; }
.progress-row small { color: var(--text-muted); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------------- Page head ---------------- */
.page-head { padding: 60px 0 36px; border-bottom: 1px solid var(--border); }
.page-head .crumbs { color: var(--text-muted); font-size: 13px; margin-bottom: 12px; }
.page-head .crumbs a { color: var(--text-muted); }
.page-head .crumbs a:hover { color: var(--accent); }
.page-head h1 { margin: 0 0 10px; font-size: clamp(30px, 4.4vw, 50px); letter-spacing: -0.04em; font-weight: 700; }
.page-head p { color: var(--text-muted); margin: 0; max-width: 720px; }
.page-head .meta-row { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.lang-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border-strong);
  font-weight: 600; font-size: 13px; color: var(--text);
}

/* ---------------- Video list ---------------- */
.video-list { display: flex; flex-direction: column; gap: 20px; padding: 32px 0 90px; }
.video-card {
  display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); gap: 26px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: box-shadow .35s var(--ease), border-color .3s var(--ease), transform .3s var(--ease);
}
.video-card:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  box-shadow: 0 18px 50px -20px var(--accent-glow);
}
.video-card .embed {
  position: relative; width: 100%; aspect-ratio: 16/9; background: #000;
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border);
}
.video-card .embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-card .body { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 4px 8px 8px 0; }
.video-card h3 { margin: 0; font-size: 17px; letter-spacing: -0.02em; font-weight: 650; }
.video-card .desc { color: var(--text-muted); font-size: 14px; margin: 0; }
.video-card .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; }

.downloads { display: flex; flex-wrap: wrap; gap: 8px; }
.dl {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: var(--radius-pill); background: var(--accent-softer);
  color: var(--text-muted); font-size: 13px; font-weight: 500; border: 1px solid var(--border);
  transition: all .2s var(--ease);
}
.dl:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }

.complete {
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--text-muted);
  padding: 8px 14px; border-radius: var(--radius-pill); border: 1px solid var(--border);
  background: var(--surface);-webkit-user-select:none; user-select: none; transition: all .2s var(--ease);
}
.complete:hover { border-color: var(--accent); color: var(--accent); }
.complete input { accent-color: var(--accent); width: 16px; height: 16px; }
.complete.done { color: var(--easy); border-color: color-mix(in srgb, var(--easy) 60%, transparent); background: color-mix(in srgb, var(--easy) 10%, transparent); }

@media (max-width: 900px) { .video-card { grid-template-columns: 1fr; } }

/* ---------------- Footer ---------------- */
.footer {
  border-top: 1px solid var(--border); padding: 36px 0; margin-top: 40px;
  color: var(--text-muted); font-size: 14px; text-align: center;
}

/* ---------------- Mobile nav ---------------- */
@media (max-width: 760px) {
  .nav-actions-mobile .theme-toggle { display: inline-flex; }
  .theme-toggle.desktop { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 12px; right: 12px;
    background: var(--surface-solid); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px;
    flex-direction: column; align-items: stretch; gap: 4px; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 14px; border-radius: var(--radius-sm); }
  .lang-switch { margin: 8px 0 0; align-self: flex-start; }
  .hero { padding: 72px 0 56px; }
}

.empty { text-align: center; color: var(--text-muted); padding: 70px 0; }
.loading { text-align: center; color: var(--text-muted); padding: 44px 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- search box ---------- */
.search-box { position: relative; max-width: 460px; margin: 0 0 20px; }
.search-box .search-ico {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 20px; pointer-events: none;
}
.search-box input {
  width: 100%; padding: 13px 16px 13px 42px; font: inherit; font-size: 15px;
  color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-pill); outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.search-box input::placeholder { color: var(--text-muted); }
.search-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-softer); }
.search-box input::-webkit-search-cancel-button { cursor: pointer; }

/* ---------- filter chips as buttons ---------- */
button.chip { font: inherit; cursor: pointer; }

/* ---------- animated filtering ---------- */
.card-wrap {
  transition: opacity .26s ease, transform .26s cubic-bezier(.2,.7,.3,1), filter .26s ease;
  will-change: opacity, transform;
}
.card-wrap > .card { height: 100%; }
.card-wrap.is-hidden { opacity: 0; transform: scale(.94) translateY(10px); filter: blur(3px); pointer-events: none; }
.card-wrap.is-gone { display: none; }
@media (prefers-reduced-motion: reduce) { .card-wrap { transition: none; } }

/* ---------- status outlines on course cards ---------- */
.course-card.status-finished { border-color: rgba(34, 197, 94, .55); }
.course-card.status-started { border-color: rgba(234, 179, 8, .6); }
.course-card.status-not-started { border-color: color-mix(in srgb, var(--accent) 42%, transparent); }
.course-card.status-finished:hover { border-color: rgba(34, 197, 94, .9); }
.course-card.status-started:hover { border-color: rgba(234, 179, 8, .9); }
.course-card.status-finished .progress > span { background: linear-gradient(90deg, #22c55e, #16a34a); }
.card-check {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex; flex: 0 0 auto;
  align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
  color: #16a34a; background: rgba(34, 197, 94, .14); border: 1px solid rgba(34, 197, 94, .45);
}


/* ---------- topic carousel (home) ---------- */
.topics {
  padding: 6px 0 4px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  overflow: hidden;
}
.topics-track { display: flex; width: max-content; gap: 14px; animation: topics-scroll 38s linear infinite; }
.topics:hover .topics-track { animation-play-state: paused; }
.topic-chip {
  display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto;
  padding: 10px 18px 10px 12px; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border);
  font-size: 15px; font-weight: 600; color: var(--text); white-space: nowrap;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.topic-chip:hover { transform: translateY(-3px); border-color: var(--accent-soft, rgba(255,49,49,.45)); box-shadow: 0 10px 26px rgba(255, 49, 49, .16); }
.topic-chip img { width: 34px; height: 34px; border-radius: 10px; display: block; }
@keyframes topics-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .topics-track { animation: none; }
  .topics { overflow-x: auto; }
}


/* ---------- course head: progress panel, challenge, jump ---------- */
.progress-panel { margin-top: 18px; }
.progress-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.progress-panel .progress-row { flex: 1 1 280px; max-width: 460px; }
.progress-panel.complete .progress > span { background: linear-gradient(90deg, #22c55e, #16a34a); }
.progress-panel.complete .progress { border-color: rgba(34, 197, 94, .45); }
.progress-extras { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.done-badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650;
  color: #16a34a; background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .32);
  padding: 6px 12px; border-radius: var(--radius-pill);
}
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn.copied { color: #16a34a; border-color: rgba(34, 197, 94, .5); }
.head-actions { margin-top: 18px; }
.btn-jump { animation: none; }
[hidden] { display: none !important; }

.video-card.flash {
  animation: flashCard 1.4s ease;
}
@keyframes flashCard {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 49, 49, 0); }
  25% { box-shadow: 0 0 0 4px var(--accent-softer), 0 18px 50px -20px var(--accent); }
}

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(10, 8, 10, .55);-webkit-backdrop-filter:blur(8px); backdrop-filter: blur(8px);
  animation: fadeIn .2s ease;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  width: min(480px, 100%); background: var(--surface); border: 1px solid var(--border);
  border-radius: 24px; padding: 32px 28px; text-align: center;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.55), 0 0 0 6px var(--accent-softer);
  animation: popIn .32s cubic-bezier(.2,.9,.3,1.2);
}
.modal-emoji { font-size: 44px; line-height: 1; margin-bottom: 10px; }
.modal h2 { margin: 0 0 10px; font-size: 26px; letter-spacing: -0.03em; }
.modal p { margin: 0 0 8px; color: var(--text); }
.modal p.muted { color: var(--text-muted); font-size: 14px; }
.modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
