:root {
  --bg: #0f172a;
  --bg-soft: #111c33;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #111827;
  --panel-border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --accent: #38bdf8;
  --danger: #ef4444;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% -10%, rgba(34, 211, 238, 0.16), transparent 28rem),
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.22), transparent 32rem),
    linear-gradient(180deg, #0f172a 0%, #111827 48%, #0f172a 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.92), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #3b82f6, #22d3ee);
  box-shadow: 0 10px 25px rgba(34, 211, 238, 0.28);
}

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

.nav-link,
.mobile-link {
  color: #dbeafe;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link {
  padding: 22px 0;
  border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #67e8f9;
  border-color: #22d3ee;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}

.nav-search input,
.inline-filter input,
.big-search input {
  width: 230px;
  color: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  outline: none;
  padding: 10px 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.inline-filter input:focus,
.big-search input:focus {
  border-color: rgba(34, 211, 238, 0.8);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.nav-search button,
.btn,
.play-button {
  border: 0;
  cursor: pointer;
  color: #ffffff;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.24);
  transition: transform 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.nav-search button:hover,
.btn:hover,
.play-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  color: #ffffff;
  background: transparent;
  border: 0;
  font-size: 28px;
}

.mobile-panel {
  padding: 0 24px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-link {
  display: block;
  padding: 12px 0;
}

main {
  min-height: 70vh;
}

.hero-carousel {
  position: relative;
  height: clamp(560px, 74vh, 760px);
  overflow: hidden;
  background: #0f172a;
}

.hero-slide,
.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.72) 45%, rgba(15, 23, 42, 0.28) 100%),
    linear-gradient(180deg, rgba(8, 13, 29, 0) 0%, #0f172a 100%),
    var(--hero-bg, linear-gradient(135deg, #0f172a, #1e3a8a));
  background-size: cover;
  background-position: center;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

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

.hero-slide::before,
.page-hero::before,
.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 20%, rgba(34, 211, 238, 0.18), transparent 24rem),
    radial-gradient(circle at 72% 10%, rgba(59, 130, 246, 0.18), transparent 28rem);
  pointer-events: none;
}

.hero-content,
.detail-copy,
.page-hero {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-content {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1180px;
  padding: 80px 0 120px;
}

.eyebrow,
.section-kicker {
  color: #67e8f9;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 10px;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-desc,
.detail-line,
.page-hero p {
  max-width: 720px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  margin: 22px 0 0;
}

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

.hero-meta span,
.detail-meta span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.54);
  padding: 4px 12px;
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.btn.ghost,
.btn.secondary {
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: none;
}

.btn.secondary {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.24), rgba(6, 182, 212, 0.22));
}

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

.hero-prev,
.hero-next,
.hero-dot {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 9px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
}

.hero-dot.active {
  width: 30px;
  border-radius: 999px;
  background: #22d3ee;
}

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

.intro-panel,
.category-block,
.player-section,
.detail-main,
.detail-side {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.76));
  box-shadow: var(--shadow);
}

.intro-panel {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 30px;
}

.intro-panel h2,
.section-heading h2,
.category-block h2,
.detail-main h2,
.detail-side h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
}

.intro-panel p,
.category-block p,
.detail-main p,
.detail-side dd,
.site-footer p {
  color: var(--muted-strong);
}

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

.section-heading.compact {
  align-items: center;
  margin-bottom: 18px;
}

.section-heading a {
  color: #67e8f9;
  font-weight: 700;
}

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

.category-chip,
.category-block {
  position: relative;
  overflow: hidden;
}

.category-chip {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(34, 211, 238, 0.13), transparent 16rem),
    linear-gradient(145deg, rgba(30, 41, 59, 0.72), rgba(15, 23, 42, 0.88));
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-chip:hover,
.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.44);
}

.category-chip-name {
  font-size: 21px;
  font-weight: 800;
}

.category-chip-desc,
.category-chip-sample {
  color: var(--muted);
  font-size: 14px;
}

.category-block {
  padding: 28px;
  margin: 34px auto;
  width: min(1180px, calc(100% - 32px));
}

