:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-panel: rgba(15, 23, 42, 0.86);
  --bg-card: #1e293b;
  --bg-card-2: #111827;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-2: #06b6d4;
  --blue: #3b82f6;
  --yellow: #facc15;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
  --radius: 18px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.15), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark,
.footer-logo span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.34);
  font-size: 14px;
}

.logo-text {
  font-size: 25px;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--cyan);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.header-search,
.mobile-search,
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-search input,
.mobile-search input,
.page-filter,
.filter-row input,
.filter-row select {
  border: 1px solid rgba(148, 163, 184, 0.2);
  outline: none;
  color: white;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 999px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.header-search input,
.mobile-search input {
  width: 220px;
  padding: 10px 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.page-filter:focus,
.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14);
  background: rgba(2, 6, 23, 0.92);
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.ghost-button,
.player-overlay,
.hero-arrow,
.section-more,
.filter-row button {
  border: 0;
  cursor: pointer;
}

.header-search button,
.mobile-search button,
.primary-button,
.filter-row button {
  padding: 10px 18px;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  background: linear-gradient(90deg, var(--cyan-2), var(--blue));
  box-shadow: 0 14px 30px rgba(6, 182, 212, 0.2);
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.filter-row button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.menu-button {
  display: none;
  flex-direction: column;
  gap: 5px;
  margin-left: auto;
  padding: 8px;
  border: 0;
  background: transparent;
}

.menu-button span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 99px;
}

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

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

.mobile-search {
  margin-bottom: 14px;
}

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

.mobile-nav {
  display: grid;
  gap: 10px;
}

main {
  min-height: 66vh;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.12)),
    linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.96));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  min-height: 70vh;
  padding: 78px 0 92px;
}

.hero-copy {
  max-width: 680px;
}

.hero-kicker,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  color: white;
  font-size: 14px;
  font-weight: 800;
  background: rgba(6, 182, 212, 0.82);
  backdrop-filter: blur(12px);
}

.hero-copy h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0;
  color: #d1d5db;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta {
  color: var(--muted);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 30px;
}

.hero-meta span,
.detail-meta span,
.rank-meta span {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 850;
  transition: transform 0.25s ease, filter 0.25s ease, background 0.25s ease;
}

.secondary-button,
.ghost-button {
  color: white;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.24);
  backdrop-filter: blur(12px);
}

.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
  background: rgba(30, 41, 59, 0.82);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(10px);
  font-size: 28px;
  line-height: 1;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.68);
}

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

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

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  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: 28px;
  background: var(--cyan);
}

.section-block,
.page-hero,
.detail-page,
.search-page {
  padding: 58px 0;
}

.page-hero {
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.16), transparent 26rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.1));
  border-bottom: 1px solid var(--line);
}

.page-title {
  max-width: 820px;
}

.page-title h1,
.detail-title h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.14;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.page-title p,
.detail-title p {
  margin: 0;
  color: var(--muted-2);
  line-height: 1.8;
  font-size: 17px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.18);
  white-space: nowrap;
}

.section-more:hover {
  background: rgba(34, 211, 238, 0.16);
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
}

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.82);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-link:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.42);
}

.card-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0f172a;
}

.card-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, filter 0.35s ease;
}

.card-link:hover .card-poster img {
  transform: scale(1.08);
  filter: saturate(1.08);
}

.card-shade {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.02), rgba(2, 6, 23, 0.78));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-link:hover .card-shade {
  opacity: 1;
}

.play-dot {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: white;
  background: rgba(6, 182, 212, 0.9);
  box-shadow: 0 16px 40px rgba(6, 182, 212, 0.35);
  transform: scale(0.76);
  transition: transform 0.3s ease;
}

.card-link:hover .play-dot {
  transform: scale(1);
}

.card-type,
.card-score,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 8px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.card-type {
  left: 10px;
  background: rgba(6, 182, 212, 0.88);
}

.card-score {
  right: 10px;
  color: #111827;
  background: rgba(250, 204, 21, 0.94);
}

