:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.74);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(34, 211, 238, 0.16);
  --line-strong: rgba(34, 211, 238, 0.34);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --blue: #2563eb;
  --orange: #f97316;
  --green: #22c55e;
  --yellow: #facc15;
  --purple: #a855f7;
  --shadow: 0 22px 70px rgba(8, 145, 178, 0.18);
  --radius: 22px;
}

* {
  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.16), transparent 34rem),
    radial-gradient(circle at 80% 12%, rgba(37, 99, 235, 0.14), transparent 32rem),
    linear-gradient(180deg, #0f172a 0%, #020617 38%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(2, 6, 23, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 999px;
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.34);
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: rgba(34, 211, 238, 0.74);
  font-size: 12px;
  margin-top: 4px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  white-space: nowrap;
}

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

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

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: white;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

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

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(34, 211, 238, 0.08);
}

.hero-grid {
  position: absolute;
  inset: 0;
  opacity: 0.11;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.8) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.8) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.58), rgba(2, 6, 23, 0.98)),
    radial-gradient(circle at 50% 10%, rgba(34, 211, 238, 0.08), transparent 42rem);
}

.hero-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  filter: blur(62px);
  opacity: 0.24;
}

.hero-glow-one {
  left: -80px;
  top: 18%;
  background: var(--cyan);
}

.hero-glow-two {
  right: -80px;
  bottom: 12%;
  background: var(--blue);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 56px;
}

.hero-slide {
  display: none;
  align-items: center;
  gap: 46px;
  min-height: 520px;
}

.hero-slide.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
  animation: fadeUp 0.45s ease both;
}

.eyebrow {
  margin: 0 0 16px;
  color: rgba(34, 211, 238, 0.88);
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.055em;
  background: linear-gradient(90deg, #ecfeff, var(--cyan), #60a5fa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-summary {
  max-width: 720px;
  margin: 24px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span,
.tag-pill {
  padding: 8px 12px;
  color: #dffaff;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #031118;
  background: linear-gradient(135deg, var(--cyan), #93c5fd);
  box-shadow: 0 18px 36px rgba(34, 211, 238, 0.2);
}

.ghost-btn {
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid var(--line-strong);
}

.ghost-btn.small {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}

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

.hero-poster {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 34px;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 42%, rgba(2, 6, 23, 0.95));
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 470px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-poster:hover img {
  transform: scale(1.04);
}

.hero-score,
.detail-score {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 2;
  padding: 10px 14px;
  color: #fff7ed;
  background: rgba(249, 115, 22, 0.95);
  border-radius: 999px;
  font-weight: 800;
}

.hero-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

.hero-prev,
.hero-next,
.hero-dot {
  cursor: pointer;
  color: white;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--line-strong);
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 28px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
}

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

.intro-search {
  margin-top: -36px;
  position: relative;
  z-index: 3;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1.7fr) repeat(3, minmax(140px, 0.7fr));
  gap: 14px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
}

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

section.container {
  margin-top: 72px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.section-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.13);
}

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 34px);
}

.section-line {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.48), transparent);
}

.section-more {
  color: var(--cyan);
  font-size: 14px;
}

.tone-orange .section-icon {
  color: var(--orange);
  background: rgba(249, 115, 22, 0.14);
}

.tone-green .section-icon {
  color: var(--green);
  background: rgba(34, 197, 94, 0.13);
}

.tone-yellow .section-icon {
  color: var(--yellow);
  background: rgba(250, 204, 21, 0.13);
}

.tone-purple .section-icon {
  color: var(--purple);
  background: rgba(168, 85, 247, 0.13);
}

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

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

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

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

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

.movie-card {
  overflow: hidden;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(34, 211, 238, 0.12);
  border-radius: 18px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 16px 40px rgba(8, 145, 178, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.8);
}

.movie-card-wide .poster-link {
  aspect-ratio: 21 / 9;
}

.movie-card-mini .poster-link,
.movie-card-small .poster-link {
  aspect-ratio: 16 / 9;
}

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

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

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

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  color: white;
  background: rgba(34, 211, 238, 0.9);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.duration-badge,
