* {
  box-sizing: border-box;
}

:root {
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --dark: #0f172a;
  --teal: #0d9488;
  --cyan: #0891b2;
  --blue: #2563eb;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef9fb 38%, #ffffff 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #ffffff;
  background: linear-gradient(90deg, #0d9488, #0891b2, #2563eb);
  box-shadow: 0 18px 35px rgba(8, 47, 73, 0.18);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.brand-text {
  font-size: 21px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 2px;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 8px;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: #ffffff;
  background: #07111f;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 34%, rgba(20, 184, 166, 0.24), transparent 35%), linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.65));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100% - 36px));
  margin-left: max(28px, calc((100vw - 1180px) / 2));
  padding: 34px;
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 12px;
  color: #67e8f9;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h2 {
  margin: 0;
  font-size: clamp(36px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.28);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.ghost-btn.dark {
  color: var(--text);
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.hero-panel {
  position: absolute;
  right: max(28px, calc((100vw - 1180px) / 2));
  bottom: 128px;
  z-index: 3;
  width: min(430px, calc(100% - 36px));
  padding: 26px;
  border-radius: 28px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.56);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-panel h1 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.22;
}

.hero-panel p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.75;
}

.search-wrap {
  position: relative;
}

.search-label {
  display: block;
  margin-bottom: 8px;
  color: inherit;
  font-size: 13px;
  font-weight: 800;
  opacity: 0.86;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 11px 10px;
  color: var(--text);
  background: transparent;
}

.search-box button {
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  cursor: pointer;
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  display: none;
  z-index: 20;
  max-height: 420px;
  overflow: auto;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  box-shadow: var(--shadow);
}

.search-results.is-open {
  display: grid;
  gap: 8px;
}

.search-results a {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.search-results a:hover {
  background: #ecfeff;
}

.search-results img {
  width: 58px;
  height: 76px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f172a, #0891b2);
}

.search-results strong,
.search-results em {
  display: block;
}

.search-results em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.empty-search {
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.hero-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-categories a {
  padding: 8px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.14);
}

.hero-thumbs {
  position: absolute;
  left: max(28px, calc((100vw - 1180px) / 2));
  right: max(28px, calc((100vw - 1180px) / 2));
  bottom: 28px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.hero-dot {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: center;
  border: 0;
  padding: 9px;
  border-radius: 18px;
  color: #ffffff;
  text-align: left;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active,
.hero-dot:hover {
  transform: translateY(-2px);
  background: rgba(20, 184, 166, 0.35);
}

.hero-dot img {
  width: 48px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f172a, #0891b2);
}

.hero-dot span {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0 0;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.section-title p {
  margin: 0 0 7px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-title a {
  color: var(--cyan);
  font-weight: 900;
}

.section-title.compact {
  display: block;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.movie-card.is-hidden {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #0891b2);
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
}

.duration,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(10px);
}

.duration {
  right: 10px;
  bottom: 10px;
  padding: 6px 9px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--amber), var(--rose));
}

.movie-card-body {
  padding: 18px;
}

.movie-meta {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.25;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.tag-list,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-list span,
.detail-tags span {
  padding: 6px 9px;
  border-radius: 999px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  background: #ccfbf1;
}

.highlight-section {
  width: min(1220px, calc(100% - 24px));
  padding: 50px 20px;
  margin-top: 70px;
  border-radius: 34px;
  background: linear-gradient(135deg, #ecfeff, #f0fdfa);
}

.split-section {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 24px;
  padding-bottom: 70px;
}

.panel-card {
  padding: 28px;
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.category-grid-mini,
.category-grid {
  display: grid;
  gap: 16px;
}

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

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

.category-grid-mini a,
.category-card {
  display: block;
  min-height: 132px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #ecfeff);
  box-shadow: inset 0 0 0 1px rgba(8, 145, 178, 0.12), 0 14px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-grid-mini a:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-grid-mini strong,
.category-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 21px;
}

.category-grid-mini span,
.category-card span {
  color: var(--muted);
  line-height: 1.7;
}

.ranking-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.ranking-list a {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-list a:hover {
  background: #ecfeff;
  transform: translateX(3px);
}

.ranking-list span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
}

.ranking-list strong,
.ranking-list em {
  display: block;
}

.ranking-list em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 38px auto 0;
  padding: 52px;
  border-radius: 34px;
  color: #ffffff;
  background: radial-gradient(circle at 78% 24%, rgba(103, 232, 249, 0.34), transparent 30%), linear-gradient(135deg, #0f172a, #0f766e 56%, #0891b2);
  box-shadow: var(--shadow);
}

.page-hero.slim h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 6vw, 62px);
  letter-spacing: -0.05em;
}

.page-hero.slim > p:not(.eyebrow) {
  max-width: 780px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.filter-bar input,
.filter-bar select {
  min-height: 48px;
  border: 0;
  outline: 0;
  border-radius: 16px;
  padding: 0 16px;
  color: var(--text);
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.filter-bar input {
  flex: 1;
  min-width: 260px;
}

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

.rank-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 38px auto 0;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 34px;
  align-items: center;
  padding: 36px;
  border-radius: 34px;
  color: #ffffff;
  background: radial-gradient(circle at 82% 18%, rgba(103, 232, 249, 0.34), transparent 28%), linear-gradient(135deg, #020617, #0f766e 62%, #0891b2);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 26px;
  background: linear-gradient(135deg, #0f172a, #0891b2);
  box-shadow: 0 28px 60px rgba(2, 6, 23, 0.35);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #67e8f9;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.lead {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
  line-height: 1.85;
}

.player-section {
  padding-top: 48px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.58));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 30px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 20px 45px rgba(8, 145, 178, 0.35);
}

.player-overlay strong {
  font-size: 18px;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  padding-bottom: 70px;
}

.article-card,
.related-card {
  padding: 30px;
  border-radius: 30px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.article-card h2,
.related-card h2 {
  margin: 0 0 16px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.article-card p {
  margin: 0 0 26px;
  color: #334155;
  font-size: 17px;
  line-height: 1.9;
}

.article-card p:last-child {
  margin-bottom: 0;
}

.compact-list {
  display: grid;
  gap: 12px;
}

.compact-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  background: #ecfeff;
  transform: translateX(3px);
}

.compact-card img {
  width: 74px;
  height: 98px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #0891b2);
}

.compact-card strong,
.compact-card em,
.compact-card small {
  display: block;
}

.compact-card strong {
  font-size: 16px;
  line-height: 1.3;
}

.compact-card em {
  margin-top: 5px;
  color: var(--cyan);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.compact-card small {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #1e293b, #0f172a);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 34px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 20px;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: #cbd5e1;
}

.footer-links a:hover {
  color: #67e8f9;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  display: none;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: var(--shadow);
  cursor: pointer;
  z-index: 90;
}

.back-top.is-visible {
  display: block;
}

@media (max-width: 1100px) {
  .movie-grid,
  .rank-grid,
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-panel {
    position: relative;
    right: auto;
    bottom: auto;
    margin: 360px 18px 140px auto;
  }

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

  .detail-hero,
  .detail-layout,
  .split-section {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 320px;
  }
}

@media (max-width: 760px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-nav.is-open {
    display: block;
  }

  .hero {
    min-height: 820px;
  }

  .hero-content {
    margin: 40px 16px 0;
    padding: 24px;
  }

  .hero-panel {
    width: auto;
    margin: 280px 16px 140px;
    padding: 22px;
  }

  .hero-thumbs {
    left: 16px;
    right: 16px;
    grid-template-columns: 1fr 1fr;
  }

  .hero-dot:nth-child(n + 5) {
    display: none;
  }

  .section,
  .page-hero,
  .detail-hero {
    width: min(100% - 24px, 1180px);
  }

  .section {
    padding-top: 48px;
  }

  .page-hero,
  .detail-hero {
    padding: 28px;
    border-radius: 26px;
  }

  .movie-grid,
  .large-grid,
  .rank-grid,
  .catalog-grid,
  .category-grid,
  .category-grid-mini,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-title,
  .footer-bottom {
    align-items: start;
    flex-direction: column;
  }

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

  .article-card,
  .related-card,
  .panel-card {
    padding: 22px;
    border-radius: 24px;
  }
}
