:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: #111827;
  --panel-strong: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --cyan-soft: rgba(34, 211, 238, 0.18);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  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: radial-gradient(circle at top left, rgba(8, 145, 178, 0.24), transparent 34rem), var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 45px rgba(2, 6, 23, 0.55);
}

.header-inner,
.section-inner,
.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--cyan-strong), #2563eb);
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.22);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

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

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #dbeafe;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}

.main-nav a,
.mobile-panel a,
.footer-links a {
  transition: color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.main-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
  color: var(--cyan);
}

.top-search,
.mobile-search,
.hero-search,
.inline-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-search input,
.mobile-search input,
.hero-search input,
.inline-filter input {
  width: 250px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: var(--text);
  outline: none;
  padding: 11px 16px;
  transition: border 0.22s ease, box-shadow 0.22s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.inline-filter input:focus {
  border-color: var(--cyan-strong);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.top-search button,
.mobile-search button,
.hero-search button,
.primary-button,
.ghost-button {
  border: 0;
  border-radius: 999px;
  color: white;
  cursor: pointer;
  font-weight: 700;
  padding: 11px 18px;
}

.top-search button,
.mobile-search button,
.hero-search button,
.primary-button {
  background: linear-gradient(135deg, var(--cyan-strong), #2563eb);
  box-shadow: 0 16px 35px rgba(6, 182, 212, 0.22);
}

.ghost-button {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.75);
  color: white;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: white;
  margin: 5px 0;
  border-radius: 2px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid var(--line);
}

.mobile-panel.open {
  display: grid;
  gap: 12px;
}

.mobile-panel a {
  padding: 9px 0;
  color: #dbeafe;
}

.hero {
  position: relative;
  height: 580px;
  overflow: hidden;
  background: #020617;
}

.hero-track,
.hero-slide,
.hero-slide img,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 0.85s ease;
}

.hero-slide.active {
  opacity: 1;
}

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

.hero-overlay {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.82) 46%, rgba(2, 6, 23, 0.25) 100%), linear-gradient(0deg, rgba(2, 6, 23, 1), transparent 35%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
}

.hero-badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: var(--cyan-soft);
  color: #67e8f9;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 7px 12px;
  text-transform: uppercase;
}

.hero h1 {
  margin: 22px 0 16px;
  max-width: 720px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: 19px;
  line-height: 1.8;
}

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

.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: white;
  cursor: pointer;
  font-size: 34px;
}

.hero-nav.prev {
  left: 22px;
}

.hero-nav.next {
  right: 22px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 0.22s ease, background 0.22s ease;
}

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

.quick-search-section {
  margin-top: -72px;
  position: relative;
  z-index: 10;
}

.glass-panel {
  display: grid;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.glass-panel h2,
.section-heading h2,
.ranking-panel h2,
.page-hero h1,
.detail-card h1,
.story-panel h2,
.footer-links h2 {
  margin: 0;
}

.glass-panel h2 {
  margin-top: 12px;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.glass-panel p {
  color: var(--muted);
  line-height: 1.8;
}

.hero-search input {
  flex: 1;
  width: 100%;
  min-width: 220px;
}

.category-chips,
.tag-cloud,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-chips a,
.tag-cloud span,
.movie-tags span {
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
}

.category-chips a:hover {
  color: white;
  border-color: var(--cyan-strong);
  background: rgba(6, 182, 212, 0.22);
}

.content-section {
  padding: 58px 0 0;
}

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

.section-heading h2,
.ranking-panel h2 {
  margin-top: 10px;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.04em;
}

.section-heading a,
.ranking-panel a {
  color: var(--cyan);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94));
  box-shadow: 0 14px 38px rgba(2, 6, 23, 0.24);
  transition: transform 0.28s ease, border 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 24px 65px rgba(6, 182, 212, 0.12);
}

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

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

.poster-link img {
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 62%);
  opacity: 0.76;
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.94);
  color: white;
  box-shadow: 0 12px 25px rgba(6, 182, 212, 0.3);
}

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

