:root {
  --bg: #07111f;
  --bg-soft: #0f1d33;
  --panel: rgba(15, 29, 51, 0.82);
  --panel-strong: rgba(18, 33, 57, 0.96);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.22);
  --accent: #ef4444;
  --accent-dark: #b91c1c;
  --gold: #fbbf24;
  --radius: 22px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(239, 68, 68, 0.25), transparent 28rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 26rem),
    linear-gradient(135deg, #020617 0%, #0f172a 42%, #111827 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 82%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 12px 32px rgba(239, 68, 68, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.nav-links a:hover,
.nav-links a.active,
.mobile-panel a:hover {
  color: #fff;
  background: rgba(239, 68, 68, 0.88);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 9px 12px;
}

.mobile-panel {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.95);
}

.mobile-panel.open {
  display: grid;
  gap: 6px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  margin: 28px auto 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 34px;
  background: linear-gradient(135deg, #111827 0%, #1f2937 46%, #7f1d1d 100%);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.78fr);
  gap: 36px;
  padding: clamp(28px, 5vw, 74px);
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.7s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.66) 42%, rgba(2, 6, 23, 0.22) 100%),
    radial-gradient(circle at 18% 18%, rgba(239, 68, 68, 0.32), transparent 26rem);
  pointer-events: none;
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 18px;
  padding: 7px 13px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 999px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.35);
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 6.2vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero h1 span,
.gradient-text {
  background: linear-gradient(90deg, #fff 0%, #fecaca 34%, #f97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  max-width: 780px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-actions,
.section-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

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

.btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.14);
}

.btn.primary {
  border-color: rgba(239, 68, 68, 0.5);
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 16px 32px rgba(239, 68, 68, 0.28);
}

.btn.small {
  min-height: 36px;
  padding: 8px 13px;
  font-size: 14px;
}

.hero-poster {
  align-self: center;
  border-radius: 30px;
  min-height: 430px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.38), rgba(30, 41, 59, 0.95)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 13px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
}

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

.hero-tabs {
  position: absolute;
  z-index: 4;
  left: clamp(24px, 5vw, 74px);
  right: clamp(24px, 5vw, 74px);
  bottom: 24px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.hero-tab {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 11px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
  text-align: left;
}

.hero-tab.active {
  color: #fff;
  border-color: rgba(248, 113, 113, 0.58);
  background: rgba(185, 28, 28, 0.6);
}

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

.section {
  margin: 46px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.section-subtitle {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.movie-card,
.category-card,
.rank-card,
.info-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover,
.info-card:hover {
  transform: translateY(-4px);
  border-color: rgba(248, 113, 113, 0.42);
  background: var(--panel-strong);
}

.poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.36), rgba(30, 41, 59, 0.96)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 12px);
}

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

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

.card-body {
  padding: 16px;
}

.movie-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.movie-title a:hover,
.text-link:hover {
  color: #fca5a5;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
  color: #cbd5e1;
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fee2e2;
  background: rgba(239, 68, 68, 0.16);
}

.desc {
  color: var(--muted);
  line-height: 1.68;
}

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

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

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
}

.search-input {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 13px 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.search-input:focus {
  border-color: rgba(248, 113, 113, 0.65);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.13);
}

.page-hero {
  margin: 30px 0 34px;
  padding: clamp(28px, 5vw, 62px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(127, 29, 29, 0.65), rgba(15, 23, 42, 0.88)),
    radial-gradient(circle at 80% 20%, rgba(249, 115, 22, 0.23), transparent 24rem);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: #fecaca;
}

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

.detail-cover {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(239, 68, 68, 0.36), rgba(30, 41, 59, 0.96)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 12px);
  box-shadow: var(--shadow);
}

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

.detail-main {
  display: grid;
  gap: 18px;
}

.article-block {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
}

.article-block h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.article-block p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.85;
}

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

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

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

.player-shell video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.86)),
    rgba(15, 23, 42, 0.25);
  cursor: pointer;
}

.play-cover.hidden {
  display: none;
}

.play-button {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 22px 60px rgba(239, 68, 68, 0.42);
  font-size: 42px;
  padding-left: 6px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.rank-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 17px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

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

.footer-inner {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 26px;
  color: var(--muted);
}

.footer h3 {
  margin: 0 0 12px;
  color: var(--text);
}

.footer a {
  display: inline-block;
  margin: 0 12px 8px 0;
  color: #cbd5e1;
}

.footer a:hover {
  color: #fca5a5;
}

@media (max-width: 1050px) {
  .grid,
  .grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-poster {
    display: none;
  }

  .hero-tabs {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

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

  .hero {
    min-height: 670px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 28px 22px 150px;
  }

  .hero-tabs {
    grid-template-columns: repeat(2, 1fr);
    left: 18px;
    right: 18px;
  }

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

  .section-head,
  .toolbar {
    display: grid;
    align-items: start;
  }

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

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

  .rank-card .btn {
    grid-column: 2;
    width: fit-content;
  }
}

@media (max-width: 480px) {
  .main-shell,
  .nav-shell,
  .mobile-panel,
  .footer-inner {
    width: min(100% - 20px, 1240px);
  }

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

  .logo {
    font-size: 19px;
  }

  .hero-tabs {
    grid-template-columns: 1fr;
  }
}
