* {
  box-sizing: border-box;
}

:root {
  --blue: #2563eb;
  --cyan: #0891b2;
  --teal: #0d9488;
  --dark: #0f172a;
  --slate: #1e293b;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.22);
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--dark);
  background: linear-gradient(180deg, #f8fafc 0%, #eef6ff 42%, #f8fafc 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--teal));
  box-shadow: 0 18px 40px rgba(8, 145, 178, 0.24);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 68px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #fff;
  font-weight: 650;
}

.main-nav a,
.nav-dropdown button {
  color: #fff;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  padding: 9px 0;
  opacity: 0.92;
}

.main-nav a:hover,
.main-nav a.active,
.nav-dropdown button:hover {
  opacity: 1;
  color: #dffcff;
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 44px;
  width: 180px;
  padding: 10px;
  display: none;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.94);
  box-shadow: var(--shadow);
}

.nav-dropdown:hover .dropdown-menu {
  display: grid;
  gap: 4px;
}

.dropdown-menu a {
  padding: 10px 12px;
  border-radius: 12px;
}

.dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.1);
}

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

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
  gap: 10px;
  flex-wrap: wrap;
}

.mobile-nav a {
  color: #fff;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

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

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

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

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 12%, rgba(34, 211, 238, 0.35), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.93) 0%, rgba(15, 23, 42, 0.78) 48%, rgba(15, 23, 42, 0.42) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 720px;
  margin: 0 auto;
  padding: 96px 24px 130px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 380px;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  color: #fff;
  max-width: 760px;
}

.eyebrow,
.section-title p,
.inner-hero > p {
  color: #67e8f9;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.22em;
  margin: 0 0 12px;
}

.hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy h2 {
  margin: 0 0 16px;
  color: #a5f3fc;
  font-size: clamp(26px, 4vw, 48px);
  line-height: 1.08;
}

.hero-copy p {
  max-width: 680px;
  color: rgba(226, 232, 240, 0.92);
  font-size: 18px;
  line-height: 1.85;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #e0f2fe;
  font-size: 13px;
  font-weight: 700;
}

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

.primary-btn,
.glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.32);
}

.glass-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.primary-btn:hover,
.glass-btn:hover,
.movie-card:hover,
.category-tile:hover,
.category-card-large:hover {
  transform: translateY(-3px);
}

.hero-poster {
  position: relative;
  display: block;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.45);
  aspect-ratio: 2 / 3;
}

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

.hero-poster span,
.play-dot {
  position: absolute;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.hero-poster span {
  left: 24px;
  bottom: 24px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  font-weight: 900;
}

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

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

.hero-dots button.active {
  width: 68px;
  background: #67e8f9;
}

.hero-rank {
  position: absolute;
  z-index: 6;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 86px;
  width: 340px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.hero-rank-title {
  color: #67e8f9;
  font-weight: 900;
  margin-bottom: 10px;
}

.hero-rank a {
  display: flex;
  gap: 10px;
  color: #e2e8f0;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-weight: 700;
}

.hero-rank span {
  color: #22d3ee;
}

.hero-categories {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  width: min(900px, calc(100% - 32px));
}

.hero-categories a {
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.section-block,
.search-panel,
.category-list-page,
.detail-content,
.player-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px 0;
}

.search-panel {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  align-items: center;
}

.search-panel h2,
.section-title h2,
.inner-hero h1,
.player-section h2,
.detail-content h2 {
  margin: 0;
  color: var(--dark);
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -0.05em;
}

.search-panel p {
  color: var(--muted);
  margin: 10px 0 0;
}

.search-controls {
  padding: 18px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.search-controls input {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 16px;
  outline: none;
}

.search-controls input:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.filter-buttons button {
  border: 0;
  padding: 9px 14px;
  border-radius: 999px;
  color: #0f172a;
  background: #e2e8f0;
  font-weight: 800;
  cursor: pointer;
}

.filter-buttons button.active {
  color: #fff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
}

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

.section-title a {
  color: var(--blue);
  font-weight: 800;
}

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

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

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

.movie-card,
.category-tile,
.category-card-large {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.movie-card:hover,
.category-tile:hover,
.category-card-large:hover {
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
}

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

.poster img {
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

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

.play-dot {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.rank-mark {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 9px;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
  padding: 16px;
}

.meta-line {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  color: #0891b2;
  font-size: 12px;
  font-weight: 900;
}

.card-body h2 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

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

.tag-row span {
  color: #0369a1;
  background: #e0f2fe;
}

.category-tile,
.category-card-large {
  padding: 24px;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-tile span,
.category-num {
  color: #22d3ee;
  font-weight: 900;
  font-size: 34px;
}

.category-tile h2,
.category-card-large h2 {
  margin: 14px 0 10px;
  font-size: 26px;
}

.category-tile p,
.category-card-large p,
.inner-hero p,
.detail-content p {
  color: var(--muted);
  line-height: 1.85;
}

.inner-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 24px;
  color: #fff;
  background:
    radial-gradient(circle at 72% 18%, rgba(34, 211, 238, 0.45), transparent 30%),
    linear-gradient(135deg, #0f172a, #155e75 52%, #0d9488);
}

.inner-hero > * {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.inner-hero h1,
.inner-hero h2,
.inner-hero p {
  color: #fff;
}

.inner-hero h2 {
  max-width: 900px;
  margin-top: 10px;
  font-size: clamp(22px, 3vw, 36px);
}

.breadcrumb {
  margin-top: 20px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: #67e8f9;
  font-weight: 800;
}

.category-samples {
  display: grid;
  gap: 8px;
}

.category-samples a {
  color: #0e7490;
  font-weight: 750;
}

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

.detail-wrap {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 590px;
  margin: 0 auto;
  padding: 70px 24px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

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

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info {
  color: #fff;
}

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

.detail-info p {
  max-width: 820px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.85;
}

.large-tags {
  margin: 20px 0 28px;
}

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

.video-box {
  position: relative;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.26);
  aspect-ratio: 16 / 9;
}

.video-box video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #020617;
}

.play-trigger {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18), rgba(2, 6, 23, 0.58));
}

.play-trigger span {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  color: #fff;
  font-size: 36px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.42);
}

.play-trigger.is-hidden {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-content article {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

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

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

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

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

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.hidden-by-search {
  display: none !important;
}

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

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

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

  .hero-poster,
  .hero-rank {
    display: none;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .brand {
    font-size: 20px;
  }

  .hero-wrap,
  .hero-content {
    min-height: 680px;
  }

  .hero-content {
    padding: 70px 18px 160px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .search-panel,
  .detail-content,
  .detail-wrap,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-wrap {
    padding-top: 38px;
  }

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

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

  .card-body {
    padding: 13px;
  }

  .card-body h2 {
    font-size: 16px;
  }

  .section-block,
  .search-panel,
  .category-list-page,
  .detail-content,
  .player-section {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .rank-grid,
  .full-rank,
  .compact-grid,
  .category-grid,
  .category-list-page {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }
}
