:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --soft: #e5e7eb;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --accent: #f59e0b;
  --accent-2: #f97316;
  --danger: #ef4444;
  --radius: 20px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  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(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  color: #ffffff;
  transition: background 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.site-header.scrolled,
.site-header.open {
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.35);
}

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

.main-nav a,
.mobile-nav a {
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.mobile-nav a:hover {
  background: rgba(245, 158, 11, 0.14);
  color: var(--accent);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  padding: 10px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  background: #ffffff;
  color: var(--text);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.hero-carousel {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: #000000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

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

.hero-bg,
.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
  transform: scale(1.04);
}

.hero-overlay,
.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 25%, rgba(245, 158, 11, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72) 52%, rgba(15, 23, 42, 0.25)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.2) 44%, rgba(2, 6, 23, 0.78));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 660px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 48px;
  align-items: center;
  padding-top: 74px;
}

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

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

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  max-width: 680px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #fbbf24;
  font-weight: 700;
  font-size: 13px;
}

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

.center-actions {
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
  box-shadow: 0 15px 30px rgba(245, 158, 11, 0.32);
}

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

.btn.ghost.light {
  color: #ffffff;
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.44);
  transform: perspective(900px) rotateY(-8deg);
  transition: transform 0.35s ease;
}

.hero-poster:hover {
  transform: perspective(900px) rotateY(-3deg) translateY(-6px);
}

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

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #ffffff;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(14px);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #ffffff;
  cursor: pointer;
}

.hero-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  padding: 0;
  transition: width 0.25s ease, background 0.25s ease;
}

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

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

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  letter-spacing: -0.035em;
}

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

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

.search-panel,
.filterbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search-panel h2 {
  margin: 0;
  font-size: 28px;
}

.search-panel p {
  margin: 4px 0 0;
  color: var(--muted);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(420px, 100%);
  padding: 10px 14px;
  border: 1px solid var(--soft);
  border-radius: 999px;
  background: #ffffff;
}

.search-box.wide {
  width: 100%;
}

.search-box span {
  color: var(--accent);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: none;
  font: inherit;
  background: transparent;
}

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

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

.category-tile,
.category-card-large {
  display: block;
  padding: 22px;
  min-height: 142px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(249, 115, 22, 0.06)),
    #ffffff;
  border: 1px solid rgba(245, 158, 11, 0.16);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card-large:hover,
.movie-card:hover,
.rank-row:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile span,
.category-card-title {
  display: block;
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 8px;
}

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

.category-card-large strong {
  display: inline-flex;
  margin-top: 18px;
  color: var(--accent);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .poster-link img,
.rank-row:hover .rank-cover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%) scale(0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  opacity: 0;
  backdrop-filter: blur(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--danger));
  color: #ffffff;
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.card-meta span,
.detail-meta span,
.detail-meta strong {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
}

.detail-meta strong {
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

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

.movie-card h2 a:hover,
.rank-info h2 a:hover,
.prev-next a:hover {
  color: var(--accent);
}

.movie-card p {
  min-height: 48px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.page-main {
  padding-top: 72px;
}

.page-hero {
  position: relative;
  min-height: 330px;
  padding: 92px 24px;
  text-align: center;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.34), transparent 30%),
    linear-gradient(135deg, #0f172a, #1e293b 50%, #111827);
  overflow: hidden;
}

.page-hero p {
  margin-left: auto;
  margin-right: auto;
}

.small-hero {
  min-height: 300px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 132px minmax(0, 1fr) 70px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-num {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 22px;
  font-weight: 900;
}

.rank-cover {
  display: block;
  border-radius: 16px;
  overflow: hidden;
}

.rank-cover img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
}

.score {
  justify-self: end;
  font-size: 24px;
  color: var(--accent);
}

.detail-main {
  background: #f8fafc;
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  color: #ffffff;
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 560px;
  padding-top: 116px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 32px 65px rgba(0, 0, 0, 0.42);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.76);
  margin-bottom: 16px;
}

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

.detail-section {
  padding-top: 34px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.38);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-box.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.42);
  font-size: 30px;
}

.player-overlay span:last-child {
  font-size: 18px;
  font-weight: 900;
}

.detail-content {
  display: grid;
  gap: 18px;
  padding-top: 0;
}

.content-card,
.prev-next {
  padding: 26px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

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

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

.prev-next {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 800;
}

.related-section {
  padding-top: 16px;
}

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

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  color: #ffffff;
}

.footer-brand p,
.footer-links a {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links {
  display: grid;
  gap: 8px;
  align-content: start;
}

.footer-links h2 {
  margin: 0 0 10px;
  color: #fbbf24;
  font-size: 18px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

@media (max-width: 980px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 110px 0 88px;
  }

  .hero-poster {
    display: none;
  }

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

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

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .mobile-toggle {
    display: block;
  }

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

  .hero-carousel,
  .hero-content {
    min-height: 610px;
  }

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

  .section {
    padding: 38px 0;
  }

  .section-head,
  .search-panel,
  .prev-next {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .rank-row {
    grid-template-columns: 46px 88px 1fr;
  }

  .score {
    display: none;
  }

  .detail-wrap {
    grid-template-columns: 1fr;
    padding-top: 96px;
    padding-bottom: 42px;
  }

  .detail-poster {
    width: min(220px, 68vw);
  }

  .detail-meta {
    margin-top: 18px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}
