* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #1e293b;
  --panel: rgba(30, 41, 59, 0.68);
  --panel-strong: rgba(30, 41, 59, 0.92);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --brand: #f59e0b;
  --brand-strong: #d97706;
  --brand-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  backdrop-filter: blur(14px);
}

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

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

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

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

.nav a,
.mobile-nav a {
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
  transition: 180ms ease;
}

.nav a {
  padding: 10px 14px;
}

.nav a:hover,
.nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(30, 41, 59, 0.6);
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-nav a {
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.56);
}

main {
  min-height: calc(100vh - 280px);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #0f172a;
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(245, 158, 11, 0.22), transparent 28%), #0f172a;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.74;
}

.hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.84) 42%, rgba(15, 23, 42, 0.22) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 82px;
}

.hero-copy {
  width: min(680px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 12px;
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.13);
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero h1,
.page-title {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.hero p {
  margin: 18px 0 22px;
  max-width: 620px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.meta-row,
.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pill,
.hero-meta span,
.card-meta span,
.detail-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.tag.brand,
.pill.brand {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: #fff;
  background: rgba(51, 65, 85, 0.72);
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.btn.primary {
  background: var(--brand);
  box-shadow: 0 16px 40px rgba(245, 158, 11, 0.26);
}

.btn:hover {
  transform: translateY(-2px);
  color: #fff;
  background: #475569;
}

.btn.primary:hover {
  background: var(--brand-strong);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.55);
  cursor: pointer;
  transition: 180ms ease;
}

.hero-dot.is-active {
  width: 28px;
  background: #fbbf24;
}

.section {
  padding: 56px 0;
}

.section.compact {
  padding: 34px 0;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  margin: 0;
  color: #fff;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

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

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

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

.movie-card,
.category-card,
.info-panel,
.rank-row,
.detail-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

.movie-card,
.category-card,
.rank-row {
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.movie-card:hover,
.category-card:hover,
.rank-row:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(30, 41, 59, 0.9);
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.poster.wide {
  aspect-ratio: 16 / 9;
}

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

.movie-card:hover .poster img,
.category-card:hover .poster img {
  transform: scale(1.05);
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-body,
.category-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 10px;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.card-title a:hover,
.text-link:hover {
  color: #fbbf24;
}

.card-text {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-card {
  padding: 22px;
}

.category-card h2,
.info-panel h2,
.detail-box h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.category-card p,
.info-panel p,
.detail-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.page-hero {
  padding: 64px 0 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--soft);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fbbf24;
}

.filter-panel {
  margin: 26px 0 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.45);
}

.filter-bar input,
.filter-bar select,
.search-large {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  outline: none;
}

.filter-bar input,
.search-large {
  flex: 1 1 280px;
  padding: 0 14px;
}

.filter-bar select {
  padding: 0 34px 0 12px;
}

.filter-bar input:focus,
.filter-bar select:focus,
.search-large:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 90px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
}

.rank-no {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: #0f172a;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 2 / 3;
  background: #1e293b;
}

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

.rank-row h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.player-ratio video,
.player-start {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-ratio video {
  background: #000;
}

.player-start {
  display: grid;
  place-items: center;
  border: none;
  color: #fff;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.24), rgba(0, 0, 0, 0.66));
  cursor: pointer;
  transition: opacity 180ms ease, visibility 180ms ease;
}

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

.play-ring {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #0f172a;
  background: #fbbf24;
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.36);
  font-size: 30px;
  transform: translateX(2px);
}

.detail-box,
.info-panel {
  padding: 24px;
}

.detail-box {
  margin-top: 22px;
}

.detail-title {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.detail-text {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.detail-text p {
  margin: 14px 0 0;
}

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

.side-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.42);
  transition: 180ms ease;
}

.side-item:hover {
  border-color: rgba(245, 158, 11, 0.42);
  background: rgba(30, 41, 59, 0.82);
}

.side-thumb {
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 2 / 3;
  background: #1e293b;
}

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

.side-item strong {
  display: block;
  color: #fff;
  line-height: 1.35;
}

.side-item span {
  display: block;
  margin-top: 4px;
  color: var(--soft);
  font-size: 12px;
}

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

.site-footer {
  margin-top: 64px;
  padding: 42px 0;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.74);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 12px;
  color: #fff;
}

.footer-grid p,
.footer-grid a {
  color: var(--soft);
  line-height: 1.8;
  font-size: 14px;
}

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

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

.hidden-card {
  display: none !important;
}

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

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

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

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

  .hero {
    height: 560px;
  }

  .hero-content {
    padding-bottom: 76px;
  }

  .hero-controls {
    left: 16px;
    right: auto;
    bottom: 30px;
  }

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

  .rank-row {
    grid-template-columns: 46px 74px 1fr;
  }

  .rank-row .btn {
    grid-column: 2 / 4;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .wrap,
  .mobile-nav {
    width: min(100% - 24px, 1180px);
  }

  .logo {
    font-size: 17px;
  }

  .hero {
    height: 520px;
  }

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

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

  .filter-bar {
    align-items: stretch;
  }

  .filter-bar input,
  .filter-bar select,
  .filter-bar .btn {
    width: 100%;
  }
}
