:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --paper: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --teal: #0d9488;
  --teal-2: #14b8a6;
  --dark: #08111f;
  --dark-2: #111827;
  --warm: #f59e0b;
  --radius: 22px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-hover: 0 26px 65px rgba(15, 23, 42, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(18px);
}

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

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

.logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), #0f766e 52%, #115e59);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.28);
}

.logo-text {
  font-size: 22px;
  color: var(--dark);
}

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

.nav-link {
  padding: 10px 16px;
  color: #334155;
  border-radius: 999px;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: var(--teal);
  box-shadow: 0 10px 26px rgba(13, 148, 136, 0.25);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: #ecfeff;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--teal);
  border-radius: 999px;
}

.hero-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  width: min(1280px, calc(100% - 32px));
  margin: 28px auto 0;
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #ffffff;
  background: var(--dark);
  border-radius: 32px;
  box-shadow: var(--shadow-hover);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 62px;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1s ease;
}

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

.hero-content {
  position: relative;
  max-width: 650px;
  z-index: 2;
}

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

.hero-content h2,
.page-hero h1,
.category-hero h1,
.detail-intro h1 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.hero-content h2 {
  font-size: clamp(40px, 6vw, 76px);
  max-width: 780px;
}

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

.hero-tags,
.card-tags,
.detail-meta-list,
.chip-row,
.quick-links,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.card-tags span,
.chip-link,
.detail-meta-list span,
.quick-links a,
.rank-meta span,
.rank-meta a {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #ccfbf1;
  background: rgba(15, 118, 110, 0.45);
  border: 1px solid rgba(94, 234, 212, 0.25);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  color: #ffffff;
  font-weight: 900;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 12px 30px rgba(13, 148, 136, 0.28);
  transition: 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: #0f766e;
  box-shadow: 0 18px 40px rgba(13, 148, 136, 0.34);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: none;
}

.btn.small {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.hero-control {
  position: absolute;
  right: 34px;
  bottom: 34px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 14px;
  height: 14px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

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

.hero-side-panel {
  padding: 32px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.hero-side-panel h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.hero-side-panel p {
  margin: 16px 0 0;
  color: var(--muted);
}

.quick-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 10px;
  margin-top: 24px;
}

.quick-search input,
.movie-filter-input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  outline: none;
  transition: 0.2s ease;
}

.quick-search input:focus,
.movie-filter-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.16);
}

.quick-search button {
  color: #ffffff;
  font-weight: 900;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  cursor: pointer;
}

.quick-links {
  margin-top: 22px;
}

.quick-links a,
.chip-link,
.rank-meta span,
.rank-meta a {
  color: #0f766e;
  background: #ccfbf1;
}

.section-block {
  margin-top: 56px;
}

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

.section-head h2,
.filter-bar h2,
.detail-text-block h2,
.detail-side h2,
.rank-aside h2 {
  margin: 0;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-head p,
.filter-bar p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--teal);
  font-weight: 900;
}

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

.category-card {
  position: relative;
  display: flex;
  min-height: 190px;
  overflow: hidden;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  color: #ffffff;
  background-position: center;
  background-size: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: 0.25s ease;
}

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

.category-card span {
  font-size: 24px;
  font-weight: 900;
}

.category-card strong {
  margin-top: 4px;
  color: #ccfbf1;
}

.category-card em {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  font-style: normal;
}

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.78);
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: 0.28s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111827;
}

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

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

.card-overlay {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
  transition: 0.25s ease;
}

.movie-card:hover .card-overlay {
  opacity: 1;
}

.play-dot,
.big-play {
  position: absolute;
  display: grid;
  place-items: center;
  color: var(--teal);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.26);
}

.play-dot {
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.78);
  transition: 0.25s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge,
.card-meta {
  position: absolute;
  z-index: 2;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-meta {
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.72);
}

.card-body {
  padding: 16px;
}

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

