* {
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --line: rgba(148, 163, 184, 0.2);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --accent: #f97316;
  --card: rgba(15, 23, 42, 0.86);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 30rem),
    radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.12), transparent 24rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.96), rgba(51, 65, 85, 0.96), rgba(30, 41, 59, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark,
.footer-brand span {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, var(--cyan), #a5f3fc);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.38);
}

.brand-text {
  display: grid;
  gap: 1px;
}

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

.brand-text small {
  color: #67e8f9;
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.nav-link {
  color: #e2e8f0;
  font-weight: 700;
  font-size: 14px;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--cyan);
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.65s ease, transform 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-bg {
  background-size: cover;
  background-position: center;
  filter: blur(3px) saturate(1.08);
  transform: scale(1.06);
  opacity: 0.45;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.62)),
    radial-gradient(circle at 70% 32%, rgba(34, 211, 238, 0.22), transparent 24rem);
}

.hero-content {
  position: relative;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 68px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: #67e8f9;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
}

.hero-copy h1,
.sub-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 7vw, 74px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-intro {
  max-width: 680px;
  color: #dbeafe;
  font-size: 18px;
  margin: 22px 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(103, 232, 249, 0.26);
  border-radius: 999px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.16);
  font-size: 12px;
  font-weight: 700;
}

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

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

.primary-btn {
  color: #001018;
  background: linear-gradient(135deg, var(--cyan), #a5f3fc);
  box-shadow: 0 18px 36px rgba(34, 211, 238, 0.28);
}

.ghost-btn {
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.58);
}

.ghost-btn.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.primary-btn:hover,
.ghost-btn:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.ghost-btn:hover {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(8, 145, 178, 0.28);
}

.text-link {
  color: var(--cyan);
  padding-inline: 0;
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.hero-poster span {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  padding: 12px 16px;
  border-radius: 14px;
  color: #ecfeff;
  text-align: center;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
}

.hero-poster:hover img,
.movie-card:hover img,
.category-large-card:hover img,
.rank-poster:hover img {
  transform: scale(1.08);
}

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

.hero-dot {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--cyan);
}

.page-main {
  padding: 56px 0 72px;
}

.content-section,
.category-strip,
.ranking-panel,
.filter-panel,
.detail-hero,
.player-section,
.detail-text {
  margin-bottom: 64px;
}

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

.section-heading.tight {
  margin-bottom: 20px;
}

.section-heading h2,
.ranking-panel h2,
.player-section h2,
.detail-text h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 36px);
  letter-spacing: -0.03em;
}

.section-heading p,
.ranking-panel p,
.detail-text p {
  color: var(--muted);
  max-width: 620px;
}

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

.category-tile,
.category-large-card a,
.ranking-panel,
.filter-panel,
.detail-hero,
.player-section,
.detail-text,
.rank-row {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.72));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.22);
}

.category-tile {
  min-height: 142px;
  padding: 18px;
  border-radius: 18px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.category-tile strong {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
}

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

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.58);
}

.ranking-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 36px;
  padding: 28px;
  border-radius: 24px;
}

.ranking-panel ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.ranking-panel li a {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.35);
}

.ranking-panel li span,
.rank-number {
  color: var(--cyan);
  font-weight: 900;
}

.ranking-panel li em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.filter-panel {
  padding: 18px;
  border-radius: 18px;
}

.filter-panel label {
  display: block;
  margin-bottom: 10px;
  color: #e0f2fe;
  font-weight: 800;
}

.filter-panel input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  color: var(--text);
  outline: none;
  background: rgba(2, 6, 23, 0.55);
  padding: 0 16px;
}

.filter-panel input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14);
}

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

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: var(--panel-soft);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

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

.play-dot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f172a;
  font-size: 24px;
  opacity: 0;
  background: rgba(2, 6, 23, 0.45);
  transition: opacity 0.25s ease;
}

.play-dot::before {
  content: "";
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  z-index: -1;
}

