:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #38bdf8;
  --blue-deep: #2563eb;
  --cyan: #67e8f9;
  --accent: #f97316;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
  --radius: 22px;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.18), transparent 30rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 32rem),
    var(--bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--panel-border);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1280px;
  min-height: var(--header-height);
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue-deep), var(--cyan));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.site-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
}

.site-nav a {
  white-space: nowrap;
  font-size: 14px;
  font-weight: 650;
  color: #dbeafe;
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  color: var(--cyan);
  transform: translateY(-1px);
}

.header-search {
  width: min(300px, 25vw);
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.45);
}

.header-search input {
  min-width: 0;
  width: 100%;
  padding: 10px 12px;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
}

.header-search button {
  padding: 10px 14px;
  color: var(--text);
  border: 0;
  background: rgba(37, 99, 235, 0.74);
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
  border-radius: 2px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

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

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 36%, rgba(2, 6, 23, 0.28) 70%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.42) 40%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 1280px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 96px 24px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 780px;
  margin: 14px 0 14px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-shadow: 0 14px 34px rgba(0, 0, 0, 0.48);
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 21px);
}

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

.hero-tags span,
.tag-row span,
.detail-tags a {
  padding: 6px 10px;
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

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

.primary-button,
.ghost-button,
.section-more,
.quick-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button,
.quick-search button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.32);
  border: 0;
  cursor: pointer;
}

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

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.quick-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(14, 165, 233, 0.22);
}

.hero-control {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 34px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.5);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 34px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--cyan);
}

.quick-search,
.content-section,
.ranking-panel,
.page-main,
.detail-main,
.site-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.quick-search {
  margin-top: -42px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 24px;
  align-items: center;
  padding-top: 26px;
  padding-bottom: 26px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.quick-search h2,
.section-head h2,
.page-hero h1,
.detail-copy h1,
.detail-content h2 {
  margin: 8px 0 8px;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.quick-search h2,
.section-head h2,
.page-hero h1 {
  font-size: clamp(28px, 4vw, 46px);
}

.quick-search p,
.section-head p,
.page-hero p {
  margin: 0;
  color: var(--muted);
}

.quick-search form {
  display: flex;
  min-height: 54px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.58);
}

.quick-search input {
  width: 100%;
  min-width: 0;
  padding: 0 16px;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
}

.content-section,
.ranking-panel {
  padding-top: 72px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.5);
}

.movie-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: block;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.32), rgba(8, 47, 73, 0.62)),
    #0f172a;
}

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

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

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

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.86);
}

.movie-info {
  padding: 16px;
}

.movie-meta-line,
.movie-bottom,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.movie-meta-line a {
  color: var(--blue);
  font-weight: 800;
}

.movie-info h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info p,
.ranking-content p {
  margin: 0 0 12px;
  color: var(--soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-bottom {
  margin-top: 12px;
  justify-content: space-between;
}

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.category-tile img,
.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-tile::after,
.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.22));
}

.category-tile span,
.category-tile small,
.category-card div {
  position: relative;
  z-index: 2;
}

.category-tile span,
.category-card h2 {
  font-size: 22px;
  font-weight: 900;
}

.category-tile small,
.category-card p {
  margin-top: 8px;
  color: #cbd5e1;
}

.category-tile:hover img,
.category-card:hover img {
  opacity: 0.58;
  transform: scale(1.08);
}

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

.rank-list li {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-number,
.ranking-index {
  color: var(--cyan);
  font-size: 20px;
  font-weight: 900;
}

.rank-list a {
  font-weight: 800;
}

.rank-list em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-main,
.detail-main {
  padding-top: 34px;
  padding-bottom: 72px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(8, 47, 73, 0.1)),
    rgba(15, 23, 42, 0.84);
  box-shadow: var(--shadow);
}

.compact-hero {
  padding: clamp(34px, 6vw, 74px);
}

.filter-panel {
  margin-top: 26px;
  padding: 20px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
}

.filter-title {
  margin-bottom: 14px;
  color: var(--cyan);
  font-weight: 900;
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
}

.filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  outline: 0;
  background: rgba(2, 6, 23, 0.6);
}

.empty-state {
  margin: 16px 0 0;
  color: var(--muted);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #bfdbfe;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: 28px;
  padding: 28px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 20px;
  background: #0f172a;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.36);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.detail-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 900;
}

.detail-one-line {
  margin: 0 0 20px;
  color: #dbeafe;
  font-size: 18px;
}

.detail-tags {
  margin-top: 20px;
}

.player-section {
  margin-top: 36px;
}

.player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: #000000;
  box-shadow: var(--shadow);
}

.player video {
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: white;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0.26));
  cursor: pointer;
}

.player-start.is-hidden {
  display: none;
}

.player-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue-deep), var(--cyan));
  box-shadow: 0 18px 42px rgba(14, 165, 233, 0.32);
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 4;
  margin: 0;
  color: #e0f2fe;
  font-size: 14px;
  text-align: center;
  pointer-events: none;
}

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

.detail-content article {
  padding: 26px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
}

.detail-content h2 {
  font-size: 26px;
}

.detail-content p {
  margin: 0;
  color: var(--soft);
}

.ranking-grid {
  margin-top: 28px;
  display: grid;
  gap: 16px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 56px 128px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.8);
}

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

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

.ranking-content h2 {
  margin: 6px 0;
  font-size: 22px;
}

.site-footer {
  padding-top: 64px;
  padding-bottom: 42px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 26px;
  padding-top: 30px;
  border-top: 1px solid var(--panel-border);
}

.footer-brand {
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

.site-footer p {
  max-width: 620px;
  margin: 8px 0 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

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

  .site-nav.is-open {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 14px 22px;
    background: rgba(15, 23, 42, 0.98);
    border-bottom: 1px solid var(--panel-border);
  }

  .site-nav.is-open a {
    padding: 12px;
    border-radius: 10px;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .header-search {
    width: 280px;
  }

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

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

@media (max-width: 760px) {
  :root {
    --header-height: 66px;
  }

  .header-inner {
    padding: 0 14px;
    gap: 12px;
  }

  .brand-name {
    font-size: 17px;
  }

  .brand-subtitle {
    display: none;
  }

  .header-search {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: 76vh;
  }

  .hero-content {
    padding: 76px 18px 78px;
  }

  .hero-control {
    display: none;
  }

  .quick-search {
    grid-template-columns: 1fr;
    margin-top: 0;
    border-radius: 0;
  }

  .quick-search,
  .content-section,
  .ranking-panel,
  .page-main,
  .detail-main,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-head,
  .footer-inner {
    display: block;
  }

  .section-more {
    margin-top: 16px;
  }

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

  .rank-list {
    grid-template-columns: 1fr;
  }

  .rank-list li {
    grid-template-columns: 46px 1fr;
  }

  .rank-list em {
    grid-column: 2;
  }

  .filter-grid,
  .detail-hero,
  .detail-content,
  .ranking-card {
    grid-template-columns: 1fr;
  }

  .detail-cover img {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .player-icon {
    width: 62px;
    height: 62px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .category-grid,
  .category-overview {
    grid-template-columns: 1fr;
  }

  .quick-search form {
    display: grid;
  }

  .quick-search button {
    border-radius: 0;
  }
}
