:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --orange: #f97316;
  --rose: #f43f5e;
  --slate: #020617;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #e5f9ff;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.94));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand span:last-child,
.footer-brand {
  background: linear-gradient(90deg, #22d3ee, #60a5fa);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 15px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(6, 182, 212, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  font-weight: 600;
}

.nav-links a,
.mobile-panel a,
.footer-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
  color: #22d3ee;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
}

.nav-search input,
.mobile-panel input,
.search-band input,
.filter-section input {
  width: 100%;
  border: 0;
  outline: 0;
  color: inherit;
  background: transparent;
}

.nav-search input {
  width: 160px;
  color: #fff;
  padding: 8px 6px 8px 12px;
}

.nav-search button,
.mobile-panel button,
.search-band button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.25);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.16);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #e0f2fe;
  border-radius: 4px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-panel.open {
  display: grid;
  gap: 10px;
}

.mobile-panel a,
.mobile-panel form {
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.72);
  border-radius: 14px;
}

.mobile-panel form {
  display: flex;
  gap: 8px;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: #fff;
  background: #020617;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 22%, rgba(34, 211, 238, 0.34), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.7) 48%, rgba(2, 6, 23, 0.2));
}

.hero-content {
  position: absolute;
  top: 52%;
  left: max(32px, calc((100% - 1180px) / 2));
  width: min(680px, calc(100% - 64px));
  transform: translateY(-50%);
}

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

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1 {
  max-width: 900px;
  font-size: clamp(40px, 6vw, 72px);
}

.hero h2 {
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 52px);
}

.hero p,
.page-hero p,
.detail-info p {
  max-width: 760px;
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

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

.hero-actions {
  margin-top: 28px;
}

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

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.32);
}

.ghost-btn {
  color: #e0f2fe;
  border: 1px solid rgba(226, 232, 240, 0.35);
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover,
.movie-card:hover,
.category-tile:hover,
.category-overview-card:hover,
.ranking-row:hover {
  transform: translateY(-3px);
}

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

.hero-dots button {
  width: 34px;
  height: 7px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

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

.search-band,
.content-section,
.filter-section,
.ranking-list,
.detail-text,
.player-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.search-band {
  margin-top: -44px;
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 480px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  color: #fff;
  background: linear-gradient(135deg, rgba(8, 47, 73, 0.96), rgba(30, 41, 59, 0.96));
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.search-band h2,
.search-band p {
  margin: 0;
}

.search-band p {
  color: #cbd5e1;
}

.search-band form {
  display: flex;
  gap: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
}

.search-band input {
  color: #fff;
  padding: 10px 14px;
}

.content-section {
  padding: 70px 0 0;
}

.color-section {
  width: 100%;
  max-width: none;
  margin-top: 70px;
  padding: 70px max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(135deg, #fff7ed, #fdf2f8);
}

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

.section-head h2,
.player-section h2,
.detail-text h2,
.site-footer h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.15;
}

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

.section-link {
  color: var(--blue);
  background: #dbeafe;
}

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

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

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

.movie-card:hover {
  box-shadow: var(--shadow);
}

.featured-card {
  grid-column: span 2;
  grid-row: span 2;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.featured-card .poster-link {
  aspect-ratio: 16 / 11;
}

.poster-link img,
.rank-card img,
.category-tile img,
.category-overview-card img,
.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover img,
.category-tile:hover img,
.category-overview-card:hover img,
.ranking-row:hover img {
  transform: scale(1.08);
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(6, 182, 212, 0.9);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.84);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.type-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--rose));
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 52px;
  color: #111827;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-title:hover,
.ranking-title:hover {
  color: var(--cyan);
}

.card-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta span,
.card-meta a,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #f1f5f9;
}

.card-body p {
  display: -webkit-box;
  overflow: hidden;
  margin: 12px 0;
  color: #475569;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row span,
.detail-tags a {
  color: #0891b2;
  background: #ecfeff;
  font-size: 12px;
  font-weight: 700;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  min-height: 118px;
  padding: 12px;
  background: #fff;
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.1);
}

.rank-card img {
  border-radius: 14px;
}

.rank-card strong,
.rank-card small {
  display: block;
}

.rank-card strong {
  margin-top: 6px;
  color: #111827;
  font-weight: 800;
}

.rank-card small {
  margin-top: 8px;
  color: var(--muted);
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  color: #fff;
  background: #0f172a;
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

.category-tile:after,
.category-overview-card a:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.88));
}

