:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --gold: #facc15;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 5%, rgba(34, 211, 238, 0.18), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.16), transparent 34%),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(8, 47, 73, 0.9));
}

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(--line);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.site-header__inner {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.logo__mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.35);
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
  display: none;
}

.desktop-nav a {
  color: #cbd5e1;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.25s ease;
}

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

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  color: #fff;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.top-search input {
  width: 250px;
  padding: 10px 16px;
}

.top-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(34, 211, 238, 0.75);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.top-search button,
.mobile-search button {
  border: 0;
  color: white;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  border: 0;
  color: #fff;
  background: rgba(51, 65, 85, 0.9);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.mobile-panel {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 24px;
  border-top: 1px solid var(--line);
}

.mobile-panel nav {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.mobile-panel a {
  color: #cbd5e1;
  font-weight: 700;
}

.mobile-search input {
  flex: 1;
  padding: 11px 15px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  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.03);
}

.hero-slide__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.1)),
    linear-gradient(0deg, #020617 0%, transparent 34%);
}

.hero-slide__content {
  position: absolute;
  inset: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.hero-kicker,
.section-eyebrow {
  display: inline-flex;
  width: fit-content;
  color: #ecfeff;
  background: rgba(6, 182, 212, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  backdrop-filter: blur(12px);
}

.hero h1 {
  max-width: 760px;
  margin: 18px 0 14px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 19px;
}

.hero-meta,
.detail-meta,
.ranking-row__meta,
.movie-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta span,
.detail-meta span,
.movie-card__meta span,
.ranking-row__meta span {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.button:hover {
  transform: translateY(-2px) scale(1.02);
}

.button--primary {
  color: #fff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.28);
}

.button--ghost {
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 38px;
  line-height: 1;
}

.hero-control--prev {
  left: 24px;
}

.hero-control--next {
  right: 24px;
}

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

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

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

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

.section--flush {
  padding-top: 44px;
}

.section--glass {
  margin-top: 28px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.2), rgba(88, 28, 135, 0.18), rgba(8, 47, 73, 0.22));
  box-shadow: var(--shadow);
}

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

.section-heading h2 {
  margin: 12px 0 0;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.04em;
}

.section-link {
  color: var(--cyan);
  font-weight: 800;
  white-space: nowrap;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.46);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
}

.movie-card__cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.78);
}

.movie-card--compact .movie-card__cover {
  aspect-ratio: 2 / 3;
}

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

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

.movie-card__cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.74), transparent 56%);
  opacity: 0.95;
}

.movie-card__play {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 2;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(6, 182, 212, 0.9);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.movie-card:hover .movie-card__play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-card__badge,
.movie-card__score {
  position: absolute;
  z-index: 2;
  top: 10px;
  color: #fff;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.movie-card__badge {
  left: 10px;
  background: rgba(6, 182, 212, 0.8);
}

.movie-card__score {
  right: 10px;
  background: rgba(0, 0, 0, 0.64);
}

.movie-card__body {
  padding: 15px;
}

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

.movie-card__body h3 a:hover {
  color: var(--cyan);
}

.movie-card__body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--muted);
  font-size: 14px;
}

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

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

.category-tile {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  background:
    radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.28), transparent 35%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.82));
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.42);
}

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

.category-tile small {
  color: #a5b4fc;
  font-size: 14px;
}

.page-hero {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 76px 24px 52px;
  border-radius: 0 0 34px 34px;
  background:
    radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.2));
}

.page-hero--compact {
  padding-top: 58px;
}

.page-hero--rank {
  background:
    radial-gradient(circle at 80% 10%, rgba(250, 204, 21, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(69, 10, 10, 0.62), rgba(15, 23, 42, 0.72));
}

.page-hero h1 {
  margin: 14px 0 12px;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
}

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

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

.ranking-row {
  display: grid;
  grid-template-columns: 58px 94px minmax(0, 1fr) 60px;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 13px;
  background: rgba(15, 23, 42, 0.78);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.ranking-row:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 211, 238, 0.44);
}

.ranking-row__rank {
  color: var(--cyan);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.ranking-row__thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
}

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

.ranking-row__info h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.ranking-row__info h3 a:hover {
  color: var(--cyan);
}

.ranking-row__info p {
  display: -webkit-box;
  margin: 0 0 9px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  color: var(--muted);
  font-size: 14px;
}

.ranking-row__score {
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
  text-align: right;
}

.breadcrumbs {
  max-width: 1280px;
  margin: 22px auto 0;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 14px;
}

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

.detail-hero {
  max-width: 1280px;
  margin: 26px auto 0;
  padding: 0 24px 34px;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  margin: 14px 0 14px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 820px;
  color: #dbeafe;
  font-size: 20px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 6px;
}

.tag-list span {
  color: #e0f2fe;
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-radius: 999px;
  background: rgba(8, 47, 73, 0.42);
  padding: 6px 12px;
  font-weight: 700;
  font-size: 13px;
}

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

.watch-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-overlay__button {
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 0 70px rgba(34, 211, 238, 0.45);
  font-size: 32px;
  padding-left: 5px;
}

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

.content-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  background: rgba(15, 23, 42, 0.75);
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  color: #cbd5e1;
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.95));
}

.site-footer__grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px 30px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-logo {
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.site-footer p,
.site-footer a,
.copyright {
  color: #94a3b8;
}

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

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

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 34px;
  text-align: center;
  font-size: 14px;
}

[hidden],
.is-filter-hidden {
  display: none !important;
}

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

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

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

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

@media (max-width: 860px) {
  .site-header__inner {
    height: auto;
    min-height: 64px;
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .hero {
    min-height: 76vh;
  }

  .hero-slide__content {
    padding: 0 20px 40px;
  }

  .hero-control {
    display: none;
  }

  .section,
  .page-hero,
  .watch-section,
  .detail-hero,
  .breadcrumbs {
    padding-left: 18px;
    padding-right: 18px;
  }

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

  .movie-grid--wide,
  .movie-grid--compact,
  .category-grid,
  .category-grid--large,
  .ranking-list--home,
  .detail-content,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    max-width: 330px;
  }

  .ranking-row {
    grid-template-columns: 44px 82px minmax(0, 1fr);
  }

  .ranking-row__score {
    grid-column: 3;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .logo {
    font-size: 18px;
  }

  .logo__mark {
    width: 30px;
    height: 30px;
  }

  .hero p,
  .detail-one-line,
  .page-hero p {
    font-size: 16px;
  }

  .movie-card__body p {
    min-height: auto;
  }

  .ranking-row__meta span:nth-child(n + 2) {
    display: none;
  }
}