.movie-card h2 {
  margin: 12px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

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

.movie-card p,
.ranking-card p,
.category-card-large p,
.page-hero p,
.story-panel p,
.detail-card p {
  color: var(--muted);
  line-height: 1.75;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 700;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.86);
  padding: 24px;
  box-shadow: var(--shadow);
}

.ranking-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.ranking-row:last-child {
  border-bottom: 0;
}

.rank-num {
  color: var(--cyan);
  font-weight: 900;
  font-size: 18px;
}

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

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

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

.category-tile,
.category-card-large {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(8, 47, 73, 0.78));
  padding: 22px;
  min-height: 170px;
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.24);
}

.category-tile strong,
.category-card-large h2 {
  font-size: 23px;
}

.category-tile span,
.category-card-large p {
  color: #cbd5e1;
  line-height: 1.7;
}

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

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

.category-samples a {
  color: #dbeafe;
  font-weight: 700;
}

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

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

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

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

.movie-card.compact p {
  display: none;
}

.page-hero,
.detail-hero {
  background: radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.18), transparent 28rem), linear-gradient(180deg, #0f172a, #020617);
  border-bottom: 1px solid var(--line);
}

.page-hero .section-inner {
  padding: 78px 0 44px;
}

.slim-hero .section-inner {
  padding-top: 72px;
}

.page-hero h1 {
  margin-top: 18px;
  font-size: clamp(38px, 6vw, 64px);
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 760px;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 26px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--cyan);
  font-weight: 700;
}

.inline-filter {
  margin-top: 24px;
}

.inline-filter input {
  width: min(620px, 100%);
}

.search-wide input {
  width: min(780px, 100%);
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.84);
  padding: 16px;
}

.ranking-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  background: #0f172a;
}

.ranking-poster span {
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.95);
  color: white;
  font-weight: 900;
  padding: 6px 9px;
}

.ranking-card h2 {
  margin: 10px 0 8px;
  font-size: 24px;
}

.detail-hero .section-inner {
  padding: 36px 0 54px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start;
}

.player-area,
.detail-card,
.story-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: var(--shadow);
}

.player-area {
  padding: 14px;
}

.video-stage {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  background: #020617;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.72));
  color: white;
  cursor: pointer;
}

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

.play-large {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan-strong), #2563eb);
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.33);
  font-size: 26px;
}

.play-layer strong {
  margin-top: 92px;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
}

.detail-card {
  padding: 18px;
}

.detail-card img {
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  margin-bottom: 16px;
  background: #0f172a;
}

.detail-card h1 {
  margin-top: 14px;
  font-size: 32px;
  line-height: 1.16;
  letter-spacing: -0.04em;
}

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

.story-panel {
  padding: 28px;
}

.story-panel h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

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

.tag-cloud {
  margin-top: 24px;
}

.empty-state {
  display: none;
  margin: 28px 0 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(15, 23, 42, 0.82);
  text-align: center;
}

.empty-state.show {
  display: block;
}

.site-footer {
  margin-top: 76px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.92);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 42px 0;
}

.footer-brand p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-logo {
  margin-bottom: 16px;
}

.footer-links div {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  color: #cbd5e1;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

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

  .menu-toggle {
    display: block;
  }

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

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

  .ranking-panel {
    position: static;
  }

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

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

  .hero {
    height: 520px;
  }

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

  .hero-nav {
    display: none;
  }

  .quick-search-section {
    margin-top: -34px;
  }

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

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

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .section-inner,
  .footer-inner,
  .copyright,
  .mobile-panel {
    width: min(100% - 22px, 1180px);
  }

  .brand-text small {
    display: none;
  }

  .hero {
    height: 500px;
  }

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

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

  .glass-panel,
  .story-panel {
    padding: 20px;
  }

  .movie-grid,
  .small-grid,
  .category-grid,
  .category-page-grid,
  .movie-list-row {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .primary-button,
  .ghost-button {
    text-align: center;
  }
}
