* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --emerald: #10b981;
  --teal: #14b8a6;
  --cyan: #06b6d4;
  --dark: #0f172a;
  --text: #18212f;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.08);
  --card: rgba(255, 255, 255, 0.88);
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #f8fafc 0%, #ecfdf5 46%, #ecfeff 100%);
  min-height: 100vh;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #059669, #0d9488, #0891b2);
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.24);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

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

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

.brand-text small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

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

.main-nav a {
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  font-size: 26px;
  background: transparent;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  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;
  filter: brightness(0.42) saturate(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 42%, rgba(20, 184, 166, 0.34), transparent 32%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.9)),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.45), rgba(2, 6, 23, 0.16));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 48px;
  color: #ffffff;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  font-weight: 700;
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
  line-height: 1.8;
}

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

.hero-tags a,
.hero-tags span,
.detail-tags a,
.detail-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  border: 0;
  cursor: pointer;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(90deg, var(--emerald), var(--teal));
  box-shadow: 0 16px 32px rgba(16, 185, 129, 0.32);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hero-poster {
  display: block;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

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

.hero-dots button {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dots button.active {
  background: #ffffff;
}

.section {
  padding: 58px 0;
}

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

.section-title h2,
.page-title h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  color: #0f172a;
  letter-spacing: -0.03em;
}

.section-title p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.more-link {
  color: #059669;
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.74);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

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

.play-chip,
.rank-num {
  position: absolute;
  color: #ffffff;
  border-radius: 999px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--emerald), var(--teal));
}

.play-chip {
  right: 14px;
  bottom: 14px;
  padding: 8px 12px;
  font-size: 13px;
}

.rank-num {
  left: 14px;
  top: 14px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}

.card-body {
  padding: 16px;
}

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

.card-body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.meta-row span {
  color: #047857;
  background: #d1fae5;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  display: flex;
  min-height: 190px;
  overflow: hidden;
  border-radius: 26px;
  color: #ffffff;
  padding: 20px;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.category-card img,
.category-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-card img {
  object-fit: cover;
}

.category-mask {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.86));
}

.category-card strong,
.category-card small {
  position: relative;
  z-index: 1;
}

.category-card strong {
  font-size: 22px;
  margin-bottom: 8px;
}

.category-card small {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.filter-panel,
.page-title,
.detail-panel,
.player-panel {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.filter-panel {
  padding: 18px;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr auto;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  outline: 0;
  font: inherit;
  background: #ffffff;
}

.filter-btn {
  color: #ffffff;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
}

.page-title {
  padding: 36px;
  margin: 38px auto 24px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  margin-bottom: 12px;
  font-size: 14px;
}

.breadcrumb a {
  color: #047857;
  font-weight: 700;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.rank-index {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
}

.rank-row img {
  width: 96px;
  height: 128px;
  object-fit: cover;
  border-radius: 16px;
}

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

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

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

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

.detail-cover {
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.detail-panel {
  padding: 34px;
}

.detail-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.04em;
}

.detail-panel p {
  color: var(--muted);
  line-height: 1.85;
  font-size: 17px;
}

.player-panel {
  margin-top: 28px;
  padding: 18px;
  background: #020617;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.12), rgba(2, 6, 23, 0.62));
  cursor: pointer;
  z-index: 2;
}

.play-overlay.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.big-play {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 38px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.32);
}

.article-content {
  display: grid;
  gap: 24px;
  margin-top: 28px;
}

.text-block {
  padding: 28px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.74);
}

.text-block h2 {
  margin: 0 0 12px;
}

.text-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.95;
}

.site-footer {
  margin-top: 48px;
  padding: 42px 0;
  color: #ffffff;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 30px;
}

.footer-grid p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.82);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.empty-state {
  display: none;
  padding: 26px;
  text-align: center;
  color: var(--muted);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
}

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

  .hero-poster {
    display: none;
  }

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

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

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

@media (max-width: 720px) {
  .header-inner {
    height: auto;
    min-height: 64px;
    align-items: flex-start;
    padding: 10px 0;
  }

  .nav-toggle {
    display: block;
    margin-top: 8px;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 20px;
    background: #0f766e;
    box-shadow: var(--shadow);
  }

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

  .hero {
    min-height: 560px;
  }

  .hero-content {
    align-items: end;
    padding-bottom: 78px;
  }

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

  .section {
    padding: 38px 0;
  }

  .section-title {
    display: block;
  }

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

  .rank-row {
    grid-template-columns: 44px 78px minmax(0, 1fr);
  }

  .rank-row .primary-btn {
    grid-column: 1 / -1;
  }

  .rank-row img {
    width: 78px;
    height: 104px;
  }

  .page-title,
  .detail-panel {
    padding: 24px;
  }
}
