:root {
  color-scheme: dark;
  --bg: #080a0d;
  --panel: #11151b;
  --panel-soft: #18202a;
  --text: #f7f8fa;
  --muted: #909aa8;
  --line: #26303c;
  --accent: #20d6a3;
  --accent-2: #e9b95f;
  --danger: #ff6b6b;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* WAICORE-inspired movie app skin */
:root {
  --bg: #070b13;
  --panel: #0d1320;
  --panel-soft: #111827;
  --panel-deep: #090e18;
  --text: #f8fafc;
  --muted: #98a2b3;
  --line: #1d2638;
  --accent: #4d8dff;
  --accent-strong: #168cff;
  --accent-2: #7aa7ff;
  --danger: #ff7474;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background:
    radial-gradient(circle at 50% -10%, rgba(42, 123, 255, .16), transparent 34rem),
    linear-gradient(180deg, #070a12 0%, #080d17 44%, #060912 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(89, 128, 194, .14) 1px, transparent 1px);
  background-size: calc(100% - 40px) 100%;
  background-position: 20px 0;
  opacity: .55;
}

.app-shell {
  max-width: 1040px;
  padding-top: 104px;
}

.desktop-header {
  top: 0;
  width: 100%;
  min-height: 84px;
  border-width: 0 0 1px;
  border-radius: 0;
  background: rgba(6, 10, 18, .92);
  box-shadow: none;
  padding: 16px max(20px, calc((100vw - 1040px) / 2));
}

.wordmark {
  gap: 14px;
  color: var(--text);
  font-size: 28px;
  letter-spacing: .01em;
}

.brand-icon,
.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  color: #050810;
  font-weight: 950;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
}

.desktop-header nav {
  justify-content: flex-end;
}

.top-nav-link,
.logout-link {
  border: 1px solid var(--line);
  background: rgba(11, 17, 29, .66);
  color: #b7c1d3;
  min-height: 46px;
  border-radius: 8px;
}

.top-nav-link.active,
.logout-link:hover {
  color: white;
  background: linear-gradient(180deg, #5194ff, #3c78ea);
  border-color: #2b62c5;
}

.home-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 560px;
  align-content: end;
  padding: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(9, 14, 24, .12), #080d17 68%),
    radial-gradient(circle at 70% 12%, rgba(76, 141, 255, .2), transparent 28rem),
    #090e18;
}

.home-hero::before {
  content: "root@moviecore: -\A\A$ [НОВИНКА] Найдите свежие фильмы и сериалы из TMDB.\A\A$ [СПИСКИ] Сохраняйте: хочу, смотрю, просмотрено.\A\A$ [СЕРИИ] Закрывайте сезоны одним нажатием.\A\A$ [СТАТУС] Уведомления о новых эпизодах активны.\A\A$";
  white-space: pre-wrap;
  display: block;
  width: min(100%, 760px);
  min-height: 260px;
  margin: 120px auto 26px;
  padding: 28px 34px;
  border: 1px solid #1b2638;
  border-top: 16px solid #148cff;
  border-radius: 8px;
  background: #0a0f1a;
  color: #9da8ba;
  font-size: clamp(15px, 2.7vw, 22px);
  line-height: 1.45;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .34);
}

.hero-copy {
  text-align: center;
}

.hero-copy h1 {
  max-width: 860px;
  margin: 0 auto;
  font-size: clamp(44px, 8vw, 84px);
  line-height: .98;
  color: white;
}

.hero-copy p:last-child {
  max-width: 680px;
  margin: 22px auto 0;
  color: #a8b1c2;
  font-size: clamp(18px, 3vw, 26px);
}

.eyebrow {
  color: #80b4ff;
  letter-spacing: .24em;
}

.global-search,
.search-row {
  border: 1px solid #2a64c5;
  background: rgba(10, 16, 28, .86);
  padding: 10px;
}

input {
  min-height: 54px;
  border-color: var(--line);
  background: #080d17;
  color: white;
  font-size: 16px;
}