.movie-card:hover .play-dot {
  opacity: 1;
}

.movie-card-body {
  padding-top: 10px;
}

.movie-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-copy h2 a:hover {
  color: var(--cyan);
}

.movie-meta {
  margin: 0 0 8px;
  color: #94a3b8;
  font-size: 12px;
}

.movie-brief {
  margin: 0 0 10px;
  color: #cbd5e1;
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sub-hero {
  padding: 72px 0;
  margin-top: -56px;
  margin-bottom: 46px;
  background:
    radial-gradient(circle at 15% 20%, rgba(34, 211, 238, 0.24), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.92));
  border-bottom: 1px solid var(--line);
}

.sub-hero p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 17px;
}

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

.category-large-card a {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 22px;
  min-height: 220px;
  padding: 18px;
  border-radius: 24px;
  overflow: hidden;
}

.category-cover-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-cover-row img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
}

.category-large-card h2 {
  margin: 0 0 10px;
}

.category-large-card p {
  color: var(--muted);
}

.category-large-card span {
  color: var(--cyan);
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--cyan);
}

.detail-hero {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 34px;
  align-items: center;
  padding: 26px;
  border-radius: 28px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  background: var(--panel-soft);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-one-line {
  max-width: 760px;
  color: #dbeafe;
  font-size: 18px;
}

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
  font-weight: 700;
  font-size: 13px;
}

.player-section,
.detail-text {
  padding: 24px;
  border-radius: 24px;
}

.player-shell {
  position: relative;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-video,
.player-cover,
.player-cover-bg,
.player-cover-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  z-index: 1;
  background: #000;
}

.player-cover {
  z-index: 2;
  border: 0;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  color: var(--text);
  background: #000;
}

.player-cover.is-hidden {
  display: none;
}

.player-cover-bg {
  background-size: cover;
  background-position: center;
  filter: blur(2px) saturate(1.05);
  transform: scale(1.04);
}

.player-cover-mask {
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.42));
}

.player-button {
  position: relative;
  z-index: 3;
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.4);
  font-size: 34px;
}

.detail-text p {
  color: #dbeafe;
  font-size: 17px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 80px 58px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 18px;
}

.rank-poster {
  display: block;
  width: 80px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: var(--panel-soft);
}

.rank-copy h2 {
  margin: 0 0 5px;
  font-size: 18px;
}

.rank-copy p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  padding: 52px 0 0;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 34px;
}

.footer-brand {
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 900;
}

.site-footer p,
.site-footer li {
  color: var(--muted);
  font-size: 14px;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.site-footer a:hover {
  color: var(--cyan);
}

.footer-bottom {
  padding: 18px;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 14px;
}

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

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

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

  .hero-content {
    grid-template-columns: 1fr 280px;
  }
}

@media (max-width: 820px) {
  .site-nav {
    min-height: 66px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 0;
    right: 0;
    top: 66px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px 24px 24px;
    background: rgba(15, 23, 42, 0.98);
    border-bottom: 1px solid var(--line);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-link {
    padding: 8px 0;
  }

  .hero-slider,
  .hero-content {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 46px;
  }

  .hero-poster {
    width: min(320px, 82vw);
    margin: 0 auto;
  }

  .section-heading,
  .ranking-panel,
  .detail-hero,
  .footer-grid,
  .category-large-card a {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

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

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

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

  .detail-poster {
    width: min(300px, 80vw);
  }

  .rank-row {
    grid-template-columns: 66px 44px 1fr;
  }

  .rank-poster {
    width: 66px;
  }

  .rank-row .ghost-btn {
    grid-column: 3;
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .page-shell {
    width: min(100% - 22px, 1180px);
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .hero-copy h1,
  .sub-hero h1,
  .detail-info h1 {
    font-size: 36px;
  }

  .hero-actions,
  .sub-actions {
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .movie-grid,
  .featured-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .player-button {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }
}
