:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --green: #34d399;
  --red: #f43f5e;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.48);
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 30rem),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.16), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
}

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

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 24px;
}

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

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.25);
  display: grid;
  place-items: center;
  color: #020617;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--soft);
  font-size: 14px;
}

.nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav a:hover,
.mobile-nav a:hover,
.nav a.is-active,
.mobile-nav a.is-active {
  color: #fff;
  background: rgba(34, 211, 238, 0.12);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  color: #fff;
  background: rgba(15, 23, 42, 0.9);
}

.mobile-nav {
  display: none;
  padding: 0 0 16px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border-bottom: 1px solid var(--line);
}

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.16)),
    linear-gradient(0deg, rgba(2, 6, 23, 1), transparent 42%);
  z-index: 1;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.08);
  transform: scale(1.04);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  align-content: center;
  padding: 112px 0 96px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 999px;
  padding: 8px 12px;
  color: #a5f3fc;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(10px);
  font-size: 13px;
}

.hero-title {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.hero-desc {
  max-width: 680px;
  color: #dbeafe;
  font-size: clamp(16px, 2.4vw, 20px);
}

.hero-actions,
.card-actions,
.player-actions,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-actions {
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(15, 23, 42, 0.96);
}

.btn-primary {
  color: #02111c;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.22);
  font-weight: 800;
}

.btn-primary:hover {
  color: #02111c;
  background: linear-gradient(135deg, #67e8f9, #60a5fa);
}

.hero-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  z-index: 4;
}

.hero-tab-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.hero-tab {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 12px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
  text-align: left;
  overflow: hidden;
}

.hero-tab.is-active {
  color: #fff;
  border-color: rgba(34, 211, 238, 0.52);
  background: rgba(8, 47, 73, 0.74);
}

.hero-tab strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-tab span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section {
  padding: 64px 0;
}

.section-tight {
  padding: 40px 0;
}

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

.section-kicker {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  margin-top: 4px;
  font-size: clamp(26px, 4vw, 40px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.section-text {
  max-width: 720px;
  color: var(--muted);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-panel {
  margin-top: -48px;
  position: relative;
  z-index: 5;
  padding: 18px;
}

.search-input,
.filter-select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  outline: none;
}

.search-input {
  flex: 1 1 320px;
}

.filter-select {
  flex: 0 1 180px;
}

.search-input:focus,
.filter-select:focus {
  border-color: rgba(34, 211, 238, 0.62);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--soft);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.62);
  font-size: 13px;
}

.chip:hover {
  color: #fff;
  border-color: rgba(34, 211, 238, 0.4);
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  color: #cffafe;
  background: rgba(34, 211, 238, 0.12);
  font-size: 12px;
}

.grid {
  display: grid;
  gap: 18px;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 24px 50px rgba(2, 6, 23, 0.45);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.poster-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  border-radius: 999px;
  padding: 4px 9px;
  color: #020617;
  background: linear-gradient(135deg, #67e8f9, #60a5fa);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 14px;
}

.card-title {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.card-desc {
  margin-top: 9px;
  min-height: 42px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.55;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.rank-num {
  font-size: 26px;
  font-weight: 900;
  color: #67e8f9;
  text-align: center;
}

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

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

.rank-title {
  font-size: 18px;
  font-weight: 850;
  color: #fff;
}

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

.page-hero {
  padding: 72px 0 44px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 18% 30%, rgba(34, 211, 238, 0.15), transparent 24rem),
    radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.15), transparent 28rem);
}

.page-title {
  max-width: 820px;
  margin: 12px 0 12px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.page-desc {
  max-width: 760px;
  color: var(--soft);
  font-size: 18px;
}

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

.player-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  background: #020617;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.64;
  filter: saturate(1.1) contrast(1.04);
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.24), transparent 18rem),
    linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.3));
}

.play-button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  padding: 16px 24px;
  color: #02111c;
  background: linear-gradient(135deg, #67e8f9, #60a5fa);
  font-weight: 900;
  box-shadow: 0 24px 55px rgba(34, 211, 238, 0.28);
}

.play-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #02111c;
  background: rgba(255, 255, 255, 0.56);
}

.detail-panel {
  padding: 22px;
}

.detail-title {
  margin: 12px 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.055em;
  font-weight: 950;
}

.info-list {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
}

.info-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  color: var(--soft);
  font-size: 14px;
}

.info-row span:first-child {
  color: var(--muted);
}

.article-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
}

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

.article-card p {
  color: var(--soft);
  font-size: 16px;
}

.category-card {
  display: block;
  padding: 18px;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(59, 130, 246, 0.06)),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.category-card strong {
  color: #fff;
  font-size: 20px;
}

.category-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  padding: 32px 0;
  color: var(--muted);
  background: rgba(2, 6, 23, 0.62);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a:hover {
  color: #fff;
}

[data-movie-card].is-filter-hidden {
  display: none;
}

@media (max-width: 1100px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero,
  .hero-content {
    min-height: 640px;
  }

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

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

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

  .rank-item {
    grid-template-columns: 44px 80px minmax(0, 1fr);
  }

  .rank-action {
    display: none;
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: min(100% - 20px, 1180px);
  }

  .hero-title,
  .page-title {
    letter-spacing: -0.045em;
  }

  .hero-content {
    padding-top: 92px;
    padding-bottom: 160px;
  }

  .hero-tab-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .hero-tab {
    min-width: 210px;
  }

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

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

  .info-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }
}
