:root {
  --bg: #030712;
  --panel: rgba(17, 24, 39, 0.76);
  --panel-strong: #111827;
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --green: #22c55e;
  --orange: #fb923c;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 12%, rgba(59, 130, 246, 0.24), transparent 30rem),
    radial-gradient(circle at 85% 18%, rgba(34, 211, 238, 0.18), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #030712 48%, #020617 100%);
}

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

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.scrolled,
.site-header.open {
  background: rgba(3, 7, 18, 0.92);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 28px rgba(59, 130, 246, 0.35);
}

.brand-text,
.footer-logo {
  font-size: 22px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #d1d5db;
  font-size: 15px;
  font-weight: 600;
}

.main-nav a {
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: white;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: white;
  background: rgba(15, 23, 42, 0.8);
  font-size: 20px;
}

.hero {
  position: relative;
  height: 100vh;
  min-height: 680px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 38%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.36) 42%, rgba(2, 6, 23, 0.25) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-top: 90px;
}

.hero-kicker,
.eyebrow {
  margin: 0 0 14px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  max-width: 780px;
  font-size: clamp(42px, 8vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 24px 0 0;
  color: #d1d5db;
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.7;
}

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

.hero-tags {
  margin-top: 26px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border: 1px solid rgba(59, 130, 246, 0.36);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.16);
  backdrop-filter: blur(10px);
  font-size: 12px;
}

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

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

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--blue), #2563eb);
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.36);
}

.ghost-btn,
.section-link {
  border: 1px solid var(--border);
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 50px;
  height: 50px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
  width: 34px;
  background: var(--blue);
}

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

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

.section-head h2,
.category-block h2,
.watch-panel h2,
.detail-text h2 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.compact-head {
  align-items: center;
}

.lead-text,
.category-desc {
  max-width: 820px;
  color: var(--soft);
  line-height: 1.9;
}

.filter-panel {
  display: flex;
  gap: 14px;
  margin: 28px 0;
}

.search-box {
  position: relative;
  flex: 1;
}

.search-box span {
  position: absolute;
  left: 18px;
  top: 50%;
  color: var(--muted);
  transform: translateY(-50%);
}

.search-box input,
.filter-panel select {
  width: 100%;
  height: 52px;
  border: 1px solid var(--border);
  border-radius: 16px;
  color: white;
  background: rgba(15, 23, 42, 0.74);
  outline: none;
}

.search-box input {
  padding: 0 18px 0 48px;
}

.filter-panel select {
  max-width: 180px;
  padding: 0 14px;
}

.search-box input:focus,
.filter-panel select:focus {
  border-color: rgba(59, 130, 246, 0.72);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(59, 130, 246, 0.46);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

.movie-card img,
.rank-cover img,
.category-tile img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  transition: transform 0.5s ease, filter 0.5s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.1);
  filter: brightness(0.78);
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(59, 130, 246, 0.86);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.78);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.year-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #e5e7eb;
  background: rgba(0, 0, 0, 0.7);
  font-size: 12px;
}

.card-body {
  padding: 18px;
}

.compact .card-body {
  padding: 14px;
}

.card-body h2 {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.35;
}

.compact .card-body h2 {
  font-size: 15px;
}

.card-body h2 a:hover,
.rank-info h2 a:hover,
.category-block h2 a:hover {
  color: #60a5fa;
}

.card-body p {
  min-height: 3.2em;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.compact .card-body p {
  min-height: 2.9em;
  font-size: 12px;
}

.category-section {
  padding-top: 52px;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #0f172a;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.62) 44%, rgba(2, 6, 23, 0.94) 100%);
}

.category-tile img {
  position: absolute;
  inset: 0;
  filter: saturate(1.12) brightness(0.86);
  transition: transform 0.5s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span,
.category-tile small {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.category-tile span {
  bottom: 54px;
  font-size: 21px;
  font-weight: 800;
}

.category-tile small {
  bottom: 20px;
  color: #cbd5e1;
  line-height: 1.45;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: 34px;
}

.rank-panel {
  position: sticky;
  top: 94px;
  align-self: start;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
}

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

.rank-card {
  display: grid;
  grid-template-columns: 48px 86px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.36);
}

.rank-index {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.14);
  font-weight: 900;
}

.rank-cover {
  height: 62px;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
}

.rank-info p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.meta-line {
  color: #64748b;
  font-size: 12px;
}

.page-main {
  padding-top: 76px;
}

.page-hero {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding: 74px 46px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.24), rgba(34, 211, 238, 0.1)),
    rgba(15, 23, 42, 0.7);
  box-shadow: var(--shadow);
}

.page-hero p:last-child {
  max-width: 760px;
  margin: 20px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

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

.category-block {
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.58);
}

.full-rank .rank-card {
  grid-template-columns: 60px 120px minmax(0, 1fr);
}

.full-rank .rank-cover {
  height: 82px;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #60a5fa;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(260px, 390px) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 34px;
  background:
    radial-gradient(circle at 10% 0%, rgba(59, 130, 246, 0.25), transparent 28rem),
    rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
}

.detail-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.detail-copy h1 {
  max-width: 820px;
}

.detail-line {
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.75;
}

.watch-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto 0;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 32px;
  background: rgba(15, 23, 42, 0.66);
}

.video-box {
  position: relative;
  margin-top: 20px;
  overflow: hidden;
  border-radius: 26px;
  background: black;
  aspect-ratio: 16 / 9;
}

.video-box video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: black;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.68));
  cursor: pointer;
}

.play-cover span {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.9);
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.38);
  font-size: 42px;
}

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

.detail-text {
  padding-top: 46px;
  color: #d1d5db;
}

.detail-text p {
  margin: 16px 0 28px;
  font-size: 17px;
  line-height: 2;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.meta-grid div {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
}

.meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.meta-grid strong {
  color: white;
  line-height: 1.5;
}

.empty-tip {
  padding: 38px;
  text-align: center;
  color: var(--muted);
}

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

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
}

.site-footer p {
  max-width: 460px;
  color: var(--muted);
  line-height: 1.8;
}

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

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

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

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 32px;
  color: #64748b;
  font-size: 13px;
}

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

  .split-section {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

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

  .main-nav {
    position: absolute;
    top: 76px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: rgba(3, 7, 18, 0.96);
  }

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

  .main-nav a {
    padding: 13px 10px;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    padding-top: 70px;
  }

  .hero-arrow {
    display: none;
  }

  .section-head,
  .filter-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-panel select {
    max-width: none;
  }

  .movie-grid,
  .small-grid,
  .category-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .card-body {
    padding: 13px;
  }

  .card-body h2 {
    font-size: 15px;
  }

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

  .detail-hero,
  .page-hero,
  .watch-panel,
  .category-block {
    padding: 22px;
    border-radius: 24px;
  }

  .detail-line {
    font-size: 17px;
  }

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

  .full-rank .rank-card,
  .rank-card {
    grid-template-columns: 42px 74px minmax(0, 1fr);
  }

  .full-rank .rank-cover,
  .rank-cover {
    height: 58px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .small-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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