
:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.78);
  --card: #ffffff;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --ink: #0f172a;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --gold: #fbbf24;
  --rose: #fb7185;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #f8fafc;
}

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

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

button,
input {
  font: inherit;
}

main {
  min-height: 70vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 10px 36px rgba(2, 6, 23, 0.28);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand span:last-child {
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #031422;
  font-size: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.35);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.desktop-nav a,
.mobile-link-grid a {
  color: #cbd5e1;
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-link-grid a:hover {
  color: var(--cyan);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border-radius: 999px;
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.nav-search input,
.mobile-nav input,
.large-search input {
  width: 230px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 10px 14px;
}

.nav-search input::placeholder,
.mobile-nav input::placeholder,
.large-search input::placeholder {
  color: #94a3b8;
}

.nav-search button,
.mobile-nav button,
.large-search button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  color: #07111f;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  font-weight: 800;
  padding: 10px 16px;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: #1e293b;
  border-radius: 12px;
  padding: 9px 12px;
  cursor: pointer;
}

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

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

.mobile-nav form {
  display: flex;
  margin-bottom: 12px;
  border-radius: 18px;
  background: #1e293b;
  overflow: hidden;
}

.mobile-nav input {
  flex: 1;
  width: auto;
}

.mobile-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-link-grid a {
  padding: 10px 12px;
  border-radius: 12px;
  background: #1e293b;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transition: opacity 0.8s ease, transform 1.2s ease;
  transform: scale(1.03);
}

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

.hero-content {
  width: min(760px, calc(100% - 40px));
  margin-left: max(24px, calc((100vw - 1280px) / 2 + 16px));
  padding-top: 44px;
}

.eyebrow,
.section-head p,
.page-hero p,
.detail-info .eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.hero-line {
  width: min(680px, 100%);
  margin: 24px 0 0;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-tags,
.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.hero-tags span,
.movie-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.16);
  border: 1px solid rgba(34, 211, 238, 0.28);
  font-size: 12px;
  font-weight: 700;
}

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

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

.primary-btn {
  color: #031422;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 18px 38px rgba(34, 211, 238, 0.25);
}

.ghost-btn {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(226, 232, 240, 0.18);
  backdrop-filter: blur(14px);
}

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

.hero-panel {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  width: min(1280px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-thumbs {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.hero-thumb,
.hero-arrow {
  border: 1px solid rgba(226, 232, 240, 0.16);
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(18px);
  cursor: pointer;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 9px;
  border-radius: 18px;
  text-align: left;
}

.hero-thumb.is-active {
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 14px 40px rgba(34, 211, 238, 0.18);
}

.hero-thumb img {
  width: 72px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  background: #1e293b;
}

.hero-thumb span {
  overflow: hidden;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.content-section,
.category-strip,
.detail-content {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.category-strip {
  padding-top: 56px;
}

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

.section-head.centered {
  display: block;
  text-align: center;
}

.section-head h2,
.ranking-column h2,
.detail-text h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head.light h2,
.section-head.light p {
  color: #fff;
}

.section-link {
  min-height: 40px;
  color: #0e7490;
  background: #ecfeff;
}

.section-link.light {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.12);
}

.chip-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.chip-grid a,
.category-card,
.category-overview {
  display: block;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chip-grid a {
  padding: 18px 16px;
  text-align: center;
  font-weight: 900;
}

.chip-grid a:hover,
.category-card:hover,
.category-overview:hover,
.ranking-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.28);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: 0 26px 58px rgba(15, 23, 42, 0.2);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #334155);
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .movie-cover img {
  transform: scale(1.08);
}

.movie-duration {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.75);
  font-size: 12px;
  font-weight: 800;
}

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(2, 6, 23, 0.32);
  font-size: 46px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
}

.movie-info {
  padding: 18px;
}

.movie-info h3 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.3;
}

.movie-info h3 a:hover {
  color: #0891b2;
}

.movie-info p {
  min-height: 46px;
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.movie-meta span,
.detail-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.compact-card .movie-info p {
  min-height: 0;
}

.ranking-band {
  padding: 64px max(16px, calc((100% - 1280px) / 2));
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.22), transparent 35%), linear-gradient(135deg, #0f172a, #020617);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 88px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  color: #fff;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rank-no,
.ranking-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), #f97316);
  font-weight: 900;
}

.rank-row img {
  width: 88px;
  height: 54px;
  object-fit: cover;
  border-radius: 12px;
  background: #1e293b;
}

.rank-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  color: var(--gold);
  font-style: normal;
  font-weight: 900;
}

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

