:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #ef4444;
  --accent-2: #f97316;
  --accent-3: #eab308;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 2%, rgba(239, 68, 68, 0.20), transparent 32rem),
    radial-gradient(circle at 84% 8%, rgba(249, 115, 22, 0.16), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 38%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img,
video {
  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: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(22px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 40px rgba(239, 68, 68, 0.35);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.8s ease;
}

.hero-slide.active {
  opacity: 1;
  z-index: 1;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.82) 36%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, #020617 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 116px 0 96px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.8fr);
  align-items: end;
  gap: 46px;
}

.hero-eyebrow,
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.25);
  font-size: 13px;
  font-weight: 800;
}

.hero-title {
  margin: 22px 0 16px;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-desc {
  width: min(720px, 100%);
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.9;
}

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

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 42px rgba(239, 68, 68, 0.28);
  font-weight: 900;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 58px rgba(239, 68, 68, 0.38);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.hero-panel {
  padding: 24px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.hero-poster {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.14), rgba(15, 23, 42, 0.72));
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

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

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

.hero-dot {
  width: 28px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dot.active {
  background: #fff;
}

.section {
  padding: 56px 0;
}

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

.section-title {
  margin: 10px 0 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-desc {
  color: var(--muted);
  line-height: 1.8;
  margin: 8px 0 0;
}

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

.movie-card {
  min-width: 0;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(248, 113, 113, 0.48);
  background: rgba(15, 23, 42, 0.92);
}

.poster-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.22), rgba(30, 41, 59, 0.82));
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.32s ease, opacity 0.32s ease;
}

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 46%, rgba(2, 6, 23, 0.84) 100%);
}

.badge,
.score {
  position: absolute;
  z-index: 2;
  top: 10px;
  padding: 5px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  backdrop-filter: blur(12px);
}

.badge {
  left: 10px;
  background: rgba(239, 68, 68, 0.86);
}

.score {
  right: 10px;
  background: rgba(2, 6, 23, 0.70);
}

.card-body {
  padding: 13px 13px 16px;
}

.card-title {
  margin: 0 0 8px;
  color: #fff;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  color: #94a3b8;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-line {
  margin: 8px 0 0;
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 74px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid var(--line);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: rgba(30, 41, 59, 0.86);
  transform: translateX(3px);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 950;
}

.rank-thumb {
  width: 74px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(148, 163, 184, 0.12);
}

.rank-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 900;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px 140px;
  gap: 12px;
  padding: 18px;
  margin-bottom: 24px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #fff;
  background: rgba(2, 6, 23, 0.52);
  padding: 0 14px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(248, 113, 113, 0.66);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}

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

.category-tile {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 20px;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.64));
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: -40% auto auto -20%;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.23);
  filter: blur(10px);
}

.category-tile strong,
.category-tile span {
  position: relative;
}

.category-tile strong {
  font-size: 21px;
  font-weight: 950;
}

.category-tile span {
  color: var(--muted);
  font-size: 13px;
}

.detail-hero {
  padding: 46px 0 36px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 18% 0%, rgba(239, 68, 68, 0.22), transparent 32rem);
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.20), rgba(15, 23, 42, 0.88));
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-title {
  margin: 14px 0 18px;
  font-size: clamp(34px, 6vw, 70px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.info-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.content-panel {
  padding: 26px;
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid var(--line);
  line-height: 1.95;
  color: #dbeafe;
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 950;
  color: #fff;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.38));
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.player-shell.is-playing .play-overlay {
  opacity: 0;
}

.play-button {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 24px 58px rgba(239, 68, 68, 0.34);
  pointer-events: auto;
  cursor: pointer;
}

.play-button svg {
  width: 34px;
  height: 34px;
  margin-left: 5px;
  fill: currentColor;
}

.breadcrumb {
  padding: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #fff;
  font-weight: 800;
}

.pagination-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.page-pill {
  min-width: 40px;
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

.page-pill.active,
.page-pill:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.75);
}

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

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

.empty-state {
  display: none;
  padding: 28px;
  border-radius: 22px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid var(--line);
}

.empty-state.show {
  display: block;
}

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

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

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

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    border-radius: 14px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding-top: 92px;
  }

  .hero-carousel {
    min-height: 760px;
  }

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

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

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

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

  .detail-cover {
    width: min(260px, 70vw);
  }

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

@media (max-width: 560px) {
  .header-inner,
  .container,
  .footer-inner,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 17px;
  }

  .hero-title {
    font-size: 42px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .hero-panel {
    padding: 14px;
    border-radius: 22px;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

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

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

  .rank-thumb {
    width: 60px;
    height: 80px;
  }

  .content-panel {
    padding: 20px;
  }
}
