:root {
  --color-primary: #115e59;
  --color-primary-light: #14b8a6;
  --color-primary-dark: #0f4b47;
  --color-secondary: #d97706;
  --color-accent: #0e7490;
  --color-bg: #f8fafc;
  --color-soft: #ecfeff;
  --color-card: #ffffff;
  --color-text: #111827;
  --color-muted: #64748b;
  --color-line: #e5e7eb;
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 18px 45px rgba(13, 148, 136, 0.22);
  --radius-lg: 18px;
  --radius-md: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.bg-white {
  background: #ffffff;
}

.bg-soft {
  background: linear-gradient(135deg, #f0fdfa, #ecfeff 58%, #ffffff);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--color-line);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

.nav-shell {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-primary);
  min-width: max-content;
}

.brand-icon,
.footer-brand span {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  box-shadow: 0 8px 20px rgba(13, 148, 136, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: var(--color-muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #334155;
  font-weight: 600;
  white-space: nowrap;
}

.desktop-nav a {
  position: relative;
  padding: 22px 0;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--color-primary);
}

.desktop-nav a:hover::after {
  transform: scaleX(1);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-menu input,
.filter-panel input,
.filter-panel select,
.hero-search-card input {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--color-text);
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.mobile-menu input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.hero-search-card input:focus {
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16);
}

.nav-search button,
.mobile-menu button,
.filter-panel button,
.hero-search-card button,
.btn-primary {
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(13, 148, 136, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.mobile-menu button:hover,
.filter-panel button:hover,
.hero-search-card button:hover,
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary,
.btn-ghost {
  border-radius: 12px;
  padding: 11px 18px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-secondary {
  color: var(--color-primary);
  background: #ccfbf1;
}

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

.btn-secondary:hover,
.btn-ghost:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--color-primary);
  background: #f0fdfa;
  font-weight: 700;
}

.mobile-menu {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--color-line);
  background: #ffffff;
}

.mobile-menu.is-open {
  display: grid;
  gap: 12px;
}

.mobile-menu form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.mobile-menu a {
  padding: 10px 12px;
  border-radius: 10px;
  color: #334155;
  font-weight: 700;
}

.mobile-menu a:hover {
  background: #f0fdfa;
  color: var(--color-primary);
}

.hero-section {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 25%, rgba(20, 184, 166, 0.45), transparent 30%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 94, 89, 0.78), rgba(2, 6, 23, 0.25)),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-copy {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 110px 0 230px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ccfbf1;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow.teal {
  color: var(--color-primary);
}

.hero-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #d1fae5;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  color: #0f766e;
  background: #ccfbf1;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-panel {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 24px;
  padding-top: 470px;
}

.hero-search-card,
.hero-rank,
.card,
.movie-card,
.category-card,
.category-overview-card,
.side-card,
.text-card,
.filter-panel {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-card);
}

.hero-search-card,
.hero-rank {
  padding: 22px;
  color: var(--color-text);
  backdrop-filter: blur(16px);
}

.hero-search-card h2,
.hero-rank h2,
.side-card h2,
.text-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.25;
}

.hero-search-card form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.hero-dots {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.hero-dot {
  width: 28px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
}

.hero-dot.is-active {
  width: 44px;
  background: var(--color-primary);
}

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

.section-head h2 {
  margin: 8px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-head p {
  max-width: 760px;
  margin: 0;
  color: var(--color-muted);
}

.text-link {
  color: var(--color-primary);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--color-text);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(20, 184, 166, 0.45);
  box-shadow: var(--shadow-hover);
}

.movie-card figure {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e, #0e7490);
}

.movie-card figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.72));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover figure::after {
  opacity: 1;
}

.movie-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover img {
  transform: scale(1.08);
}