.rank-badge {
  top: auto;
  bottom: 10px;
  left: 10px;
  background: rgba(251, 113, 133, 0.9);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 9px;
  color: white;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-link:hover h3 {
  color: var(--cyan);
}

.card-meta {
  margin: 0 0 10px;
  font-size: 13px;
}

.card-desc {
  margin: 0;
  min-height: 48px;
  color: #cbd5e1;
  line-height: 1.65;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-line span,
.detail-tags span,
.category-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  color: #baf6ff;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.14);
  font-size: 12px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 188px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 12rem),
    rgba(30, 41, 59, 0.78);
  box-shadow: var(--shadow);
  transition: transform 0.28s ease, border-color 0.28s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.34);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: var(--muted-2);
  line-height: 1.75;
}

.category-card .category-chip {
  margin-top: 18px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 80px 168px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.72);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  color: white;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.86), rgba(59, 130, 246, 0.86));
}

.rank-cover {
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  background: #0f172a;
}

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

.rank-content h2,
.rank-content h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 850;
}

.rank-content p {
  margin: 0 0 10px;
  color: var(--muted-2);
  line-height: 1.7;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
}

.page-tools {
  display: grid;
  gap: 14px;
  margin: 24px 0 28px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
}

.page-filter {
  width: min(420px, 100%);
  padding: 12px 16px;
}

.filter-row {
  flex-wrap: wrap;
}

.filter-row input,
.filter-row select {
  min-height: 44px;
  padding: 10px 14px;
}

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

.filter-row select {
  min-width: 150px;
}

.empty-message {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--muted-2);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

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

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
  gap: 30px;
  align-items: start;
}

.detail-main,
.detail-side,
.info-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-main {
  overflow: hidden;
}

.player-stage {
  position: relative;
  overflow: hidden;
  background: #000;
}

.player-stage video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.6));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-2), var(--blue));
  box-shadow: 0 20px 70px rgba(34, 211, 238, 0.42);
  font-size: 34px;
  text-indent: 5px;
}

.detail-copy {
  padding: 26px;
}

.detail-title h1 {
  margin-bottom: 12px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
}

.detail-section {
  margin-top: 28px;
}

.detail-section h2,
.detail-side h2,
.info-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 900;
}

.detail-section p,
.info-panel p {
  margin: 0;
  color: var(--muted-2);
  line-height: 1.95;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.detail-side {
  padding: 20px;
}

.side-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.side-card:last-child {
  border-bottom: 0;
}

.side-card img {
  width: 96px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  background: #0f172a;
}

.side-card h3 {
  margin: 0 0 7px;
  font-size: 15px;
  line-height: 1.35;
}

.side-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.prev-next a {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.64);
  color: var(--muted-2);
}

.prev-next a:hover {
  color: white;
  border-color: rgba(34, 211, 238, 0.34);
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), #020617);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 0.9fr;
  gap: 28px;
  padding: 44px 0;
}

.footer-brand p,
.footer-block p,
.footer-block a {
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

.footer-brand p {
  margin: 16px 0 0;
  max-width: 420px;
}

.footer-block h2 {
  margin: 0 0 12px;
  color: white;
  font-size: 17px;
  font-weight: 850;
}

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

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

@media (max-width: 980px) {
  .header-search,
  .main-nav {
    display: none;
  }

  .menu-button {
    display: flex;
  }

  .hero-arrow {
    display: none;
  }

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

  .rank-item {
    grid-template-columns: 52px 128px 1fr;
  }

  .rank-item .primary-button {
    grid-column: 3;
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .footer-inner,
  .container,
  .mobile-panel {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    height: 62px;
  }

  .logo-text {
    font-size: 20px;
  }

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

  .hero-content {
    padding: 66px 0 82px;
  }

  .hero-meta {
    gap: 8px;
  }

  .section-block,
  .page-hero,
  .detail-page,
  .search-page {
    padding: 38px 0;
  }

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

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

  .rank-item {
    grid-template-columns: 48px 1fr;
    align-items: start;
  }

  .rank-cover {
    grid-column: 1 / -1;
  }

  .rank-item .primary-button {
    grid-column: 1 / -1;
  }

  .detail-copy,
  .detail-side {
    padding: 18px;
  }

  .prev-next {
    grid-template-columns: 1fr;
  }
}
