:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --cyan-400: #22d3ee;
  --cyan-500: #06b6d4;
  --cyan-600: #0891b2;
  --blue-500: #3b82f6;
  --red-500: #ef4444;
  --white: #ffffff;
  --soft-bg: #f8fafc;
  --card-shadow: 0 20px 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;
  background: linear-gradient(135deg, #f8fafc 0%, #eef6ff 48%, #f3f4f6 100%);
  color: #111827;
  line-height: 1.6;
}

body.no-scroll {
  overflow: hidden;
}

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: 100;
  background: rgba(15, 23, 42, 0.94);
  color: var(--white);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.25);
}

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

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

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan-400), var(--blue-500));
  color: var(--slate-950);
  box-shadow: 0 12px 22px rgba(34, 211, 238, 0.28);
}

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

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

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.13);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  padding: 9px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--white);
  border-radius: 99px;
}

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

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

.mobile-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.hero {
  background: var(--slate-950);
  color: var(--white);
}

.hero-stage {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 560px;
  overflow: hidden;
  border-radius: 0 0 30px 30px;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.35);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(34, 211, 238, 0.26), transparent 26%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.78) 44%, rgba(15, 23, 42, 0.25) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 42%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 76px);
  bottom: clamp(46px, 10vw, 110px);
  max-width: 720px;
  display: grid;
  gap: 18px;
}

.hero-kicker,
.kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  color: var(--cyan-400);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 82px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
}

.hero p {
  margin: 0;
  max-width: 650px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 22px);
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: #ecfeff;
  color: #155e75;
  font-size: 12px;
  font-weight: 700;
}

.hero .tag,
.detail-tags .tag {
  background: rgba(255, 255, 255, 0.14);
  color: #cffafe;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

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

.primary-btn {
  background: linear-gradient(135deg, var(--cyan-400), var(--blue-500));
  color: var(--slate-950);
  box-shadow: 0 14px 30px rgba(34, 211, 238, 0.28);
}

.ghost-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.45);
  color: var(--white);
  font-size: 36px;
  line-height: 1;
  z-index: 4;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: clamp(24px, 6vw, 76px);
  bottom: 24px;
  display: flex;
  gap: 8px;
  z-index: 5;
}

.hero-dot {
  width: 32px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dot.active {
  width: 54px;
  background: var(--cyan-400);
}

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

.intro-section {
  padding-bottom: 24px;
}

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

.section-heading h2 {
  margin: 12px 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: #111827;
}

.section-heading p {
  margin: 0;
  max-width: 720px;
  color: var(--slate-500);
}

.section-more,
.text-link {
  color: #0e7490;
  background: #ecfeff;
}

.search-panel {
  margin: 24px 0 34px;
  padding: 20px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.search-box {
  display: flex;
  gap: 12px;
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 18px;
  border: 1px solid #cbd5e1;
  border-radius: 18px;
  outline: none;
  background: var(--white);
}

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

.search-box button,
.filter-chip {
  border: 0;
  border-radius: 999px;
  background: var(--slate-900);
  color: var(--white);
  padding: 0 18px;
  min-height: 44px;
  font-weight: 700;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-chip {
  background: #e0f2fe;
  color: #075985;
}

.filter-chip.active {
  background: linear-gradient(135deg, var(--cyan-400), var(--blue-500));
  color: var(--slate-950);
}

.empty-state {
  margin: 18px 0 0;
  color: var(--slate-500);
  font-weight: 700;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--white);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-700));
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #fef08a, #fb7185);
  color: var(--slate-950);
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(2, 6, 23, 0.22);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--cyan-600);
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  color: #0f172a;
}

.movie-card h3 a:hover {
  color: var(--cyan-600);
}

.movie-card p {
  margin: 0;
  color: var(--slate-500);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  margin-top: auto;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 26px;
  background: var(--slate-900);
  color: var(--white);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--card-shadow);
}