.category-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-card-link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.poster {
  position: relative;
  aspect-ratio: 2 / 2.85;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(8, 13, 29, 0.18), rgba(8, 13, 29, 0.86)),
    radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.26), transparent 12rem),
    var(--poster),
    linear-gradient(135deg, #1d4ed8, #0f172a 60%, #0891b2);
  background-size: cover;
  background-position: center;
}

.poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.96), transparent);
}

.poster-year,
.poster-type {
  position: absolute;
  z-index: 1;
  top: 12px;
  display: inline-flex;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  padding: 4px 9px;
  backdrop-filter: blur(8px);
}

.poster-year {
  left: 12px;
  background: rgba(37, 99, 235, 0.78);
}

.poster-type {
  right: 12px;
  background: rgba(6, 182, 212, 0.72);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  min-height: 3.1em;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 18px;
  line-height: 1.38;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: #67e8f9;
}

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-line {
  margin-top: 8px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.tag-row span,
.detail-tags a {
  min-height: 24px;
  padding: 2px 9px;
  color: #bae6fd;
  font-size: 12px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.35fr);
  gap: 28px;
  align-items: start;
}

.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.68);
}

.rank-item a {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px 14px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  transition: background 0.2s ease;
}

.rank-item:last-child a {
  border-bottom: 0;
}

.rank-item a:hover {
  background: rgba(34, 211, 238, 0.08);
}

.rank-number {
  grid-row: span 2;
  color: #67e8f9;
  font-size: 22px;
  font-weight: 900;
}

.rank-title {
  font-weight: 800;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

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

.wide-rank .rank-item a {
  border-right: 1px solid rgba(148, 163, 184, 0.12);
}

.page-hero {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 0 0 34px 34px;
  padding: 96px 0;
}

.simple-hero,
.search-hero,
.rank-hero {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background:
    radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.18), transparent 28rem),
    linear-gradient(135deg, rgba(30, 64, 175, 0.38), rgba(15, 23, 42, 0.96));
}

.big-search {
  margin-top: 28px;
}

.big-search input {
  width: min(640px, 100%);
  padding: 16px 22px;
  font-size: 18px;
}

.detail-hero {
  min-height: 560px;
  display: flex;
  align-items: center;
}

.detail-copy {
  padding: 90px 0;
}

.player-section {
  padding: 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 30%, rgba(34, 211, 238, 0.12), transparent 20rem),
    #020617;
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  min-width: 132px;
  min-height: 52px;
  font-size: 18px;
}

.play-button:hover {
  transform: translate(-50%, calc(-50% - 2px));
}

.player-status {
  margin: 14px 6px 0;
  color: var(--muted-strong);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.detail-main,
.detail-side {
  padding: 28px;
}

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

.detail-main p {
  font-size: 17px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px 14px;
  margin: 18px 0 0;
}

.detail-side dt {
  color: #67e8f9;
  font-weight: 800;
}

.detail-side dd {
  margin: 0;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.45);
}

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

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 12px;
}

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

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

.filter-empty {
  grid-column: 1 / -1;
  border: 1px dashed rgba(148, 163, 184, 0.26);
  border-radius: 18px;
  padding: 24px;
  color: var(--muted-strong);
  text-align: center;
}

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

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

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

  .split-section,
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .navbar {
    height: 62px;
  }

  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .logo {
    font-size: 19px;
  }

  .hero-carousel {
    height: 640px;
  }

  .hero-content {
    padding-top: 60px;
  }

  .intro-panel,
  .category-block-head,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-grid,
  .movie-grid,
  .small-grid,
  .all-grid,
  .mini-grid,
  .wide-rank,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .wide-rank .rank-item a {
    border-right: 0;
  }

  .page-hero {
    min-height: 360px;
    padding-top: 78px;
    padding-bottom: 58px;
  }

  .detail-hero {
    min-height: 520px;
  }

  .detail-copy {
    padding: 70px 0;
  }
}

@media (max-width: 520px) {
  .content-section,
  .hero-content,
  .detail-copy,
  .footer-grid {
    width: min(100% - 24px, 1180px);
  }

  .hero-actions,
  .detail-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .category-block,
  .detail-main,
  .detail-side {
    padding: 20px;
  }
}
