:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --accent: #f59e0b;
  --accent-deep: #ea580c;
  --blue: #2563eb;
  --green: #059669;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 48%, #e2e8f0 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(10px);
}

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

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

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.logo-text {
  font-size: clamp(18px, 2vw, 25px);
  background: linear-gradient(90deg, #fbbf24, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 12px;
  color: #cbd5e1;
  font-weight: 650;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.28);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 20px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-panel.open {
  display: block;
}

.mobile-links {
  padding: 12px 0 18px;
  display: grid;
  gap: 8px;
}

.quick-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.quick-cats a {
  color: #cbd5e1;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 600px;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 16%, rgba(245, 158, 11, 0.35), transparent 32%),
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.28), transparent 34%),
    linear-gradient(135deg, #020617 0%, #111827 48%, #0f172a 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 82%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 46px;
  align-items: center;
  padding: 80px 0 72px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.32);
}

.hero h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero h1 span {
  display: block;
  background: linear-gradient(90deg, #fbbf24, #fb923c, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy {
  max-width: 760px;
  margin: 22px 0 28px;
  color: #cbd5e1;
  font-size: 18px;
}

.hero-actions,
.filter-bar,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 750;
  transition: all 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  box-shadow: 0 14px 28px rgba(234, 88, 12, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(234, 88, 12, 0.36);
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.btn-dark {
  color: #ffffff;
  background: #0f172a;
}

.hero-search {
  display: flex;
  align-items: center;
  max-width: 560px;
  margin-top: 28px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.hero-search input {
  width: 100%;
  min-height: 54px;
  color: #ffffff;
  border: 0;
  outline: 0;
  padding: 0 18px;
  background: transparent;
}

.hero-search input::placeholder {
  color: #cbd5e1;
}

.hero-search button {
  min-height: 54px;
  border: 0;
  padding: 0 20px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
  font-weight: 800;
}

.hero-panel {
  position: relative;
}

.hero-slider {
  position: relative;
  min-height: 420px;
  border-radius: 32px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  padding: 34px;
  opacity: 0;
  transition: opacity 0.7s ease;
  background-image:
    linear-gradient(to top, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.06)),
    var(--cover),
    linear-gradient(135deg, #1e293b, #7c2d12);
  background-size: cover;
  background-position: center;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.12;
}

.hero-slide p {
  max-width: 560px;
  margin: 0 0 18px;
  color: #e2e8f0;
}

.hero-dots {
  position: absolute;
  left: 34px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dot.active {
  width: 28px;
  background: #fbbf24;
}

main {
  min-height: 60vh;
}

.page-hero {
  padding: 54px 0 40px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 35%),
    linear-gradient(135deg, #0f172a, #1e293b);
  color: #ffffff;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 780px;
  margin: 14px 0 0;
  color: #cbd5e1;
  font-size: 17px;
}

.section {
  padding: 56px 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.section-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.22);
}

.section-title h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

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

.grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card,
.category-card,
.panel,
.list-card {
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  color: #ffffff;
  overflow: hidden;
  background-image:
    linear-gradient(to top, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.2)),
    var(--cover),
    linear-gradient(135deg, #334155, #f59e0b);
  background-size: cover;
  background-position: center;
}

.poster::before {
  content: "";
  position: absolute;
  inset: -50% -20% auto auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  filter: blur(2px);
}

.poster strong {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  overflow: hidden;
  font-size: 20px;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.poster-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.poster-type {
  right: 12px;
}

.rank-badge {
  left: 12px;
  color: #111827;
  background: #fbbf24;
}

.movie-info {
  padding: 16px;
}

.movie-info h3,
.list-card h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.movie-info h3 a:hover,
.list-card h3 a:hover {
  color: var(--accent-deep);
}

.movie-info p,
.list-card p,
.category-card p,
.panel p {
  color: var(--muted);
  margin: 0;
}

.movie-info p {
  display: -webkit-box;
  min-height: 50px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #64748b;
  font-size: 13px;
}

.movie-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  color: #92400e;
  background: #fef3c7;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 650;
}

.category-card {
  min-height: 180px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.category-count {
  color: var(--accent-deep);
  font-weight: 850;
}

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

.list-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  padding: 18px;
}

.list-rank {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
}

.filter-panel {
  position: sticky;
  top: 88px;
  z-index: 3;
  padding: 16px 0;
  background: rgba(248, 250, 252, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.filter-bar input,
.filter-bar select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 14px;
  outline: 0;
}

.filter-bar input {
  min-width: min(420px, 100%);
  flex: 1;
}

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

.player-panel {
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.35);
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at center, rgba(245, 158, 11, 0.2), transparent 35%),
    linear-gradient(135deg, #020617, #1e293b);
}

.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.26));
}

.play-overlay span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 18px 38px rgba(234, 88, 12, 0.38);
  font-size: 30px;
}

.player-meta {
  padding: 18px;
  color: #cbd5e1;
}

.detail-box {
  padding: 24px;
  margin-bottom: 18px;
}

.detail-box h2,
.detail-box h3 {
  margin: 0 0 12px;
}

.detail-hero {
  padding: 46px 0;
  color: #ffffff;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.7), rgba(2, 6, 23, 0.38)),
    var(--cover),
    linear-gradient(135deg, #0f172a, #7c2d12);
  background-size: cover;
  background-position: center;
}

.detail-hero h1 {
  max-width: 900px;
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.06;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #fde68a;
}

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

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

.site-footer {
  margin-top: 40px;
  padding: 46px 0;
  color: #cbd5e1;
  background: linear-gradient(135deg, #020617, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 32px;
}

.footer-logo {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.footer-grid h3 {
  color: #ffffff;
  margin: 0 0 12px;
}

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

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

.empty-state {
  display: none;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid var(--line);
}

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

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

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

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

  .main-nav {
    display: none;
  }

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

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding: 52px 0;
  }

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

  .hero-slide {
    padding: 24px;
  }

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

  .poster {
    min-height: 160px;
  }

  .movie-info {
    padding: 13px;
  }

  .movie-info h3 {
    font-size: 16px;
  }

  .list-card {
    grid-template-columns: 54px 1fr;
    padding: 14px;
  }

  .list-rank {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 16px;
  }

  .filter-panel {
    top: 76px;
  }
}

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

  .hero-search {
    display: grid;
  }

  .hero-search button {
    width: 100%;
  }
}