.category-tile img,
.category-tile span {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.category-tile img {
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.4s ease;
}

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

.category-tile span {
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.14));
}

.category-tile strong,
.category-tile small {
  position: relative;
  z-index: 1;
}

.category-tile strong {
  font-size: 22px;
}

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

.dark-section {
  width: 100%;
  max-width: none;
  padding: 64px max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(135deg, var(--slate-950), var(--slate-800));
  color: var(--white);
}

.dark-section .section-heading h2,
.dark-section .section-heading p {
  color: var(--white);
}

.dark-section .movie-card {
  background: rgba(255, 255, 255, 0.95);
}

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

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

.movie-card-small p {
  -webkit-line-clamp: 2;
}

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

.compact-hero,
.ranking-hero {
  min-height: 280px;
  display: flex;
  align-items: center;
}

.page-hero h1 {
  margin: 14px 0 14px;
  max-width: 880px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--slate-500);
  font-size: 18px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px;
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

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

.category-covers img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.category-overview-card h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.category-overview-card p {
  margin: 0 0 16px;
  color: var(--slate-500);
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 36px;
  align-items: end;
  padding: 34px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 85% 15%, rgba(34, 211, 238, 0.22), transparent 28%),
    linear-gradient(135deg, var(--slate-950), var(--slate-800));
  color: var(--white);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.28);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #bae6fd;
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--white);
}

.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.detail-one-line {
  margin: 0 0 18px;
  color: #dbeafe;
  font-size: 20px;
}

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

.detail-meta div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
}

.detail-meta dt {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
}

.detail-meta dd {
  margin: 4px 0 0;
  color: var(--white);
  font-weight: 800;
}

.player-section {
  padding-bottom: 24px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 30px;
  background: var(--slate-950);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.28);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.54), rgba(15, 23, 42, 0.32));
  color: var(--white);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-400), var(--blue-500));
  color: var(--slate-950);
  font-size: 34px;
  box-shadow: 0 20px 44px rgba(34, 211, 238, 0.33);
}

.play-overlay strong {
  font-size: 20px;
}

.story-card {
  padding: 34px;
  border-radius: 30px;
  background: var(--white);
  box-shadow: var(--card-shadow);
}

.story-card h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.story-card h2:not(:first-child) {
  margin-top: 30px;
}

.story-card p {
  margin: 0;
  color: #334155;
  font-size: 18px;
}

.site-footer {
  margin-top: 40px;
  background: var(--slate-950);
  color: #cbd5e1;
}

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

.footer-logo {
  color: var(--white);
  margin-bottom: 14px;
}

.footer-inner p {
  margin: 0;
  max-width: 460px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  align-content: start;
  gap: 10px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
  background: rgba(34, 211, 238, 0.18);
  color: var(--white);
}

[hidden] {
  display: none !important;
}

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

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

  .detail-hero {
    grid-template-columns: 240px 1fr;
  }
}

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

  .nav-toggle {
    display: block;
  }

  .hero-stage {
    width: 100%;
    min-height: 620px;
    border-radius: 0;
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 82px;
  }

  .hero-arrow {
    display: none;
  }

  .content-section,
  .page-hero,
  .detail-hero,
  .footer-inner {
    width: min(100% - 28px, 1180px);
  }

  .section-heading {
    display: block;
  }

  .section-more {
    margin-top: 14px;
  }

  .search-box {
    flex-direction: column;
  }

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

  .category-overview-card,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 260px;
  }

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

@media (max-width: 520px) {
  .header-inner {
    min-height: 64px;
  }

  .site-logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 12px;
  }

  .hero-stage {
    min-height: 590px;
  }

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

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

  .detail-hero {
    padding: 22px;
    border-radius: 26px;
  }

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

  .detail-meta {
    grid-template-columns: 1fr;
  }

  .story-card {
    padding: 22px;
  }

  .footer-links {
    justify-content: start;
  }
}
