:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --accent: #14b8a6;
  --accent-deep: #0f766e;
  --accent-soft: rgba(20, 184, 166, 0.12);
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 42%, #ffffff 100%);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(18px);
  color: #fff;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #22d3ee);
  color: #fff;
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.3);
}

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

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

.brand-text small {
  color: #cbd5e1;
  font-size: 12px;
}

.desktop-nav {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  color: #e2e8f0;
  overflow: hidden;
  white-space: nowrap;
}

.desktop-nav a {
  transition: color 0.2s ease;
}

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

.nav-search {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.nav-search input {
  width: 170px;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  background: transparent;
  color: #fff;
}

.nav-search input::placeholder {
  color: #94a3b8;
}

.nav-search button,
.large-search button {
  border: 0;
  color: #fff;
  background: var(--accent);
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.nav-search button:hover,
.large-search button:hover {
  background: var(--accent-deep);
}

.menu-toggle {
  display: none;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px 16px;
}

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.mobile-nav.open {
  display: grid;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: var(--dark);
}

.hero-track,
.hero-slide {
  min-height: 72vh;
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::before {
  content: attr(data-title);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(80px, 18vw, 220px);
  font-weight: 900;
  color: rgba(255, 255, 255, 0.04);
  background: radial-gradient(circle at 70% 30%, rgba(20, 184, 166, 0.4), transparent 36%), linear-gradient(135deg, #0f172a, #111827);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.76) 42%, rgba(15, 23, 42, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  max-width: 1280px;
  margin: 0 auto;
  padding: 90px 20px 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.hero-kicker,
.section-label {
  display: inline-flex;
  align-items: center;
  width: max-content;
  color: var(--accent);
  background: rgba(20, 184, 166, 0.14);
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
}

.hero h1 {
  max-width: 820px;
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 660px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.8;
  margin: 0 0 24px;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.hero-meta span,
.detail-meta span {
  color: #e2e8f0;
  border: 1px solid rgba(226, 232, 240, 0.24);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 14px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  border: 0;
  border-radius: 14px;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--accent), #06b6d4);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 16px 30px rgba(20, 184, 166, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(20, 184, 166, 0.42);
}

.primary-button.small {
  padding: 11px 18px;
  border-radius: 12px;
}

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

.hero-dot {
  width: 38px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--accent);
}

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 58px 20px;
}

.search-strip {
  margin-top: -54px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  padding: 34px;
}

.search-strip h2,
.page-hero h1,
.section-heading h2 {
  margin: 12px 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.search-strip p,
.section-heading p,
.page-hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.large-search {
  display: flex;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.large-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 14px;
}

.large-search button {
  border-radius: 13px;
}

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

.section-more {
  color: var(--accent-deep);
  font-weight: 800;
}

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

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

.movie-card {
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.14);
  border-color: rgba(20, 184, 166, 0.28);
}

.poster-wrap {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b 55%, #0f766e);
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.38s ease, opacity 0.2s ease;
}

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

.poster-wrap.fallback-poster::after {
  content: attr(data-title);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 44px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.movie-badge,
.play-dot {
  position: absolute;
  z-index: 2;
}

.movie-badge {
  top: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  backdrop-filter: blur(8px);
}

.play-dot {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 12px 26px rgba(20, 184, 166, 0.35);
}

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

.movie-card-body h3 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card-body p {
  height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #94a3b8;
  font-size: 13px;
  margin-bottom: 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

.dark-panel {
  max-width: 1240px;
  margin-top: 40px;
  margin-bottom: 40px;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top right, rgba(20, 184, 166, 0.22), transparent 32%), linear-gradient(135deg, #0f172a, #1e293b);
  color: #fff;
  padding: 46px;
}

.dark-panel .section-heading p {
  color: #cbd5e1;
}

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

.rank-card {
  position: relative;
  min-height: 260px;
  border-radius: 18px;
  overflow: hidden;
  background: #111827;
  color: #fff;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
}

.rank-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.78;
  transition: transform 0.3s ease;
}

.rank-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.92));
  z-index: -1;
}

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

.rank-num,
.ranking-number {
  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  font-weight: 900;
}

.rank-num {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
}

.rank-card strong {
  font-size: 15px;
  line-height: 1.35;
}

.rank-card em {
  color: #cbd5e1;
  font-style: normal;
  font-size: 12px;
  margin-top: 6px;
}

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

.category-card {
  min-height: 210px;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card span {
  color: var(--accent-deep);
  font-weight: 800;
}

.category-card strong {
  display: block;
  margin: 16px 0 8px;
  font-size: 38px;
  letter-spacing: -0.04em;
}

.category-card p,
.category-card small {
  color: var(--muted);
  line-height: 1.7;
}

.page-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 76px 20px 28px;
}

.slim-hero {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.category-hero {
  min-height: 340px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.filter-search {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-search input,
.filter-selects select {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  outline: 0;
}

.filter-search input:focus,
.filter-selects select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.filter-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-status {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.category-overview-block {
  max-width: 1280px;
  margin: 0 auto 28px;
  padding: 30px 20px;
}

.category-overview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 22px;
  margin-bottom: 22px;
}

.category-overview-head h2 {
  margin: 12px 0 8px;
  font-size: clamp(24px, 3vw, 34px);
}

.ranking-list {
  display: grid;
  gap: 14px;
}

.ranking-row a {
  display: grid;
  grid-template-columns: 74px 150px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.ranking-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
}

.ranking-row img {
  width: 150px;
  height: 88px;
  object-fit: cover;
  border-radius: 14px;
  background: var(--dark);
}

.ranking-row h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-row p {
  margin: 0 0 9px;
  color: var(--muted);
  line-height: 1.7;
}

.ranking-row small {
  color: #94a3b8;
}

.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--accent-deep);
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--dark);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.5)), var(--detail-cover);
  background-size: cover;
  background-position: center;
  filter: saturate(1.1);
}