button,
.wide-button,
.ghost-link,
.icon-button,
.mini-button,
.floating-action {
  min-height: 52px;
  border-radius: 8px;
  background: linear-gradient(180deg, #5898ff, #3f7bea);
  color: white;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}

.secondary,
.ghost-link {
  background: #101827;
  color: #c4ccdb;
  border: 1px solid var(--line);
}

.hero-strip,
.stats-grid {
  gap: 12px;
}

.hero-strip > div,
.hero-strip > a,
.stat-card,
.empty-card,
.progress-box,
.overview,
.season-row,
.episode-row,
.search-card,
.media-card,
.info-grid > div,
.cast-list,
.notification-card {
  background: rgba(10, 16, 28, .92);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-strip > div,
.hero-strip > a {
  min-height: 116px;
  align-content: center;
}

.hero-strip strong {
  color: white;
  font-size: 38px;
}

.stat-card {
  min-height: 110px;
  color: #b9c4d6;
}

.stat-card span {
  font-size: 24px;
}

.stat-card strong {
  color: white;
  font-size: 34px;
}

.stat-card:hover,
.media-card:hover,
.search-card:hover,
.notification-card:hover,
.season-row:hover {
  border-color: #326bd2;
  background: #0d1524;
}

.media-grid {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}

.media-card {
  padding: 10px;
}

.poster {
  border-radius: 8px;
  border: 1px solid #202a3d;
}

.media-meta {
  padding: 12px 2px 2px;
}

.media-meta h3 {
  color: white;
}

.section-head {
  margin-top: 18px;
}

.section-head h2,
.overview h2,
.cast-list h2 {
  color: white;
  font-size: 22px;
}

.section-head a {
  color: #80b4ff;
}

.detail-hero {
  align-items: center;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(77, 141, 255, .14), transparent 42%),
    rgba(10, 16, 28, .92);
}

.detail-copy h1 {
  color: white;
  font-size: clamp(28px, 6vw, 52px);
}

.rating {
  color: #80b4ff;
}

.pill {
  background: #101827;
  border: 1px solid var(--line);
  color: #c4ccdb;
}

.pill.active {
  background: linear-gradient(180deg, #5898ff, #3f7bea);
  color: white;
  border-color: #326bd2;
}

.bottom-nav {
  border-radius: 24px;
  background: rgba(8, 12, 20, .92);
}

.nav-item.active {
  background: linear-gradient(180deg, #5898ff, #3f7bea);
  color: white;
}

.floating-action {
  position: fixed;
  right: max(18px, calc((100vw - 1040px) / 2));
  bottom: 86px;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 22px;
  box-shadow: 0 18px 50px rgba(65, 88, 255, .34);
}

.floating-action span {
  font-size: 26px;
  line-height: 1;
}

.login-panel {
  background: rgba(10, 16, 28, .96);
}

@media (max-width: 560px) {
  body::before {
    background-size: calc(100% - 32px) 100%;
    background-position: 16px 0;
  }

  .app-shell {
    padding: 18px 20px 108px;
  }

  .home-hero {
    min-height: 620px;
    margin-left: -4px;
    margin-right: -4px;
    padding: 20px 14px 26px;
  }

  .home-hero::before {
    min-height: 270px;
    margin-top: 126px;
    padding: 22px 20px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-copy p:last-child {
    font-size: 20px;
  }

  .global-search {
    margin-top: 22px;
  }

  .hero-strip > div,
  .hero-strip > a,
  .stat-card,
  .search-card,
  .season-row,
  .episode-row {
    min-height: 72px;
  }

  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .floating-action {
    right: 18px;
    bottom: 104px;
    min-height: 68px;
    padding: 0 24px;
    font-size: 20px;
  }
}

/* Last-mile overrides: no terminal hero, no floating search, liquid glass nav */
.home-hero::before {
  content: none !important;
  display: none !important;
}

.home-hero {
  min-height: auto !important;
  align-content: center !important;
  gap: 28px !important;
  padding: clamp(24px, 6vw, 54px) !important;
  background:
    linear-gradient(135deg, rgba(79, 143, 255, .2), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .02)),
    rgba(9, 15, 27, .74) !important;
  backdrop-filter: blur(18px) saturate(1.28);
  -webkit-backdrop-filter: blur(18px) saturate(1.28);
}

.hero-copy {
  text-align: left !important;
}

.hero-copy h1 {
  margin: 0 !important;
  font-size: clamp(38px, 7vw, 72px) !important;
  line-height: 1 !important;
}

.hero-copy p:last-child {
  margin: 18px 0 0 !important;
  max-width: 700px !important;
  font-size: clamp(16px, 2.5vw, 22px) !important;
}

.floating-action {
  display: none !important;
}

.bottom-nav {
  bottom: 14px !important;
  width: min(560px, calc(100% - 24px)) !important;
  gap: 6px !important;
  padding: 8px !important;
  border: 1px solid rgba(210, 226, 255, .24) !important;
  border-radius: 28px !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .06) 45%, rgba(255, 255, 255, .12)),
    rgba(10, 16, 28, .54) !important;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .42),
    inset 0 -1px 1px rgba(255, 255, 255, .08),
    0 22px 60px rgba(0, 0, 0, .46) !important;
  backdrop-filter: blur(26px) saturate(1.75) !important;
  -webkit-backdrop-filter: blur(26px) saturate(1.75) !important;
}