.genre-badge {
  position: absolute;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.duration-badge {
  right: 10px;
  top: 10px;
  color: var(--cyan);
  background: rgba(2, 6, 23, 0.76);
  border: 1px solid rgba(34, 211, 238, 0.28);
}

.genre-badge {
  left: 10px;
  bottom: 10px;
  color: white;
  background: rgba(249, 115, 22, 0.88);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 9px;
  color: white;
  font-size: 17px;
  line-height: 1.35;
}

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

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
}

.rating {
  color: var(--yellow);
}

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

.category-tile {
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.1), rgba(37, 99, 235, 0.04)),
    rgba(15, 23, 42, 0.68);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.category-tile span {
  color: white;
  font-size: 21px;
  font-weight: 800;
}

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

.ranking-split {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  align-items: start;
}

.rank-list {
  display: grid;
  gap: 10px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(34, 211, 238, 0.12);
  border-radius: 15px;
}

.rank-item:hover {
  border-color: rgba(34, 211, 238, 0.42);
}

.rank-num {
  color: var(--cyan);
  font-size: 22px;
  font-weight: 900;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.page-main {
  min-height: 80vh;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 86px 0 32px;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.compact-hero {
  padding-bottom: 6px;
}

.category-overview-list {
  display: grid;
  gap: 28px;
}

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

.category-overview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.category-overview-head h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

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

.empty-state {
  display: none;
  padding: 30px;
  margin-top: 20px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

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

.detail-layout {
  margin-top: 40px;
}

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

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

.detail-hero-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1fr);
  gap: 34px;
  padding: 24px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.detail-poster {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 24px;
  background: #020617;
}

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

.detail-info {
  align-self: center;
}

.detail-info h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.detail-one-line {
  margin: 22px 0 0;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.detail-meta span {
  padding: 8px 12px;
  color: #dffaff;
  background: rgba(2, 6, 23, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
}

.player-wrap {
  margin-top: 38px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

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

.video-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.36)),
    rgba(2, 6, 23, 0.18);
  border: 0;
}

.video-overlay span {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 999px;
  box-shadow: 0 0 46px rgba(34, 211, 238, 0.4);
  font-size: 36px;
  padding-left: 5px;
}

.video-overlay.is-hidden {
  display: none;
}

.article-section {
  padding: 30px;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.article-section h2 {
  margin: 0 0 14px;
  color: #e0f2fe;
  font-size: 26px;
}

.article-section h2:not(:first-child) {
  margin-top: 30px;
}

.article-section p {
  margin: 0;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.95;
}

.site-footer {
  margin-top: 90px;
  background: rgba(2, 6, 23, 0.82);
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1.1fr;
  gap: 36px;
}

.footer-about h2,
.footer-links h3 {
  margin: 0 0 14px;
  color: var(--cyan);
}

.footer-about p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px 16px;
}

.footer-links h3 {
  width: 100%;
}

.footer-links a {
  color: var(--muted);
  font-size: 14px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  color: #64748b;
  border-top: 1px solid rgba(34, 211, 238, 0.08);
  font-size: 13px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .mobile-toggle {
    display: grid;
    place-items: center;
  }

  .hero-slide.is-active,
  .detail-hero-card,
  .ranking-split,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    min-height: 360px;
  }

  .hero-poster img {
    min-height: 360px;
  }

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

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

@media (max-width: 640px) {
  .header-inner {
    height: 62px;
  }

  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    display: none;
  }

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

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding: 48px 0;
  }

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

  .hero-summary,
  .page-hero p:not(.eyebrow),
  .detail-one-line {
    font-size: 16px;
  }

  .hero-actions,
  .hero-controls {
    width: 100%;
  }

  .primary-btn,
  .ghost-btn {
    flex: 1;
  }

  .hero-poster,
  .hero-poster img,
  .detail-poster,
  .detail-poster img {
    min-height: 280px;
  }

  .filter-panel,
  .movie-grid,
  .feature-grid,
  .compact-grid,
  .small-grid,
  .mini-grid,
  .category-grid,
  .rank-list-large {
    grid-template-columns: 1fr;
  }

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

  .rank-meta {
    grid-column: 2;
  }

  .category-overview-head {
    flex-direction: column;
  }

  .detail-hero-card,
  .article-section {
    padding: 18px;
    border-radius: 22px;
  }

  .video-frame {
    border-radius: 18px;
  }

  .video-overlay span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