.category-tile img,
.category-overview-card img {
  position: absolute;
  inset: 0;
}

.category-tile span,
.category-tile small,
.category-overview-card span {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 1;
}

.category-tile span,
.category-overview-card span {
  bottom: 54px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  bottom: 18px;
  color: #dbeafe;
}

.category-overview-card {
  min-height: 280px;
  color: var(--ink);
  background: #fff;
}

.category-overview-card a {
  position: relative;
  display: block;
  height: 170px;
  overflow: hidden;
  color: #fff;
}

.category-overview-card p,
.category-overview-card small {
  display: block;
  margin: 14px 16px 0;
  color: var(--muted);
}

.category-overview-card small {
  margin-bottom: 18px;
}

.page-hero,
.detail-hero {
  color: #fff;
  background:
    radial-gradient(circle at 12% 24%, rgba(34, 211, 238, 0.3), transparent 24%),
    linear-gradient(135deg, #020617, #0f172a 55%, #164e63);
}

.page-hero {
  padding: 96px max(16px, calc((100% - 1180px) / 2));
}

.slim-hero {
  padding-bottom: 78px;
}

.page-hero h1 {
  font-size: clamp(38px, 5vw, 64px);
}

.filter-section {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.filter-section label {
  color: var(--ink);
  font-weight: 800;
}

.filter-section input {
  min-height: 46px;
  color: var(--ink);
  padding: 0 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.ranking-list {
  display: grid;
  gap: 16px;
  padding: 36px 0 80px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 70px 92px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--rose));
  border-radius: 16px;
}

.rank-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

.ranking-title {
  display: inline-block;
  margin-bottom: 8px;
  color: #111827;
  font-size: 22px;
  font-weight: 900;
}

.ranking-row p {
  margin: 0 0 10px;
  color: #475569;
}

.detail-hero {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 42px;
  align-items: center;
  padding: 72px max(16px, calc((100% - 1180px) / 2));
}

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

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

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

.detail-info h1 {
  font-size: clamp(36px, 5vw, 68px);
}

.detail-tags {
  margin: 22px 0;
}

.player-section {
  padding-top: 56px;
}

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

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-trigger {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #fff;
  border: 0;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.3), rgba(2, 6, 23, 0.52));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-trigger span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  font-size: 34px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 50%;
  box-shadow: 0 18px 45px rgba(6, 182, 212, 0.35);
}

.play-trigger strong {
  padding: 8px 18px;
  background: rgba(15, 23, 42, 0.62);
  border-radius: 999px;
}

.player-box.started .play-trigger {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding-top: 42px;
}

.detail-text article {
  padding: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.detail-text p {
  margin: 14px 0 0;
  color: #475569;
}

.related-grid {
  padding-bottom: 80px;
}

.site-footer {
  margin-top: 80px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

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

.site-footer h2 {
  color: #fff;
  font-size: 18px;
}

.site-footer p {
  color: #94a3b8;
}

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

.footer-links a {
  color: #cbd5e1;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 30px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

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

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

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

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero {
    min-height: 620px;
  }

  .search-band,
  .detail-hero,
  .detail-text,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .featured-card {
    grid-column: span 2;
  }

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

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

@media (max-width: 580px) {
  .nav-wrap,
  .mobile-panel,
  .content-section,
  .filter-section,
  .ranking-list,
  .detail-text,
  .player-section,
  .search-band {
    width: min(100% - 22px, 1180px);
  }

  .brand,
  .footer-brand {
    font-size: 20px;
  }

  .hero-content {
    left: 18px;
    width: calc(100% - 36px);
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero h2 {
    font-size: 30px;
  }

  .hero p,
  .page-hero p,
  .detail-info p {
    font-size: 16px;
  }

  .hero-actions,
  .section-head,
  .footer-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .search-band form,
  .filter-section,
  .ranking-row {
    grid-template-columns: 1fr;
  }

  .search-band form {
    border-radius: 22px;
  }

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

  .featured-card {
    grid-column: span 1;
  }

  .ranking-row {
    gap: 12px;
  }
}