.nav-item {
  min-height: 48px !important;
  border-radius: 20px !important;
  color: rgba(232, 238, 249, .72) !important;
}

.nav-item.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .08)),
    rgba(79, 143, 255, .8) !important;
  color: white !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    0 10px 22px rgba(47, 107, 220, .32) !important;
}

.topbar,
.home-hero,
.detail-hero,
.media-card,
.search-card,
.season-row,
.episode-row,
.notification-card,
.overview,
.cast-list,
.info-grid > div,
.progress-box,
.empty-card,
.stat-card,
.hero-strip > div,
.hero-strip > a {
  border: 1px solid rgba(148, 178, 230, .16) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)),
    rgba(9, 15, 27, .74) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 18px 50px rgba(0, 0, 0, .22) !important;
  backdrop-filter: blur(18px) saturate(1.28);
  -webkit-backdrop-filter: blur(18px) saturate(1.28);
}

@media (max-width: 560px) {
  .desktop-header {
    display: grid !important;
    min-height: 82px !important;
    grid-template-columns: 1fr auto !important;
    padding: 14px 20px !important;
  }

  .desktop-header nav,
  .logout-link {
    display: none !important;
  }

  .app-shell {
    padding: 100px 16px 112px !important;
  }

  .home-hero {
    margin: 0 !important;
    padding: 24px 18px !important;
  }

  .bottom-nav {
    width: calc(100% - 22px) !important;
  }
}

/* Unified glass redesign */
:root {
  --bg: #060a12;
  --panel: rgba(10, 16, 28, .78);
  --panel-soft: rgba(16, 24, 39, .76);
  --text: #f8fafc;
  --muted: #9aa6ba;
  --line: rgba(132, 163, 214, .18);
  --accent: #4f8fff;
  --accent-strong: #168cff;
  --accent-2: #8bb8ff;
}

