:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-2: #111827;
  --panel: rgba(30, 41, 59, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-2: #06b6d4;
  --blue: #2563eb;
  --shadow: 0 24px 60px rgba(2, 8, 23, 0.42);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.18), transparent 30rem),
    radial-gradient(circle at 85% 12%, rgba(37, 99, 235, 0.22), transparent 32rem),
    linear-gradient(180deg, #0f172a 0%, #111827 48%, #0f172a 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

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

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 320px;
}

.header-search input,
.mobile-search input,
.filter-input,
.search-large input {
  width: 100%;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input,
.mobile-search input {
  padding: 11px 14px;
}

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

.header-search button,
.mobile-search button,
.search-large button,
.primary-button,
.secondary-button,
.player-button {
  border: 0;
  color: #fff;
  background: linear-gradient(90deg, var(--cyan-2), var(--blue));
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.header-search button,
.mobile-search button {
  padding: 11px 16px;
}

.header-search button:hover,
.mobile-search button:hover,
.search-large button:hover,
.primary-button:hover,
.secondary-button:hover,
.player-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 36px rgba(6, 182, 212, 0.28);
  filter: brightness(1.06);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.8);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #cbd5e1;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-panel nav,
.mobile-search {
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
}

.mobile-search {
  display: flex;
  gap: 10px;
  padding: 18px 0 8px;
}

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 12px 0 20px;
}

.mobile-nav-link {
  padding: 13px 14px;
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
}

.hero {
  position: relative;
  min-height: 70vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, #0f172a, transparent);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, 1120px);
  margin: 0 auto;
  text-align: center;
  padding: 88px 0 72px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  color: #cffafe;
  background: rgba(6, 182, 212, 0.18);
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 22px auto 20px;
  font-size: clamp(42px, 8vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  max-width: 920px;
  background: linear-gradient(90deg, #a5f3fc, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 820px;
  margin: 0 auto 30px;
  color: #dbeafe;
  font-size: clamp(18px, 2.4vw, 25px);
  line-height: 1.72;
}

.hero-actions,
.page-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  min-height: 50px;
}

.secondary-button {
  color: #cffafe;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(103, 232, 249, 0.26);
}

.hero-feature-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 44px auto 0;
  max-width: 960px;
}

.mini-card {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow);
  background: rgba(15, 23, 42, 0.52);
  transform: translateZ(0);
}

.mini-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  opacity: 0.8;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.mini-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), transparent 68%);
}

.mini-card span {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mini-card:hover img {
  transform: scale(1.08);
  opacity: 1;
}

main {
  min-height: 50vh;
}

.section-block {
  padding: 72px 0 0;
}

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

.section-head h2,
.page-hero h1,
.detail-title,
.category-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-more {
  color: var(--cyan);
  font-weight: 800;
}

.scroller {
  display: flex;
  gap: 24px;
  margin: 0 -16px;
  padding: 2px 16px 22px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.scroller .movie-card {
  width: 320px;
  min-width: 320px;
}

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

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

.movie-card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.54);
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: var(--radius);
  box-shadow: 0 16px 44px rgba(2, 8, 23, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card-link:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(34, 211, 238, 0.36);
  box-shadow: 0 26px 58px rgba(6, 182, 212, 0.18);
}

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.82);
}

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

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), transparent);
}

.poster-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 6px 10px;
  color: #fff;
  background: rgba(6, 182, 212, 0.82);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

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

.movie-card h2,
.movie-card h3 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 19px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  margin: 0 0 10px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 750;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.feature-panel {
  padding: clamp(28px, 5vw, 48px);
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.86), rgba(51, 65, 85, 0.7));
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.feature-panel-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 32px;
  align-items: center;
}

.feature-panel p {
  color: var(--soft);
  line-height: 1.82;
}

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

.category-card {
  display: block;
  min-height: 190px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.16), rgba(37, 99, 235, 0.12)), rgba(30, 41, 59, 0.68);
  border: 1px solid rgba(103, 232, 249, 0.18);
  border-radius: 28px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(103, 232, 249, 0.42);
  box-shadow: 0 26px 58px rgba(6, 182, 212, 0.15);
}

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

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

.ranking-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.rank-item a {
  display: grid;
  grid-template-columns: 52px 80px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: rgba(30, 41, 59, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item a:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.3);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #001018;
  background: linear-gradient(135deg, #67e8f9, #60a5fa);
  border-radius: 15px;
  font-weight: 900;
}

.rank-item img {
  width: 80px;
  height: 56px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-content strong,
.rank-content em {
  display: block;
}

.rank-content strong {
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
}

.rank-content em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-hero {
  padding: 70px 0 42px;
}

.page-hero p {
  max-width: 820px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.82;
}

.filter-bar,
.search-large {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin: 28px 0;
}

.filter-input,
.search-large input {
  flex: 1 1 280px;
  min-height: 50px;
  padding: 13px 16px;
}

.filter-chip {
  min-height: 42px;
  padding: 0 15px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #001018;
  background: linear-gradient(90deg, #67e8f9, #60a5fa);
  border-color: transparent;
}

.search-large button {
  min-height: 50px;
  padding: 0 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 32px 0 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #67e8f9;
}

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

.player-panel,
.detail-info,
.text-panel {
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.player-panel {
  overflow: hidden;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.28));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  font-size: 17px;
}

.player-button .play-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #001018;
  background: #fff;
  border-radius: 999px;
}

.player-caption {
  padding: 18px 22px 22px;
}

.player-caption h1,
.player-caption p {
  margin: 0;
}

.player-caption h1 {
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.2;
}

.player-caption p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.detail-info {
  padding: 26px;
}

.detail-title {
  margin: 0 0 18px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.info-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted);
}

.info-list strong {
  color: #e2e8f0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  padding: 6px 10px;
  color: #cffafe;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 999px;
  font-size: 13px;
}

.text-panel {
  margin-top: 28px;
  padding: clamp(24px, 4vw, 36px);
}

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.text-panel p {
  margin: 0 0 18px;
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 17px;
}

.text-panel p:last-child {
  margin-bottom: 0;
}

.result-empty {
  display: none;
  margin: 32px 0;
  padding: 30px;
  color: var(--muted);
  background: rgba(30, 41, 59, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.8fr;
  gap: 40px;
  padding: 46px 0;
}

.footer-main p,
.site-footer li a {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

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

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

.footer-bottom {
  padding: 22px 16px;
  color: #64748b;
  text-align: center;
  border-top: 1px solid var(--line);
}

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

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

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

  .feature-panel-grid,
  .detail-layout,
  .ranking-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    height: 64px;
  }

  .brand-text {
    font-size: 19px;
  }

  .hero {
    min-height: 680px;
  }

  .hero-feature-row,
  .movie-grid,
  .category-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .rank-item a {
    grid-template-columns: 44px 68px 1fr;
  }

  .rank-item img {
    width: 68px;
    height: 48px;
  }
}

@media (max-width: 520px) {
  .container,
  .nav-wrap,
  .hero-inner,
  .mobile-panel nav,
  .mobile-search {
    width: min(100% - 24px, 1280px);
  }

  .hero-feature-row,
  .movie-grid,
  .category-strip {
    grid-template-columns: 1fr;
  }

  .scroller .movie-card {
    width: 280px;
    min-width: 280px;
  }

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