.movie-card figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 9px;
  color: #ffffff;
  background: rgba(15, 118, 110, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.movie-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card p {
  margin: 0;
  color: var(--color-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--color-muted);
  font-size: 13px;
}

.movie-meta span,
.detail-meta span {
  border-radius: 999px;
  padding: 4px 9px;
  background: #f1f5f9;
}

.list-stack {
  display: grid;
  gap: 16px;
}

.list-card {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  flex-direction: unset;
}

.list-card figure {
  height: 100%;
}

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

.category-card {
  padding: 22px;
  min-height: 170px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.category-card span,
.category-card strong {
  display: block;
}

.category-card span {
  color: var(--color-primary);
  font-weight: 900;
  font-size: 18px;
}

.category-card strong {
  margin: 10px 0;
  font-size: 34px;
  line-height: 1;
}

.category-card p,
.category-overview-card p {
  margin: 0;
  color: var(--color-muted);
}

.page-hero {
  padding: 80px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 16% 20%, rgba(20, 184, 166, 0.48), transparent 32%),
    linear-gradient(135deg, var(--color-primary-dark), var(--color-primary), var(--color-accent));
}

.page-hero h1 {
  max-width: 900px;
  margin: 12px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #ccfbf1;
  font-size: 18px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

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

.category-overview-card {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.category-overview-card h2 {
  margin: 8px 0;
  font-size: 26px;
}

.category-mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-mini-links a {
  border-radius: 999px;
  padding: 6px 10px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 13px;
  font-weight: 700;
}

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

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

.toolbar h2 {
  margin: 0 0 6px;
  font-size: 30px;
}

.toolbar p {
  margin: 0;
  color: var(--color-muted);
}

.toolbar-actions {
  display: flex;
  gap: 8px;
}

.toolbar-actions button {
  border: 0;
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--color-primary);
  background: #ccfbf1;
  font-weight: 800;
  cursor: pointer;
}

.side-card {
  position: sticky;
  top: 92px;
  padding: 20px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  padding: 10px;
  background: #ffffff;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 184, 166, 0.45);
  box-shadow: var(--shadow-card);
}

.rank-num {
  color: var(--color-primary);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.rank-item img {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f766e, #0e7490);
}

.rank-content {
  min-width: 0;
}

.rank-content strong,
.rank-content em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-content em {
  color: var(--color-muted);
  font-size: 13px;
  font-style: normal;
}

.rank-score {
  border-radius: 999px;
  padding: 5px 9px;
  color: #92400e;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 900;
}

.rank-list.big .rank-item {
  grid-template-columns: 54px 110px minmax(0, 1fr) auto;
  padding: 14px;
}

.rank-list.big .rank-item img {
  width: 110px;
  height: 72px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px 180px auto;
  gap: 12px;
  padding: 18px;
  margin-bottom: 18px;
}

.search-state {
  margin-bottom: 20px;
  color: var(--color-muted);
  font-weight: 700;
}

.player-section {
  padding: 26px 0 40px;
  background: #020617;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ccfbf1;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

.player-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(15, 118, 110, 0.32), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.play-circle {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
  font-size: 28px;
  box-shadow: 0 18px 45px rgba(13, 148, 136, 0.38);
}

.detail-main,
.detail-side {
  min-width: 0;
}

.detail-head {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.detail-head > img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  object-fit: cover;
  background: linear-gradient(135deg, #0f766e, #0e7490);
  box-shadow: var(--shadow-card);
}

.detail-head h1 {
  margin: 8px 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.lead {
  margin: 0 0 18px;
  color: #334155;
  font-size: 18px;
}

.detail-meta {
  margin-bottom: 16px;
}

.tag-row.wide span {
  background: #f0fdfa;
}

.text-card {
  padding: 24px;
  margin-bottom: 18px;
}

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

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

.mini-movie-list a {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border-radius: 12px;
  padding: 8px;
  transition: background 0.2s ease;
}

.mini-movie-list a:hover {
  background: #f0fdfa;
}

.mini-movie-list img {
  width: 76px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #0f766e, #0e7490);
}

.mini-movie-list strong,
.mini-movie-list em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-movie-list em {
  color: var(--color-muted);
  font-size: 13px;
  font-style: normal;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 20px;
  margin-bottom: 12px;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: #94a3b8;
}

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

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.site-footer a:hover {
  color: #5eead4;
}

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding: 18px;
  text-align: center;
  color: #64748b;
}

.is-filtered-out {
  display: none !important;
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero-panel,
  .layout-two,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .side-card {
    position: static;
  }

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

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

  .hero-section {
    min-height: 780px;
  }

  .hero-copy {
    padding-top: 80px;
    padding-bottom: 330px;
  }

  .hero-panel {
    padding-top: 400px;
  }

  .hero-search-card form,
  .filter-panel,
  .footer-grid,
  .detail-head,
  .list-card {
    grid-template-columns: 1fr;
  }

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

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

  .rank-list.big .rank-item,
  .rank-item {
    grid-template-columns: 42px 72px minmax(0, 1fr);
  }

  .rank-score {
    display: none;
  }
}

@media (max-width: 560px) {
  .container-custom {
    width: min(100% - 22px, var(--container));
  }

  .section-padding {
    padding: 46px 0;
  }

  .brand-text small,
  .hero-rank {
    display: none;
  }

  .hero-section {
    min-height: 650px;
  }

  .hero-copy {
    padding-bottom: 250px;
  }

  .hero-panel {
    padding-top: 360px;
  }

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

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

  .hero-actions,
  .page-actions {
    flex-direction: column;
  }

  .hero-actions a,
  .page-actions a {
    text-align: center;
  }
}