body {
  background:
    radial-gradient(circle at 20% 0%, rgba(44, 125, 255, .2), transparent 26rem),
    radial-gradient(circle at 95% 18%, rgba(114, 96, 255, .12), transparent 24rem),
    linear-gradient(180deg, #060a12 0%, #08101d 52%, #060a12 100%);
}

body::before {
  background-image:
    linear-gradient(90deg, rgba(120, 157, 220, .12) 1px, transparent 1px),
    linear-gradient(180deg, rgba(120, 157, 220, .06) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: 0 0;
  opacity: .34;
}

.app-shell {
  gap: 16px;
  padding-bottom: 112px;
}

.desktop-header {
  background: rgba(7, 11, 20, .72);
  border-color: rgba(142, 171, 220, .14);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
}

.top-nav-link,
.logout-link,
.global-search,
.search-row,
.hero-strip > div,
.hero-strip > a,
.stat-card,
.empty-card,
.progress-box,
.overview,
.season-row,
.episode-row,
.search-card,
.media-card,
.info-grid > div,
.cast-list,
.notification-card,
.detail-hero,
.login-panel,
.live-results {
  border: 1px solid rgba(148, 178, 230, .16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)),
    rgba(9, 15, 27, .74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 18px 50px rgba(0, 0, 0, .22);
  backdrop-filter: blur(18px) saturate(1.28);
  -webkit-backdrop-filter: blur(18px) saturate(1.28);
}

.home-hero {
  min-height: auto;
  align-content: center;
  gap: 28px;
  padding: clamp(24px, 6vw, 54px);
  background:
    linear-gradient(135deg, rgba(79, 143, 255, .2), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, .065), rgba(255, 255, 255, .02)),
    rgba(9, 15, 27, .74);
  backdrop-filter: blur(18px) saturate(1.28);
  -webkit-backdrop-filter: blur(18px) saturate(1.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .1),
    0 24px 80px rgba(0, 0, 0, .3);
}

.home-hero::before {
  content: none;
}

.hero-copy {
  text-align: left;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1;
}

.hero-copy p:last-child {
  margin: 18px 0 0;
  max-width: 700px;
  font-size: clamp(16px, 2.5vw, 22px);
}

.global-search {
  max-width: 760px;
}

.topbar {
  min-height: 116px;
  padding: 22px;
  border: 1px solid rgba(148, 178, 230, .16);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(79, 143, 255, .16), transparent 42%),
    rgba(9, 15, 27, .74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 18px 50px rgba(0, 0, 0, .22);
  backdrop-filter: blur(18px) saturate(1.28);
  -webkit-backdrop-filter: blur(18px) saturate(1.28);
}

.topbar h1 {
  color: white;
  font-size: clamp(30px, 6vw, 58px);
  line-height: 1;
}

.media-card,
.search-card,
.season-row,
.episode-row,
.notification-card {
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.media-card:hover,
.search-card:hover,
.season-row:hover,
.episode-row:hover,
.notification-card:hover {
  transform: translateY(-2px);
  border-color: rgba(98, 154, 255, .46);
}

button,
.wide-button,
.ghost-link,
.icon-button,
.mini-button {
  border: 1px solid rgba(137, 177, 255, .25);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .05)),
    linear-gradient(180deg, #5798ff, #3977ea);
}

.secondary,
.ghost-link,
.pill {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)),
    rgba(13, 21, 35, .76);
}

.bottom-nav {
  bottom: 14px;
  width: min(560px, calc(100% - 24px));
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(210, 226, 255, .24);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .06) 45%, rgba(255, 255, 255, .12)),
    rgba(10, 16, 28, .54);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .42),
    inset 0 -1px 1px rgba(255, 255, 255, .08),
    0 22px 60px rgba(0, 0, 0, .46);
  backdrop-filter: blur(26px) saturate(1.75);
  -webkit-backdrop-filter: blur(26px) saturate(1.75);
}

.nav-item {
  min-height: 48px;
  border-radius: 20px;
  color: rgba(232, 238, 249, .72);
}

.nav-item.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, .08)),
    rgba(79, 143, 255, .8);
  color: white;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    0 10px 22px rgba(47, 107, 220, .32);
}

.floating-action {
  display: none;
}

