:root {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --dark: #020617;
  --panel: #ffffff;
  --line: #e2e8f0;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --orange: #f97316;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.96);
  color: #fff;
  box-shadow: 0 10px 25px rgba(2, 6, 23, 0.25);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.35);
}

.brand-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links,
.nav-mini,
.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.nav-links a,
.nav-mini a,
.footer-links a {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active,
.nav-mini a:hover {
  color: #fbbf24;
}

.nav-mini {
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 14px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  color: #fff;
  background: #000;
}

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(245, 158, 11, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.62) 48%, rgba(2, 6, 23, 0.2)),
    linear-gradient(0deg, #000 0%, transparent 52%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 3;
  width: min(1280px, 100%);
  transform: translateX(-50%);
  padding: 68px 24px;
}

.hero-kicker,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(245, 158, 11, 0.95);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  max-width: 820px;
  margin: 18px 0 14px;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.hero-meta span {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-actions,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.btn-light {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.btn-outline {
  color: #0f172a;
  background: #fff;
  border: 1px solid var(--line);
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100% - 1280px) / 2 + 24px));
  bottom: 70px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-control,
.hero-dot {
  border: 0;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(12px);
}

.hero-control {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.65;
}

.hero-dot.active {
  width: 30px;
  background: #fbbf24;
  opacity: 1;
}

.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px 72px;
}

.section {
  margin-bottom: 54px;
}

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

.section-head h1,
.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

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

.section-link {
  color: var(--amber-dark);
  font-weight: 800;
}

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

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

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #334155);
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.65), transparent 55%);
}

.poster-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.poster-type {
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(15, 23, 42, 0.82);
}

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

.card-body {
  padding: 16px;
}

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

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

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

.meta-line,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.meta-line {
  color: #475569;
  font-size: 13px;
}

.meta-line span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #cbd5e1;
}

.tag-list {
  margin-top: 12px;
}

.tag-list span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 12px;
  font-weight: 700;
}

.feature-row {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 22px;
}

.feature-large,
.category-card,
.info-panel,
.detail-panel,
.player-panel {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.feature-large {
  display: grid;
  grid-template-columns: minmax(260px, 42%) 1fr;
  overflow: hidden;
}

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

.feature-content {
  padding: 30px;
}

.feature-content h2 {
  margin: 14px 0 10px;
  font-size: 34px;
  line-height: 1.15;
}

.feature-content p {
  color: var(--muted);
}

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

.side-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.side-item img {
  width: 92px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
}

.side-item strong {
  display: block;
  margin-bottom: 4px;
}

.side-item span {
  color: var(--muted);
  font-size: 13px;
}

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

.category-card {
  position: relative;
  min-height: 188px;
  overflow: hidden;
  padding: 22px;
  color: #fff;
  background: #111827;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  transition: transform 0.35s ease;
}

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.92), rgba(245, 158, 11, 0.35));
}

.category-card > div {
  position: relative;
  z-index: 2;
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.82);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 220px 220px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select,
.search-page-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 13px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-page-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 36px;
  padding: 54px 34px;
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 15%, rgba(245, 158, 11, 0.4), transparent 28%),
    linear-gradient(135deg, #020617, #1e293b 60%, #7c2d12);
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.18);
}

.page-hero h1 {
  max-width: 820px;
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 58px 150px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.ranking-num {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, #f97316);
  font-weight: 900;
}

.ranking-item img {
  width: 150px;
  height: 92px;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-item h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.ranking-item p {
  margin: 0;
  color: var(--muted);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  margin-top: -1px;
  color: #fff;
  background: #020617;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  filter: blur(2px) saturate(1.2);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.68));
}

.detail-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 62px 24px 48px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  align-items: end;
}

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

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

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

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

.detail-title h1 {
  margin: 14px 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-title p {
  max-width: 820px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

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

.detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.player-panel {
  overflow: hidden;
  margin-bottom: 28px;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  color: #fff;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.45), rgba(2, 6, 23, 0.9));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 20px 48px rgba(245, 158, 11, 0.35);
  font-size: 34px;
}

.player-caption {
  padding: 18px 20px;
}

.player-caption h2,
.detail-panel h2,
.info-panel h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.player-caption p,
.detail-panel p,
.info-panel p {
  color: var(--muted);
}

.detail-panel,
.info-panel {
  padding: 24px;
  margin-bottom: 22px;
}

.detail-panel p {
  margin: 0 0 18px;
  font-size: 16px;
}

.info-panel dl {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px 12px;
  margin: 0;
}

.info-panel dt {
  color: #64748b;
  font-weight: 800;
}

.info-panel dd {
  margin: 0;
}

.related-list {
  display: grid;
  gap: 12px;
}

.related-list a {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.related-list img {
  width: 86px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
}

.related-list strong {
  display: block;
  margin-bottom: 3px;
}

.related-list span {
  color: var(--muted);
  font-size: 13px;
}

.search-page {
  max-width: 920px;
  margin: 0 auto 34px;
  padding: 24px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-page-input {
  min-height: 54px;
  font-size: 18px;
}

.site-footer {
  color: rgba(255, 255, 255, 0.82);
  background: #020617;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.62);
}

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

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

  .feature-row,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

  .search-box {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links,
  .nav-mini {
    display: none;
    width: 100%;
    margin: 0;
    padding: 10px 0 0;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }

  .site-header.menu-open .nav-links,
  .site-header.menu-open .nav-mini {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: 660px;
  }

  .hero-content {
    padding: 44px 18px 78px;
  }

  .hero-controls {
    left: 18px;
    right: auto;
    bottom: 24px;
  }

  .main,
  .detail-layout {
    padding: 30px 16px 54px;
  }

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

  .feature-large,
  .detail-inner {
    grid-template-columns: 1fr;
  }

  .feature-content {
    padding: 22px;
  }

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

  .ranking-item {
    grid-template-columns: 44px 96px 1fr;
  }

  .ranking-item .btn {
    grid-column: 1 / -1;
  }

  .footer-inner,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .side-item,
  .related-list a {
    grid-template-columns: 76px 1fr;
  }
}
