:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --cyan: #0891b2;
  --teal: #0d9488;
  --emerald: #059669;
  --dark: #0f172a;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(135deg, #ecfeff 0%, #f8fafc 42%, #f0fdfa 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(229, 231, 235, 0.82);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--teal), var(--emerald));
  box-shadow: var(--soft-shadow);
}

.brand-text {
  font-size: 20px;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #374151;
  font-weight: 650;
  transition: color 0.2s ease, background-color 0.2s ease;
}

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

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--dark);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

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

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 74% 40%, rgba(20, 184, 166, 0.36), transparent 34%), linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.76), rgba(15, 23, 42, 0.22));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 48px));
  color: #ffffff;
  padding: 110px 0;
}

.eyebrow,
.section-kicker {
  font-size: 14px;
  line-height: 1.4;
  color: #06b6d4;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 760px;
  margin: 14px 0 20px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 720px;
  margin: 0;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.85;
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ecfeff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 700;
}

.tag-row span,
.detail-tags span {
  color: var(--cyan);
  background: #ecfeff;
  border-color: #cffafe;
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.32);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.ghost-btn.dark {
  color: var(--cyan);
  background: #ecfeff;
  border-color: #cffafe;
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--soft-shadow);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.hero-dot.active {
  width: 34px;
  background: #ffffff;
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
}

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

.section-light {
  max-width: none;
  background: rgba(255, 255, 255, 0.58);
}

.section-light > .section-head,
.section-light > .rank-grid {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

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

.section-head.center {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  display: block;
}

.section-head h2,
.page-hero h1,
.detail-info h1 {
  margin: 8px 0 0;
  color: var(--dark);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p {
  color: var(--muted);
  line-height: 1.8;
}

.text-link {
  color: var(--cyan);
  font-weight: 800;
}

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

.category-tile,
.category-card-large {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-card-large:hover,
.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  opacity: 0.82;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 18%, rgba(15, 23, 42, 0.86));
}

.category-tile span,
.category-tile small {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
  color: #ffffff;
}

.category-tile span {
  bottom: 52px;
  font-size: 20px;
  font-weight: 900;
}

.category-tile small {
  bottom: 18px;
  color: #d1d5db;
  line-height: 1.45;
}

.category-card-large {
  min-height: auto;
  padding: 18px;
  display: grid;
  gap: 18px;
}

.category-card-large h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 900;
}

.category-card-large p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-thumbs {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 8px;
  height: 140px;
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
  padding: 16px;
  border: 1px solid rgba(229, 231, 235, 0.82);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--soft-shadow);
}

.search-box,
.select-box {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-box {
  flex: 1 1 320px;
}

.select-box {
  flex: 0 0 180px;
}

.search-box input,
.select-box select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--dark);
  background: #ffffff;
  outline: none;
}

.search-box input:focus,
.select-box select:focus {
  border-color: #67e8f9;
  box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.22);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--emerald));
  box-shadow: var(--soft-shadow);
}

.movie-card-body {
  padding: 18px;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.movie-card h2 {
  margin: 10px 0 8px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 900;
}

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

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

.movie-card.compact {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
}

.movie-card.compact .poster-link {
  aspect-ratio: auto;
  min-height: 168px;
}

.movie-card.compact .movie-card-body {
  padding: 16px;
}

.movie-card.compact h2 {
  font-size: 18px;
}

.page-hero,
.detail-hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 70px 24px 24px;
}

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

.simple-hero > div,
.category-hero > div,
.ranking-hero > div {
  width: 100%;
  padding: 48px;
  border-radius: 32px;
  color: #ffffff;
  background: radial-gradient(circle at 82% 20%, rgba(16, 185, 129, 0.3), transparent 32%), linear-gradient(135deg, #0f172a, #164e63 54%, #0f766e);
  box-shadow: var(--shadow);
}

.simple-hero h1,
.category-hero h1,
.ranking-hero h1,
.simple-hero p,
.category-hero p,
.ranking-hero p {
  color: #ffffff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: var(--muted);
  font-weight: 700;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 0.72fr);
  gap: 28px;
  align-items: stretch;
}

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(2, 6, 23, 0.62), rgba(8, 145, 178, 0.24));
}

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

.play-button {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--emerald));
  box-shadow: 0 18px 44px rgba(8, 145, 178, 0.42);
  cursor: pointer;
}

.play-button span {
  display: inline-block;
  margin-left: 6px;
  font-size: 34px;
}

.detail-info {
  padding: 32px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
}

.detail-info h1 {
  margin-top: 12px;
}

.lead-text {
  margin: 18px 0 22px;
  color: #374151;
  font-size: 18px;
  line-height: 1.8;
}

.detail-content {
  padding-top: 30px;
}

.detail-main {
  display: grid;
  gap: 24px;
}

.detail-section {
  padding: 30px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--soft-shadow);
}

.detail-section h2 {
  margin: 0 0 14px;
  color: var(--dark);
  font-size: 28px;
  font-weight: 900;
}

.detail-section p {
  margin: 0;
  color: #374151;
  font-size: 17px;
  line-height: 2;
}

.site-footer {
  margin-top: 30px;
  color: #d1d5db;
  background: #0f172a;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  gap: 16px;
}

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

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

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

.footer-inner p {
  margin: 0;
}

.is-filtered-out {
  display: none !important;
}

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

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

@media (max-width: 820px) {
  .header-inner {
    padding: 12px 18px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    border-radius: 14px;
  }

  .hero-slider {
    min-height: 570px;
  }

  .hero-content {
    width: min(100% - 32px, 720px);
    padding: 88px 0;
  }

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

  .section,
  .page-hero,
  .detail-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section {
    padding-top: 50px;
    padding-bottom: 50px;
  }

  .section-head {
    display: block;
  }

  .section-head .text-link {
    display: inline-flex;
    margin-top: 12px;
  }

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

  .movie-card.compact {
    grid-template-columns: 1fr;
  }

  .movie-card.compact .poster-link {
    aspect-ratio: 16 / 10;
  }

  .simple-hero > div,
  .category-hero > div,
  .ranking-hero > div {
    padding: 32px 24px;
  }
}

@media (max-width: 560px) {
  .brand-text {
    font-size: 17px;
  }

  .hero-slider {
    min-height: 620px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

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

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

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

  .filter-bar {
    display: grid;
  }

  .select-box {
    flex: 1 1 auto;
  }

  .detail-info,
  .detail-section {
    padding: 22px;
  }

  .player-card {
    border-radius: 22px;
  }
}
