:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #0f172a;
  --card: rgba(30, 41, 59, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --gold: #facc15;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.22), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.2), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow: 0 12px 36px rgba(14, 165, 233, 0.34);
}

.brand-text {
  display: grid;
  gap: 2px;
}

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

.brand-text em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  color: var(--soft);
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
}

.menu-button {
  width: 42px;
  height: 42px;
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.84);
  color: white;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: white;
}

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

.hero {
  min-height: calc(100vh - 76px);
  padding: 24px 0 42px;
}

.hero-stage {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 78vh;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 32px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.75) 43%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, transparent 55%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 7vw, 82px);
  bottom: clamp(38px, 9vw, 92px);
  width: min(620px, calc(100% - 48px));
}

.hero-kicker,
.page-hero span,
.section-heading span,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 16px 0;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 580px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.hero-tags span,
.detail-tags span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.16);
}

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

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

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

.btn-primary {
  color: #020617;
  background: linear-gradient(135deg, #7dd3fc, #38bdf8);
  box-shadow: 0 14px 40px rgba(14, 165, 233, 0.34);
}

.btn-ghost {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: white;
  background: rgba(2, 6, 23, 0.45);
  transform: translateY(-50%);
  cursor: pointer;
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

.hero-dots {
  position: absolute;
  right: 34px;
  bottom: 34px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.active {
  width: 32px;
  border-radius: 999px;
  background: var(--accent);
}

.home-search {
  padding: 30px;
  margin-top: -14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.home-search h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 4vw, 42px);
}

.home-search p,
.page-hero p,
.section-heading p,
.category-card-block p,
.footer-brand p,
.detail-content p,
.movie-card p {
  color: var(--muted);
  line-height: 1.75;
}

.search-panel {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.search-panel input {
  flex: 1;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  color: white;
  outline: 0;
  background: rgba(2, 6, 23, 0.72);
}

.search-panel input:focus {
  border-color: rgba(56, 189, 248, 0.76);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.search-panel button {
  padding: 0 18px;
  border: 0;
  border-radius: 16px;
  color: #020617;
  font-weight: 800;
  background: var(--accent);
  cursor: pointer;
}

.empty-state {
  margin-top: 18px;
  padding: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 70px 0 26px;
}

.section-heading h2,
.page-hero h1,
.detail-info h1 {
  margin: 8px 0 0;
  font-size: clamp(30px, 4.5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-link,
.text-link {
  color: var(--accent);
  font-weight: 800;
}

.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(--line);
  border-radius: 24px;
  background: var(--panel-strong);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.52);
}

.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.3s ease;
}

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

.category-tile span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.96));
}

.category-tile strong,
.category-tile em {
  position: absolute;
  left: 18px;
  right: 18px;
}

.category-tile strong {
  bottom: 54px;
  font-size: 21px;
}

.category-tile em {
  bottom: 18px;
  color: var(--soft);
  font-size: 13px;
  font-style: normal;
  line-height: 1.45;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(30, 41, 59, 0.86);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

.movie-card:hover .card-cover img {
  transform: scale(1.07);
}

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

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 7px 10px;
  border-radius: 999px;
  color: #020617;
  font-size: 12px;
  font-weight: 900;
  background: var(--accent);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translateY(0);
}

.card-info {
  padding: 15px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: white;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: var(--accent);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0;
  color: #64748b;
  font-size: 12px;
}

.card-meta span,
.card-meta a {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.09);
}

.movie-card p {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  margin: 0;
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 96px;
}

.ranking-list,
.ranking-page-list {
  display: grid;
  gap: 14px;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  min-height: 168px;
}

.movie-card-horizontal .card-cover {
  aspect-ratio: auto;
  height: 100%;
}

.movie-card-horizontal .card-title {
  min-height: 0;
}

.rank-number {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  border-radius: 12px;
  color: #020617;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), #fb923c);
}

.page-main {
  padding: 42px 0 80px;
}

.page-hero {
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.22), transparent 24rem),
    rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  font-size: 17px;
}

.category-block-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 34px;
}

.category-card-block {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
}

.category-card-block h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.category-collage {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  overflow: hidden;
  border-radius: 18px;
}

.category-collage img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 30px;
  align-items: stretch;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.76));
  cursor: pointer;
}

.player-button {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #020617;
  background: var(--accent);
  box-shadow: 0 16px 50px rgba(14, 165, 233, 0.48);
}

.player-overlay strong {
  max-width: 80%;
  font-size: clamp(22px, 4vw, 38px);
  text-align: center;
}

.detail-info {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.74);
}

.detail-one-line {
  color: var(--soft);
  font-size: 17px;
  line-height: 1.8;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  margin-top: 48px;
}

.detail-content article,
.detail-meta-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
}

.detail-content h2,
.detail-meta-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

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

.detail-meta-card dl,
.detail-meta-card div {
  display: grid;
  gap: 12px;
}

.detail-meta-card div {
  grid-template-columns: 70px minmax(0, 1fr);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.detail-meta-card dt {
  color: var(--muted);
}

.detail-meta-card dd {
  margin: 0;
  color: var(--text);
}

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

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

.footer-brand p {
  max-width: 560px;
}

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

.footer-links {
  display: grid;
  gap: 10px;
}

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  color: #64748b;
  text-align: center;
}

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

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    height: auto;
    min-height: 72px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-button {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0 4px;
    border-top: 1px solid var(--line);
  }

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

  .hero-stage {
    min-height: 72vh;
    border-radius: 24px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-content {
    left: 22px;
    bottom: 42px;
  }

  .hero-content p {
    font-size: 15px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

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

  .hero {
    padding-top: 12px;
  }

  .hero-stage {
    min-height: 640px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

  .home-search,
  .page-hero,
  .detail-info,
  .detail-content article,
  .detail-meta-card {
    padding: 22px;
  }

  .search-panel {
    flex-direction: column;
  }

  .search-panel button {
    min-height: 48px;
  }

  .category-grid,
  .movie-grid,
  .compact-grid,
  .wide-grid,
  .category-block-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    grid-template-columns: 108px minmax(0, 1fr);
  }
}
