:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --soft: #ecfeff;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --emerald: #10b981;
  --emerald-dark: #059669;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --dark: #0f172a;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
  width: min(1240px, calc(100% - 28px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 12px 24px rgba(6, 182, 212, 0.28);
}

.brand-text {
  font-size: 26px;
  background: linear-gradient(135deg, var(--emerald-dark), var(--cyan));
  -webkit-background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
}

.nav-link {
  color: #374151;
  font-weight: 700;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--emerald-dark);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.header-search input {
  width: 210px;
  border: 0;
  outline: 0;
  padding: 8px 8px 8px 14px;
  background: transparent;
}

.header-search button,
.search-page-form button {
  border: 0;
  color: #ffffff;
  cursor: pointer;
  font-weight: 800;
  padding: 9px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #ecfeff;
  cursor: pointer;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  display: block;
  margin: 4px auto;
  background: var(--dark);
}

.hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 52%, #2563eb 100%);
}

.hero-slider {
  position: relative;
  min-height: 720px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: saturate(1.15) contrast(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 15%, rgba(255, 255, 255, 0.32), transparent 24%),
    radial-gradient(circle at 85% 72%, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 610px;
  margin: 0 auto;
  padding: 118px 0 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-kicker,
.eyebrow {
  margin: 0 0 14px;
  color: var(--emerald-dark);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.hero-kicker {
  color: rgba(255, 255, 255, 0.9);
}

.hero h1 {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 23px);
}

.hero-tags,
.meta-chips,
.detail-tags,
.tag-row,
.quick-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.meta-chips span,
.detail-tags a,
.tag-row span,
.quick-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: inherit;
}

.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

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

.primary-btn {
  color: var(--dark);
  background: #ffffff;
  box-shadow: 0 16px 35px rgba(255, 255, 255, 0.22);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.movie-card:hover,
.category-tile:hover,
.overview-card:hover {
  transform: translateY(-3px);
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 148px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.48);
}

.hero-dot.active {
  width: 38px;
  background: #ffffff;
}

.hero-search-panel {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 34px;
  width: min(980px, calc(100% - 32px));
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(22px);
  transform: translateX(-50%);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
}

.hero-search-panel form,
.search-page-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.hero-search-panel input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(226, 232, 240, 0.95);
  outline: 0;
  border-radius: 999px;
  padding: 13px 18px;
  background: #ffffff;
  color: var(--text);
}

.hero-search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 0 26px;
  font-weight: 900;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald-dark), var(--cyan));
}

.quick-links {
  margin-top: 14px;
  color: #ffffff;
}

.section-block {
  padding: 72px 0;
}

.soft-section {
  background: linear-gradient(135deg, #ecfdf5, #ecfeff);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.section-heading h2,
.panel-head h2,
.content-card h2,
.side-card h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.ranking-hero p {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--emerald-dark);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.category-grid,
.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.category-tile,
.overview-card,
.movie-card,
.content-card,
.side-card,
.ranking-panel,
.player-card,
.wide-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: var(--surface);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.category-tile,
.overview-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile-images,
.overview-art {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px;
  min-height: 150px;
  background: linear-gradient(135deg, #d1fae5, #cffafe);
}

.tile-images img,
.overview-art img {
  width: 100%;
  height: 138px;
  object-fit: cover;
  border-radius: 14px;
}

.tile-copy,
.overview-copy {
  display: block;
  padding: 18px;
}

.tile-copy strong,
.overview-copy strong {
  display: block;
  margin-bottom: 6px;
  font-size: 20px;
}

.tile-copy small,
.overview-copy small,
.card-desc,
.wide-card small {
  color: var(--muted);
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: var(--shadow);
}

.card-link {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #d1fae5, #cffafe);
}

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

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.25);
}

.card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
}

.card-content strong {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  color: var(--emerald-dark);
  font-size: 12px;
  font-weight: 900;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  color: var(--emerald-dark);
  background: #ecfdf5;
  border: 1px solid #d1fae5;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 20px;
  border-radius: var(--radius);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-head a {
  color: var(--emerald-dark);
  font-weight: 900;
}

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

.wide-card {
  overflow: hidden;
  border-radius: 18px;
}

.wide-card a {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
}

.wide-card img {
  width: 88px;
  height: 116px;
  object-fit: cover;
  border-radius: 14px;
}

.wide-card em,
.wide-card strong,
.wide-card small {
  display: block;
  font-style: normal;
}

.wide-card em {
  color: var(--emerald-dark);
  font-size: 12px;
  font-weight: 900;
}

.wide-card strong {
  margin: 3px 0;
  font-weight: 900;
}

.page-hero,
.ranking-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan) 55%, var(--blue));
}