@media (max-width: 560px) {
  .app-shell {
    padding: 18px 16px 112px;
  }

  .desktop-header {
    display: grid;
    min-height: 82px;
    grid-template-columns: 1fr auto;
    padding: 14px 20px;
  }

  .desktop-header nav,
  .logout-link {
    display: none;
  }

  .wordmark {
    font-size: 28px;
    padding: 0;
  }

  .home-hero {
    margin: 0;
    min-height: auto;
    padding: 24px 18px;
  }

  .hero-copy {
    text-align: left;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .hero-copy p:last-child {
    font-size: 18px;
  }

  .topbar {
    min-height: 104px;
    padding: 18px;
  }

  .bottom-nav {
    width: calc(100% - 22px);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(32, 214, 163, .07) 0%, transparent 32rem),
    linear-gradient(180deg, #0d1015 0%, var(--bg) 48%);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.app-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 86px 16px 96px;
  display: grid;
  gap: 18px;
}

.auth-page {
  display: grid;
  place-items: center;
}

.auth-page .app-shell {
  width: min(420px, 100%);
  padding: 24px;
}

.login-panel {
  background: rgba(23, 26, 33, .92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--accent);
  color: #05110f;
  font-weight: 900;
  margin-bottom: 18px;
}

.login-panel h1,
.topbar h1,
.detail-copy h1 {
  margin: 0;
  letter-spacing: 0;
}

.login-panel p,
.media-meta p,
.overview p {
  color: var(--muted);
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  background: #0b0e13;
  color: var(--text);
  border-radius: var(--radius);
  padding: 13px 14px;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(38, 208, 168, .15);
}

button,
.wide-button,
.ghost-link,
.icon-button,
.mini-button {
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #06110f;
  font-weight: 800;
  padding: 12px 16px;
  cursor: pointer;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 13px;
  white-space: nowrap;
}

.secondary {
  background: var(--panel-soft);
  color: var(--text);
}

.desktop-header {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1120px, calc(100% - 24px));
  min-height: 58px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 10, 13, .88);
  backdrop-filter: blur(18px);
  z-index: 20;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  font-weight: 900;
}

.desktop-header nav {
  display: flex;
  justify-content: center;
  gap: 4px;
}

.top-nav-link,
.logout-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.top-nav-link.active,
.logout-link:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.nav-badge {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--accent-2);
  color: #111;
  font-size: 11px;
}

.ghost-link {
  background: var(--panel-soft);
  color: var(--text);
}

.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 24px;
}

.form-error {
  margin: 0;
  color: var(--danger);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.hero-strip,
.stats-grid,
.action-row {
  display: grid;
  gap: 10px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  align-items: end;
  gap: 24px;
  min-height: 260px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(32, 214, 163, .18), transparent 46%),
    linear-gradient(145deg, rgba(255, 255, 255, .035), rgba(17, 21, 27, .82)),
    #10141a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.hero-copy h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: .95;
}

.hero-copy p:last-child {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.global-search {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 10, 13, .74);
}

.hero-strip {
  grid-template-columns: repeat(3, 1fr);
}

.hero-strip > div,
.hero-strip > a,
.stat-card,
.empty-card,
.progress-box,
.overview,
.season-row,
.episode-row,
.search-card {
  background: rgba(23, 26, 33, .9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.hero-strip > div,
.hero-strip > a {
  padding: 16px;
}

.hero-strip strong {
  display: block;
  font-size: 30px;
}

.hero-strip span,
.stat-card em,
.media-meta span,
.episode-row span,
.search-card span {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.stats-grid {
  grid-template-columns: repeat(3, 1fr);
}

.stat-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  min-height: 112px;
  align-content: center;
}

.stat-card strong {
  font-size: 26px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 -4px;
}

.section-head h2,
.overview h2 {
  margin: 0;
  font-size: 18px;
}

.section-head a {
  color: var(--accent);
  font-weight: 800;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 14px;
}

.media-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.media-card:hover,
.search-card:hover,
.notification-card:hover,
.season-row:hover {
  border-color: rgba(32, 214, 163, .45);
  background: #141a22;
}

.media-card:hover {
  transform: translateY(-2px);
}

.poster {
  aspect-ratio: 2 / 3;
  background: var(--panel-soft);
  overflow: hidden;
}

.poster.small {
  width: 58px;
  height: 84px;
  flex: 0 0 auto;
  border-radius: var(--radius);
}

.poster.tiny {
  width: 46px;
  height: 68px;
  flex: 0 0 auto;
  border-radius: 6px;
}

.poster img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.poster-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.media-meta {
  padding: 10px;
}

.media-meta h3 {
  min-height: 42px;
  margin: 4px 0 8px;
  font-size: 15px;
  line-height: 1.25;
}

.search-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 0;
}

.detail-hero {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 16px;
  align-items: end;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 21, 27, .72);
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.detail-copy h1 {
  font-size: 28px;
  line-height: 1.05;
}

.rating {
  display: inline-flex;
  margin-top: 12px;
  color: var(--accent-2);
  font-weight: 900;
}

.action-row {
  grid-template-columns: repeat(3, 1fr);
}

.action-row form,
.action-row button {
  width: 100%;
}

.pill {
  background: var(--panel-soft);
  color: var(--text);
}

.pill.active {
  background: var(--accent);
  color: #06110f;
}

.wide-button,
.progress-box,
.overview {
  display: block;
  padding: 14px;
}

.progress-box strong {
  display: block;
  font-size: 24px;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  margin-bottom: 12px;
}

.season-list,
.episode-list,
.search-results {
  display: grid;
  gap: 12px;
}

.season-row,
.episode-row,
.search-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.episode-row {
  justify-content: flex-start;
  text-align: left;
}

.episode-toggle {
  width: 42px;
  height: 42px;
  padding: 0;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--panel-soft);
  color: var(--text);
}

