:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --line: #e5e7eb;
  --teal: #0f9488;
  --teal-dark: #0f766e;
  --cyan: #06b6d4;
  --amber: #f59e0b;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

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

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 10px 24px rgba(20, 184, 166, 0.32);
}

.logo-text {
  font-size: 23px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #334155;
  font-weight: 650;
}

.main-nav a {
  padding: 22px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--teal);
  border-color: var(--teal);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-controls input,
.filter-controls select {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  width: 220px;
  padding: 10px 15px;
}

.header-search button,
.mobile-search button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
  background: #ffffff;
  border-color: rgba(20, 184, 166, 0.72);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

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

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #334155;
}

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

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.mobile-nav a {
  padding: 10px 12px;
  color: #334155;
  border-radius: 12px;
}

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

.mobile-search {
  margin: 14px 0 8px;
}

.mobile-search input {
  width: 100%;
  padding: 10px 14px;
}

.hero-carousel {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #0e7490);
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 35%, rgba(20, 184, 166, 0.25), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.65) 48%, rgba(15, 23, 42, 0.22) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 115px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content .eyebrow {
  color: #a7f3d0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  padding: 7px 14px;
}

.hero-content h1 {
  max-width: 760px;
  margin: 20px 0 12px;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content h2 {
  margin: 0 0 16px;
  color: #ccfbf1;
  font-size: clamp(24px, 3vw, 36px);
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: 18px;
}

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

.hero-tags span,
.detail-tags span,
.genre-pills span,
.tag-row span {
  border-radius: 999px;
  background: rgba(15, 148, 136, 0.10);
  color: #0f766e;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

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

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

.primary-btn,
.ghost-btn,
.text-btn,
.more-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  padding: 12px 22px;
  box-shadow: 0 14px 28px rgba(6, 182, 212, 0.24);
}

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

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

.hero-panel {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
}

.hero-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

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

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

.hero-arrow {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.28);
  font-size: 30px;
  cursor: pointer;
}

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

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

.section-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
}

.compact-heading h2 {
  font-size: 28px;
}

.more-link,
.text-btn {
  color: var(--teal);
  background: #ecfeff;
  padding: 9px 15px;
}

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

.category-tile {
  position: relative;
  min-height: 178px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #0f172a;
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 178px;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile span,
.category-tile small {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.category-tile span {
  bottom: 56px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  bottom: 18px;
  color: #dbeafe;
}

.category-tile:hover img {
  opacity: 0.72;
  transform: scale(1.06);
}

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

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

.movie-card:hover {
  border-color: rgba(20, 184, 166, 0.45);
  box-shadow: 0 20px 46px rgba(15, 23, 42, 0.12);
  transform: translateY(-5px);
}

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

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.66));
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  color: #ffffff;
  font-weight: 900;
  border-radius: 10px;
  background: linear-gradient(135deg, #f97316, #f59e0b);
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.30);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.movie-meta-line span:not(:last-child)::after {
  content: "·";
  margin-left: 6px;
}

.movie-card h2 {
  margin: 6px 0 8px;
  font-size: 17px;
  line-height: 1.3;
}

.movie-card h2 a:hover {
  color: var(--teal);
}

.movie-card p {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 11px;
}

.two-column-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
  gap: 28px;
}

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

.side-picks {
  display: grid;
  gap: 14px;
}

.side-picks .movie-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
}

.side-picks .poster {
  aspect-ratio: 2 / 3;
}

.sub-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(103, 232, 249, 0.22), transparent 26%),
    linear-gradient(135deg, #0f766e, #0891b2);
  padding: 78px 0;
}

.sub-hero h1 {
  max-width: 780px;
  margin: 8px 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

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

.sub-hero .section-kicker {
  color: #a7f3d0;
}

.channel-hero,
.ranking-hero {
  background:
    radial-gradient(circle at 25% 15%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(135deg, #134e4a, #0e7490 55%, #0f172a);
}

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

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

.filter-box {
  position: relative;
  z-index: 5;
  margin-top: -34px;
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.filter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.filter-title h2 {
  margin: 0;
  font-size: 22px;
}

.filter-reset {
  border: 0;
  color: var(--teal);
  background: #ecfeff;
  border-radius: 999px;
  padding: 8px 13px;
  cursor: pointer;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 0.4fr));
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  padding: 12px 14px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.category-cover-stack {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  overflow: hidden;
  border-radius: 16px;
  background: #f1f5f9;
}

.category-cover-stack img {
  width: 100%;
  height: 138px;
  object-fit: cover;
}

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

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

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

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

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

.detail-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.70));
}

.detail-layout {
  position: relative;
  z-index: 2;
  padding: 48px 0 58px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 28px 65px rgba(0, 0, 0, 0.35);
}

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

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

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

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

.detail-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  padding: 7px 12px;
}

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

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

.player-section {
  padding-bottom: 26px;
}

.player-stage {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.24);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.56), rgba(15, 148, 136, 0.28));
  cursor: pointer;
}

.player-stage.is-playing .player-cover {
  display: none;
}

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  color: var(--teal);
  border-radius: 999px;
  background: #ffffff;
  font-size: 32px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
}

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

.content-card {
  padding: 26px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: #475569;
}

.content-card:nth-child(3) {
  grid-column: 1 / -1;
}

.site-footer {
  margin-top: 40px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 34px;
  padding: 50px 0 36px;
}

.footer-logo .logo-text {
  color: #ffffff;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

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

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

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding: 18px;
  text-align: center;
  color: #94a3b8;
}

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

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

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

  .header-search {
    display: none;
  }
}

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

  .nav-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 670px;
  }

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

  .hero-panel {
    bottom: 22px;
  }

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

  .two-column-feature,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .filter-controls {
    grid-template-columns: 1fr 1fr;
  }

  .detail-grid {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 22px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .logo-text {
    font-size: 20px;
  }

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

  .hero-content p {
    font-size: 16px;
  }

  .hero-arrow {
    width: 40px;
    height: 40px;
  }

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

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

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

  .filter-controls {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    width: 58%;
    max-width: 230px;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .rank-grid {
    grid-template-columns: 1fr;
  }

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

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