:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: #111827;
  --bg-card-soft: #1e293b;
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 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(245, 158, 11, 0.15), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner,
.footer-inner,
.section,
.hero-content,
.detail-inner,
.page-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background:
    linear-gradient(135deg, #fbbf24, #f97316),
    radial-gradient(circle at 70% 20%, #ffffff, transparent 28%);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.34);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, #fef3c7, #f59e0b, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav,
.mobile-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 9px 13px;
  border-radius: 12px;
  color: var(--muted-strong);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fcd34d;
  background: var(--accent-soft);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--text);
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.mobile-toggle span {
  width: 19px;
  height: 2px;
  background: currentColor;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  flex-direction: column;
  align-items: stretch;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
}

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

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

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

.hero-image,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 34%, rgba(2, 6, 23, 0.25) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.38) 44%, rgba(2, 6, 23, 0.14) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 0 86px;
}

.hero-tags,
.meta-pills,
.tag-row,
.pill-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.meta-pills span,
.tag-row span,
.pill-links a,
.category-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  line-height: 1;
}

.hero-tags span,
.meta-pills span,
.tag-row span {
  padding: 7px 10px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
  font-size: 13px;
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 18px 0 12px;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-title-line {
  margin: 0 0 12px;
  color: #fcd34d;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 700;
}

.hero p:not(.hero-title-line) {
  max-width: 760px;
  margin: 0 0 28px;
  color: var(--muted-strong);
  font-size: 17px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

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

.btn.primary {
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.26);
}

.btn.ghost {
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.btn.text {
  color: #fcd34d;
  background: transparent;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(248, 250, 252, 0.24);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.52);
  cursor: pointer;
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(245, 158, 11, 0.72);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.45);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 30px;
  background: var(--accent);
}

.section {
  padding: 54px 0 0;
}

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

.section-kicker,
.category-kicker {
  margin-bottom: 8px;
  padding: 7px 10px;
  color: #fcd34d;
  background: var(--accent-soft);
  border: 1px solid rgba(245, 158, 11, 0.22);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section h2,
.page-hero h1,
.detail-info h1,
.detail-text h2 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.section h2 {
  font-size: clamp(26px, 4vw, 40px);
}

.section-more {
  color: #fcd34d;
  font-weight: 800;
}

.pill-links {
  padding: 20px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.pill-links a {
  padding: 10px 14px;
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.16);
  transition: background 0.2s ease, transform 0.2s ease;
}

.pill-links a:hover {
  color: #111827;
  background: var(--accent);
  transform: translateY(-2px);
}

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

.movie-card {
  overflow: hidden;
  min-width: 0;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.44);
  background: rgba(17, 24, 39, 0.96);
  transform: translateY(-6px);
}

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

.poster-link img,
.rank-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.type-badge {
  right: 10px;
  color: #111827;
  background: #fbbf24;
}

.rank-badge {
  left: 10px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.movie-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card h3 a:hover,
.rank-row h3 a:hover,
.footer-links a:hover {
  color: #fcd34d;
}

.movie-meta,
.movie-desc,
.rank-row p,
.footer-main p,
.detail-one-line,
.detail-text p,
.page-hero p {
  color: var(--muted-strong);
}

.movie-meta {
  margin: 0 0 8px;
  font-size: 13px;
}

.movie-desc {
  margin: 0 0 12px;
  min-height: 60px;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span {
  padding: 6px 8px;
  font-size: 12px;
}

.tag-row.large span {
  font-size: 13px;
}

.rank-section {
  max-width: 980px;
}

.ranking-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.rank-row:hover {
  border-color: rgba(245, 158, 11, 0.42);
  transform: translateX(4px);
}

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

.rank-cover {
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

.rank-row h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

.rank-row p {
  margin: 0;
  font-size: 14px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 38px;
  background:
    radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.22), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.92));
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(34px, 6vw, 58px);
}

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

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

.category-card {
  display: flex;
  min-height: 240px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  background:
    linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92)),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.24), transparent 16rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  border-color: rgba(245, 158, 11, 0.44);
  transform: translateY(-4px);
}

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

.category-card p {
  margin: 0 0 18px;
  color: var(--muted-strong);
}

.category-samples {
  display: grid;
  gap: 8px;
}

.category-samples a {
  color: #fcd34d;
  font-size: 14px;
}

.tool-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  margin-bottom: 22px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.search-box input,
.tool-panel select {
  width: 100%;
  min-height: 48px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.64);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  outline: none;
}

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

.tool-panel select {
  padding: 0 12px;
}

.search-box input:focus,
.tool-panel select:focus {
  border-color: rgba(245, 158, 11, 0.58);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.detail-hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  background: #020617;
}

.detail-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.38)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.32) 100%);
  backdrop-filter: blur(2px);
}

.detail-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
  min-height: 660px;
  padding: 110px 0 70px;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(248, 250, 252, 0.12);
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: #111827;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
  color: var(--muted-strong);
  font-size: 14px;
}

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

.detail-info h1 {
  max-width: 820px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.1;
}

.meta-pills {
  margin: 18px 0;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: 18px;
}

.detail-info .btn {
  margin-top: 24px;
}

.player-section {
  padding-top: 62px;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
  border: 1px solid rgba(248, 250, 252, 0.12);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
  align-content: center;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.16), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  padding-left: 5px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.34);
  font-size: 30px;
}

.player-overlay strong {
  font-size: 18px;
}

.detail-text {
  max-width: 960px;
}

.detail-text h2 {
  margin: 28px 0 12px;
  font-size: 28px;
}

.detail-text p {
  margin: 0;
  font-size: 17px;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  padding: 42px 0;
}

.footer-main p {
  max-width: 520px;
  margin: 14px 0 0;
}

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

.footer-links h2 {
  margin: 0 0 6px;
  font-size: 17px;
}

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

.footer-bottom {
  padding: 18px 16px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 14px;
}

[data-card].is-hidden {
  display: none;
}

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

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

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

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

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

  .hero {
    height: 72vh;
    min-height: 540px;
  }

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

  .hero p:not(.hero-title-line) {
    -webkit-line-clamp: 4;
    font-size: 15px;
  }

  .hero-arrow {
    display: none;
  }

  .section-title-row {
    align-items: start;
    flex-direction: column;
    gap: 10px;
  }

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

  .movie-desc {
    min-height: auto;
    -webkit-line-clamp: 2;
  }

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

  .detail-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 92px;
  }

  .detail-poster {
    width: 220px;
  }

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

@media (max-width: 460px) {
  .header-inner,
  .footer-inner,
  .section,
  .hero-content,
  .detail-inner,
  .page-hero > div,
  .mobile-nav {
    width: min(100% - 24px, 1180px);
  }

  .brand-text {
    font-size: 18px;
  }

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

  .rank-row {
    grid-template-columns: 38px 64px 1fr;
    gap: 10px;
  }

  .category-card {
    min-height: 220px;
  }
}