.category-card {
  min-height: 158px;
  padding: 24px;
}

.category-card span,
.category-overview h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p,
.category-overview p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.75;
}

.page-hero,
.detail-hero {
  position: relative;
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.26), transparent 35%), linear-gradient(135deg, #020617, #0f172a 58%, #172554);
  overflow: hidden;
}

.page-hero > div {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0;
}

.small-hero > div,
.category-hero > div {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

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

.page-hero span {
  display: block;
  width: min(760px, 100%);
  margin-top: 20px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.inline-actions {
  margin-top: 26px;
}

.category-overview {
  overflow: hidden;
  background: #0f172a;
}

.category-overview > div:last-child {
  padding: 20px;
}

.category-collage {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  height: 118px;
  background: #1e293b;
}

.category-collage img {
  width: 100%;
  height: 118px;
  object-fit: cover;
}

.ranking-layout {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: 64px 0;
}

.ranking-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ranking-column h2 {
  margin-bottom: 10px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 42px 96px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-card img {
  width: 96px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
  background: #1e293b;
}

.ranking-card h3 {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 16px;
}

.ranking-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.large-search {
  display: flex;
  width: min(620px, 100%);
  margin-top: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  overflow: hidden;
}

.large-search input {
  flex: 1;
  width: auto;
  padding: 16px 20px;
}

.large-search button {
  min-width: 112px;
  border-radius: 0;
}

.search-empty {
  display: none;
  margin-bottom: 22px;
  padding: 20px;
  border-radius: 18px;
  color: #0f172a;
  background: #e0f2fe;
  font-weight: 800;
}

.search-empty.is-visible {
  display: block;
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.05);
}

.detail-wrap {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 72px;
}

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

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  gap: 30px;
  align-items: center;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #fff;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.42));
  transition: opacity 0.25s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  color: #031422;
  font-size: 34px;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 24px 60px rgba(34, 211, 238, 0.38);
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-line {
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta span {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding: 30px;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.1);
}

.detail-text h2 {
  font-size: 28px;
}

.detail-text p {
  margin: 0;
  color: #475569;
  font-size: 17px;
  line-height: 1.95;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding: 52px 0;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.footer-grid p,
.footer-grid li {
  color: #94a3b8;
  line-height: 1.8;
  font-size: 14px;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 13px;
}

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

  .mobile-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

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

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

@media (max-width: 760px) {
  .nav-wrap {
    width: min(100% - 24px, 1280px);
  }

  .brand {
    font-size: 17px;
  }

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

  .hero-content {
    margin: 0 auto;
    padding-top: 70px;
  }

  .hero-panel {
    bottom: 18px;
  }

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

  .hero-thumb {
    display: none;
  }

  .hero-thumb.is-active {
    display: grid;
  }

  .chip-grid,
  .movie-grid,
  .rank-list,
  .ranking-layout,
  .category-card-grid,
  .category-overview-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .rank-row {
    grid-template-columns: 38px 72px 1fr;
  }

  .rank-row em {
    display: none;
  }

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

  .page-hero > div,
  .content-section,
  .category-strip,
  .detail-content,
  .detail-wrap {
    width: min(100% - 24px, 1280px);
  }

  .detail-hero {
    min-height: auto;
  }

  .player-shell {
    border-radius: 18px;
  }

  .detail-wrap {
    padding-bottom: 42px;
  }
}