.card-body h3 a:hover {
  color: var(--teal);
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 10px 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-tags span {
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
}

.ranking-band {
  margin-top: 64px;
  padding: 54px 0;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

.ranking-band .section-head h2,
.ranking-band .section-head p {
  color: #ffffff;
}

.ranking-band .section-more {
  color: #99f6e4;
}

.page-main {
  min-height: 60vh;
}

.page-hero,
.category-hero {
  margin-top: 28px;
  padding: 46px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #134e4a);
  border-radius: 32px;
  box-shadow: var(--shadow-hover);
}

.compact-hero h1,
.category-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.compact-hero p,
.category-hero p {
  max-width: 780px;
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.category-hero {
  margin: 28px auto 0;
  padding: 70px 0;
  background-position: center;
  background-size: cover;
  border-radius: 0;
}

.category-hero .chip-row {
  margin-top: 26px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.category-poster-stack {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 18px;
}

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

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

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

.category-count {
  margin-bottom: 12px;
  color: var(--teal);
  font-weight: 900;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.mini-links a {
  padding: 5px 9px;
  color: #475569;
  background: #f8fafc;
  border-radius: 999px;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  margin-top: 44px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.rank-cover {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 9;
}

.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-cover span {
  position: absolute;
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 999px;
}

.rank-row h2 {
  margin: 0;
  font-size: 24px;
}

.rank-row p {
  margin: 8px 0 12px;
  color: var(--muted);
}

.rank-aside,
.detail-side {
  position: sticky;
  top: 94px;
  align-self: start;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.side-link-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.side-link-list a {
  padding: 10px 12px;
  color: #334155;
  background: #f8fafc;
  border-radius: 14px;
  transition: 0.2s ease;
}

.side-link-list a:hover {
  color: #ffffff;
  background: var(--teal);
}

.search-hero .main-search-input {
  max-width: 720px;
  margin-top: 24px;
}

.detail-hero {
  margin-top: 0;
  padding: 64px 0;
  color: #ffffff;
  background-position: center;
  background-size: cover;
}

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

.detail-poster {
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: var(--shadow-hover);
}

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

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

.breadcrumb a:hover {
  color: #5eead4;
}

.detail-intro h1 {
  max-width: 820px;
  font-size: clamp(36px, 6vw, 68px);
}

.detail-one-line {
  max-width: 840px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
}

.detail-meta-list {
  margin-top: 22px;
}

.detail-meta-list span {
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.player-section {
  margin-top: 36px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #020617;
  border-radius: 28px;
  box-shadow: var(--shadow-hover);
  aspect-ratio: 16 / 9;
}

.movie-player,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-player {
  background: #000000;
}

.player-cover {
  padding: 0;
  overflow: hidden;
  border: 0;
  cursor: pointer;
  background: #020617;
  z-index: 2;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: 0.25s ease;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.62);
}

.big-play {
  top: 50%;
  left: 50%;
  width: 88px;
  height: 88px;
  color: var(--teal);
  font-size: 30px;
  transform: translate(-50%, -50%);
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  margin-top: 36px;
}

.detail-article {
  display: grid;
  gap: 18px;
}

.detail-text-block {
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

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

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

.footer-logo {
  color: #ffffff;
  font-size: 24px;
}

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

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

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

.footer-links a {
  color: #cbd5e1;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

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

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

.is-filter-hidden {
  display: none !important;
}

@media (max-width: 1100px) {
  .hero-wrap,
  .rank-layout,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .hero-side-panel,
  .rank-aside,
  .detail-side {
    position: static;
  }

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

@media (max-width: 820px) {
  .site-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-hover);
  }

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

  .nav-toggle {
    display: block;
  }

  .hero-slider {
    min-height: 540px;
  }

  .hero-slide {
    padding: 34px;
  }

  .hero-control {
    left: 34px;
    right: auto;
  }

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

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

  .category-overview-card,
  .rank-row,
  .detail-hero-grid {
    grid-template-columns: 1fr;
  }

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

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

  .hero-slider {
    min-height: 500px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 26px;
  }

  .hero-side-panel,
  .page-hero,
  .detail-text-block,
  .rank-aside,
  .detail-side {
    padding: 24px;
    border-radius: 22px;
  }

  .quick-search {
    grid-template-columns: 1fr;
  }

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

  .category-hero {
    padding: 46px 0;
  }

  .detail-hero {
    padding: 42px 0;
  }

  .big-play {
    width: 68px;
    height: 68px;
    font-size: 24px;
  }
}