.detail-grid {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 20px;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.38);
}

.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 20px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.9;
}

.detail-tags {
  margin-bottom: 28px;
}

.detail-tags span {
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.18);
}

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

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.22);
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: radial-gradient(circle at center, rgba(20, 184, 166, 0.24), rgba(2, 6, 23, 0.78));
}

.play-overlay[hidden] {
  display: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  font-size: 30px;
  box-shadow: 0 18px 44px rgba(20, 184, 166, 0.4);
}

.video-start-text {
  font-size: 18px;
  font-weight: 800;
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.text-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.text-panel p {
  margin: 0;
  color: #334155;
  line-height: 2;
}

.site-footer {
  margin-top: 50px;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 560px;
  line-height: 1.8;
  color: #94a3b8;
}

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

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 20px 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  display: flex;
  justify-content: space-between;
  color: #94a3b8;
  font-size: 14px;
}

.search-item.is-hidden {
  display: none;
}

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

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

  .header-inner {
    gap: 14px;
  }

  .nav-search {
    margin-left: auto;
  }

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

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

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

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .brand {
    flex: 1;
  }

  .nav-search {
    order: 3;
    width: 100%;
  }

  .nav-search input {
    width: 100%;
    flex: 1;
  }

  .hero,
  .hero-track,
  .hero-slide,
  .hero-content {
    min-height: 660px;
  }

  .hero-content {
    padding-top: 72px;
  }

  .search-strip,
  .filter-panel,
  .detail-text,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .dark-panel {
    padding: 28px 20px;
    border-radius: 0;
  }

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

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

  .ranking-row a {
    grid-template-columns: 50px 96px 1fr;
    gap: 12px;
  }

  .ranking-row img {
    width: 96px;
    height: 70px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 560px) {
  .content-section,
  .page-hero {
    padding-left: 14px;
    padding-right: 14px;
  }

  .search-strip {
    margin-top: -34px;
    padding: 22px;
  }

  .large-search {
    flex-direction: column;
  }

  .large-search button {
    width: 100%;
  }

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

  .rank-card {
    min-height: 220px;
  }

  .filter-selects {
    flex-direction: column;
  }

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

  .ranking-number {
    width: max-content;
    padding: 8px 12px;
  }

  .ranking-row img {
    width: 100%;
    height: 180px;
  }
}