.page-hero .container {
  padding: 86px 0;
}

.compact-hero .container {
  padding: 62px 0;
}

.page-hero .eyebrow,
.ranking-hero .eyebrow,
.detail-copy .eyebrow {
  color: rgba(255, 255, 255, 0.9);
}

.page-hero h1,
.ranking-hero h1,
.detail-copy h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.page-hero p,
.ranking-hero p,
.detail-copy p {
  color: rgba(255, 255, 255, 0.88);
}

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

.overview-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 190px;
}

.overview-art {
  grid-template-columns: repeat(2, 1fr);
  min-height: 100%;
}

.overview-art img {
  height: 82px;
}

.preview-stack {
  display: grid;
  gap: 54px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px 170px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
}

.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.crumbs a:hover {
  text-decoration: underline;
}

.ranking-hero-inner {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 42px;
  align-items: center;
  padding: 78px 0;
}

.ranking-cover {
  overflow: hidden;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

.ranking-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.ranking-cover span {
  display: block;
  padding: 18px;
}

.ranking-cover strong,
.ranking-cover small {
  display: block;
}

.ranking-cover strong {
  font-size: 24px;
}

.ranking-cover small {
  color: rgba(255, 255, 255, 0.82);
}

.search-page-form {
  max-width: 720px;
  margin-top: 24px;
}

.detail-hero {
  min-height: 560px;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.26;
  filter: blur(5px) saturate(1.15);
  transform: scale(1.04);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.56));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 42px;
  align-items: center;
  padding: 78px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy p {
  max-width: 790px;
  font-size: 18px;
}

.meta-chips span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 26px;
  align-items: start;
}

.main-detail,
.detail-side {
  display: grid;
  gap: 20px;
}

.player-card,
.content-card,
.side-card {
  overflow: hidden;
  border-radius: var(--radius);
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.76));
}

.play-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.play-icon::before {
  content: "";
  margin-left: 7px;
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 28px solid var(--emerald-dark);
}

.play-cover strong {
  font-size: 22px;
}

.content-card,
.side-card {
  padding: 24px;
}

.content-card h2,
.side-card h2 {
  margin-bottom: 14px;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  color: #334155;
  font-size: 17px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 14px;
  margin: 0;
}

.side-card dt {
  color: var(--muted);
  font-weight: 800;
}

.side-card dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.detail-tags a {
  color: var(--emerald-dark);
  background: #ecfdf5;
  border: 1px solid #d1fae5;
}

.site-footer {
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  align-items: start;
}

.footer-inner p {
  margin: 14px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
}

.footer-links a {
  color: #475569;
  font-weight: 800;
}

.hidden-card {
  display: none !important;
}

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

  .site-nav {
    justify-content: flex-end;
  }

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

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .site-nav {
    order: 4;
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 0;
  }

  .site-nav.open {
    display: flex;
  }

  .nav-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
  }

  .hero,
  .hero-slider {
    min-height: 760px;
  }

  .hero-content {
    min-height: 560px;
    padding-top: 86px;
    padding-bottom: 260px;
  }

  .hero-search-panel form,
  .search-page-form,
  .filter-bar,
  .detail-hero-inner,
  .footer-inner,
  .overview-card {
    grid-template-columns: 1fr;
  }

  .hero-search-panel button,
  .search-page-form button {
    min-height: 48px;
  }

  .category-grid,
  .overview-grid,
  .movie-grid,
  .dense-grid,
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-heading,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-hero-inner {
    padding: 44px 0;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .container,
  .footer-inner,
  .header-inner {
    width: min(100% - 22px, 1180px);
  }

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

  .hero h1,
  .page-hero h1,
  .ranking-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

  .category-grid,
  .overview-grid,
  .movie-grid,
  .dense-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .tile-images {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-actions,
  .detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }
}