.episode-toggle.done {
  background: var(--accent);
  color: #06110f;
}

.search-card {
  justify-content: flex-start;
}

.search-copy {
  min-width: 0;
  flex: 1;
}

.search-copy strong,
.search-copy span,
.search-copy p {
  display: block;
}

.search-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.search-card button {
  margin-left: auto;
  white-space: nowrap;
}

.live-search {
  z-index: 5;
}

.live-results {
  display: none;
  grid-column: 1 / -1;
  width: 100%;
  max-height: 440px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 10, 13, .98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .38);
}

.global-search .live-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
}

.live-results.visible {
  display: grid;
  gap: 6px;
}

.live-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
}

.live-result:hover {
  background: var(--panel);
}

.live-result-copy {
  min-width: 0;
}

.live-result-copy strong,
.live-result-copy span,
.live-result-copy p {
  display: block;
}

.live-result-copy span,
.live-result-copy p,
.live-empty {
  color: var(--muted);
  font-size: 13px;
}

.live-result-copy p {
  margin: 4px 0 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.live-empty {
  padding: 12px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.info-grid > div,
.cast-list,
.notification-card {
  background: rgba(23, 26, 33, .9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.info-grid > div {
  padding: 13px;
}

.info-grid span,
.notification-card span,
.cast-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.tagline {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cast-list {
  padding: 16px;
}

.cast-list h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.cast-list > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.season-row {
  padding: 0;
}

.season-row > a {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.season-row form {
  padding-right: 12px;
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
}

.notification-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.notification-card em {
  align-self: start;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.notification-card.unread {
  border-color: rgba(38, 208, 168, .55);
}

.notification-card.unread em {
  background: var(--accent);
  color: #06110f;
}

.empty-card,
.empty-state {
  padding: 18px;
  color: var(--muted);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: min(620px, calc(100% - 20px));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 17, 21, .92);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .4);
  z-index: 10;
}

.nav-item {
  display: grid;
  place-items: center;
  min-height: 42px;
  color: var(--muted);
  border-radius: 6px;
  padding: 0 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
}

.nav-item.active {
  background: var(--panel-soft);
  color: var(--text);
}

@media (max-width: 560px) {
  .app-shell {
    padding: 18px 12px 88px;
  }

  .desktop-header {
    display: none;
  }

  .home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 18px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .global-search {
    grid-template-columns: 1fr;
  }

  .hero-strip {
    grid-template-columns: 1fr;
  }

  .topbar h1 {
    font-size: 26px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    grid-template-columns: auto auto 1fr;
    align-items: center;
  }

  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-hero {
    grid-template-columns: 104px 1fr;
  }

  .detail-copy h1 {
    font-size: 23px;
  }

  .action-row {
    grid-template-columns: 1fr;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .search-row .live-results {
    grid-column: 1;
  }

  .search-card {
    align-items: center;
    flex-wrap: wrap;
  }

  .search-card button {
    padding: 10px 12px;
  }

  .season-row {
    align-items: stretch;
    flex-direction: column;
  }

  .season-row form {
    padding: 0 12px 12px;
  }

  .season-row button {
    width: 100%;
  }

  .notification-card {
    display: grid;
  }

  .live-result {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .live-result > form,
  .live-result > .mini-button {
    grid-column: 1 / -1;
  }
}

/* Final WAICORE-inspired overrides */
:root {
  --bg: #070b13;
  --panel: #0d1320;
  --panel-soft: #111827;
  --panel-deep: #090e18;
  --text: #f8fafc;
  --muted: #98a2b3;
  --line: #1d2638;
  --accent: #4d8dff;
  --accent-strong: #168cff;
  --accent-2: #7aa7ff;
  --danger: #ff7474;
  --radius: 8px;
}

body {
  background:
    radial-gradient(circle at 50% -10%, rgba(42, 123, 255, .16), transparent 34rem),
    linear-gradient(180deg, #070a12 0%, #080d17 44%, #060912 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(89, 128, 194, .14) 1px, transparent 1px);
  background-size: calc(100% - 40px) 100%;
  background-position: 20px 0;
  opacity: .55;
}

.app-shell {
  max-width: 1040px;
  padding-top: 104px;
}

.desktop-header {
  top: 0;
  width: 100%;
  min-height: 84px;
  border-width: 0 0 1px;
  border-radius: 0;
  background: rgba(6, 10, 18, .92);
  box-shadow: none;
  padding: 16px max(20px, calc((100vw - 1040px) / 2));
}

.wordmark {
  gap: 14px;
  color: var(--text);
  font-size: 28px;
  letter-spacing: .01em;
}

.brand-icon,
.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  color: #050810;
  font-weight: 950;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
}

.desktop-header nav {
  justify-content: flex-end;
}

.top-nav-link,
.logout-link {
  border: 1px solid var(--line);
  background: rgba(11, 17, 29, .66);
  color: #b7c1d3;
  min-height: 46px;
  border-radius: 8px;
}

.top-nav-link.active,
.logout-link:hover {
  color: white;
  background: linear-gradient(180deg, #5194ff, #3c78ea);
  border-color: #2b62c5;
}

.home-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 560px;
  align-content: end;
  padding: 28px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(9, 14, 24, .12), #080d17 68%),
    radial-gradient(circle at 70% 12%, rgba(76, 141, 255, .2), transparent 28rem),
    #090e18;
}

.home-hero::before {
  content: "root@moviecore: -\A\A$ [НОВИНКА] Найдите свежие фильмы и сериалы из TMDB.\A\A$ [СПИСКИ] Сохраняйте: хочу, смотрю, просмотрено.\A\A$ [СЕРИИ] Закрывайте сезоны одним нажатием.\A\A$ [СТАТУС] Уведомления о новых эпизодах активны.\A\A$";
  white-space: pre-wrap;
  display: block;
  width: min(100%, 760px);
  min-height: 260px;
  margin: 120px auto 26px;
  padding: 28px 34px;
  border: 1px solid #1b2638;
  border-top: 16px solid #148cff;
  border-radius: 8px;
  background: #0a0f1a;
  color: #9da8ba;
  font-size: clamp(15px, 2.7vw, 22px);
  line-height: 1.45;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .34);
}

.hero-copy {
  text-align: center;
}

.hero-copy h1 {
  max-width: 860px;
  margin: 0 auto;
  font-size: clamp(44px, 8vw, 84px);
  line-height: .98;
  color: white;
}

.hero-copy p:last-child {
  max-width: 680px;
  margin: 22px auto 0;
  color: #a8b1c2;
  font-size: clamp(18px, 3vw, 26px);
}

.eyebrow {
  color: #80b4ff;
  letter-spacing: .24em;
}

.global-search,
.search-row {
  border: 1px solid #2a64c5;
  background: rgba(10, 16, 28, .86);
  padding: 10px;
}

input {
  min-height: 54px;
  border-color: var(--line);
  background: #080d17;
  color: white;
  font-size: 16px;
}

button,
.wide-button,
.ghost-link,
.icon-button,
.mini-button,
.floating-action {
  min-height: 52px;
  border-radius: 8px;
  background: linear-gradient(180deg, #5898ff, #3f7bea);
  color: white;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}

.secondary,
.ghost-link {
  background: #101827;
  color: #c4ccdb;
  border: 1px solid var(--line);
}

.hero-strip,
.stats-grid {
  gap: 12px;
}

.hero-strip > div,
.hero-strip > a,
.stat-card,
.empty-card,
.progress-box,
.overview,
.season-row,
.episode-row,
.search-card,
.media-card,
.info-grid > div,
.cast-list,
.notification-card {
  background: rgba(10, 16, 28, .92);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero-strip > div,
.hero-strip > a {
  min-height: 116px;
  align-content: center;
}

.hero-strip strong {
  color: white;
  font-size: 38px;
}

.stat-card {
  min-height: 110px;
  color: #b9c4d6;
}

.stat-card span {
  font-size: 24px;
}

.stat-card strong {
  color: white;
  font-size: 34px;
}

.stat-card:hover,
.media-card:hover,
.search-card:hover,
.notification-card:hover,
.season-row:hover {
  border-color: #326bd2;
  background: #0d1524;
}

.media-grid {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}

.media-card {
  padding: 10px;
}

.poster {
  border-radius: 8px;
  border: 1px solid #202a3d;
}

.media-meta {
  padding: 12px 2px 2px;
}

.media-meta h3 {
  color: white;
}

.section-head {
  margin-top: 18px;
}

.section-head h2,
.overview h2,
.cast-list h2 {
  color: white;
  font-size: 22px;
}

.section-head a {
  color: #80b4ff;
}

.detail-hero {
  align-items: center;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(77, 141, 255, .14), transparent 42%),
    rgba(10, 16, 28, .92);
}

.detail-copy h1 {
  color: white;
  font-size: clamp(28px, 6vw, 52px);
}

.rating {
  color: #80b4ff;
}

.pill {
  background: #101827;
  border: 1px solid var(--line);
  color: #c4ccdb;
}

.pill.active {
  background: linear-gradient(180deg, #5898ff, #3f7bea);
  color: white;
  border-color: #326bd2;
}

.bottom-nav {
  border-radius: 24px;
  background: rgba(8, 12, 20, .92);
}

.nav-item.active {
  background: linear-gradient(180deg, #5898ff, #3f7bea);
  color: white;
}

.floating-action {
  position: fixed;
  right: max(18px, calc((100vw - 1040px) / 2));
  bottom: 86px;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 22px;
  box-shadow: 0 18px 50px rgba(65, 88, 255, .34);
}

.floating-action span {
  font-size: 26px;
  line-height: 1;
}

.login-panel {
  background: rgba(10, 16, 28, .96);
}

@media (max-width: 560px) {
  body::before {
    background-size: calc(100% - 32px) 100%;
    background-position: 16px 0;
  }

  .app-shell {
    padding: 18px 20px 108px;
  }

  .home-hero {
    grid-template-columns: 1fr;
    min-height: 620px;
    margin-left: -4px;
    margin-right: -4px;
    padding: 20px 14px 26px;
  }

  .home-hero::before {
    min-height: 270px;
    margin-top: 126px;
    padding: 22px 20px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-copy p:last-child {
    font-size: 20px;
  }

  .global-search {
    margin-top: 22px;
  }

  .hero-strip > div,
  .hero-strip > a,
  .stat-card,
  .search-card,
  .season-row,
  .episode-row {
    min-height: 72px;
  }

  .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .floating-action {
    right: 18px;
    bottom: 104px;
    min-height: 68px;
    padding: 0 24px;
    font-size: 20px;
  }
}
