:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-soft: rgba(30, 41, 59, 0.58);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --amber: #f59e0b;
  --amber-2: #fbbf24;
  --blue: #38bdf8;
}

* {
  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.13), transparent 32rem), linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1400px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  box-shadow: 0 0 32px rgba(245, 158, 11, 0.34);
  font-size: 20px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fde68a, #fff7ed, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--amber-2);
  transition: width 0.2s ease;
}

.nav-link:hover {
  color: var(--amber-2);
}

.nav-link:hover::after {
  width: 100%;
}

.header-search {
  width: min(330px, 28vw);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.42);
}

.header-search input,
.mobile-panel input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  outline: 0;
}

.header-search input {
  width: 100%;
  padding: 9px 12px;
  border: 0;
  background: transparent;
}

.header-search button,
.mobile-panel button {
  border: 0;
  border-radius: 999px;
  padding: 9px 16px;
  color: #111827;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.66);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 22px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-panel a {
  color: #cbd5e1;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.mobile-panel form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.mobile-panel input {
  border-radius: 12px;
  padding: 11px 12px;
}

.home-main,
.page-main {
  min-height: 60vh;
}

.hero-section {
  position: relative;
  height: 72vh;
  min-height: 580px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  transform: scale(1.015);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-content {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 760px;
  position: relative;
  z-index: 2;
}

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

.hero-kicker::before,
.section-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber-2);
  box-shadow: 0 0 24px rgba(251, 191, 36, 0.8);
}

.hero-content h1 {
  margin: 18px 0 22px;
  font-size: clamp(42px, 8vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  max-width: 850px;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.75;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.hero-meta span,
.detail-meta span,
.tag-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 999px;
  padding: 8px 13px;
  color: #f8fafc;
  background: rgba(245, 158, 11, 0.13);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 650;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  color: #111827;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  box-shadow: 0 16px 45px rgba(245, 158, 11, 0.25);
}

.ghost-btn {
  color: #f8fafc;
  border: 1px solid rgba(248, 250, 252, 0.24);
  background: rgba(15, 23, 42, 0.42);
}

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

.hero-thumbs {
  position: absolute;
  right: max(24px, calc((100vw - 1400px) / 2));
  bottom: 34px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  width: min(760px, calc(100% - 48px));
}

.hero-thumb {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  padding: 8px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(18px);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
}

.hero-thumb.is-active {
  border-color: rgba(251, 191, 36, 0.66);
  color: #f8fafc;
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.18);
}

.hero-thumb img {
  width: 58px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(30, 41, 59, 0.8);
}

.hero-thumb span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 750;
}

.content-section {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 66px 0;
}

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

.section-heading h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.1;
}

.section-more {
  flex-shrink: 0;
  color: var(--amber-2);
  font-weight: 750;
}

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

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

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

.movie-card {
  position: relative;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.74), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.14);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.34);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(251, 191, 36, 0.38);
  box-shadow: 0 24px 80px rgba(245, 158, 11, 0.14);
}

.movie-card-link {
  display: block;
  min-height: 100%;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  background: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.22), rgba(15, 23, 42, 0.82));
  overflow: hidden;
}

.poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease, opacity 0.2s ease;
}

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.9));
}

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

.poster-type {
  right: 12px;
  color: #111827;
  background: linear-gradient(135deg, #fde68a, var(--amber));
}

.rank-badge {
  left: 12px;
  color: #f8fafc;
  background: rgba(239, 68, 68, 0.9);
}

.poster-play {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.86);
  border-radius: 50%;
  color: #111827;
  background: rgba(251, 191, 36, 0.92);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.movie-card-body {
  padding: 16px 16px 18px;
}

.movie-card-body h3 {
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-line {
  min-height: 42px;
  margin: 0 0 12px;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.collection-card {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  padding: 26px;
  background-color: rgba(15, 23, 42, 0.8);
  box-shadow: 0 20px 70px rgba(2, 6, 23, 0.28);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.collection-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.42);
}

.collection-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
}

.collection-card h3 {
  margin: 18px 0 10px;
  font-size: 24px;
}

.collection-card p {
  margin: 0 0 18px;
  color: #cbd5e1;
  line-height: 1.7;
}

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

.collection-samples span {
  max-width: 100%;
  border-radius: 999px;
  padding: 6px 10px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.56);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-panel {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 22px 70px rgba(2, 6, 23, 0.28);
}

.rank-row {
  display: grid;
  grid-template-columns: 54px 54px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  transition: background 0.2s ease;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row:hover {
  background: rgba(245, 158, 11, 0.08);
}

.rank-num {
  color: var(--amber-2);
  font-size: 22px;
  font-weight: 900;
}

.rank-row img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(30, 41, 59, 0.8);
}

.rank-title {
  font-weight: 800;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.page-main {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 60px;
}

.page-hero {
  margin: 38px 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 34px;
  padding: clamp(34px, 6vw, 70px);
  background: radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.2), transparent 32rem), linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.72));
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.34);
}

.page-hero h1 {
  margin: 14px 0 16px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.06;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 28px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border-radius: 14px;
  padding: 13px 14px;
}

.empty-state {
  display: none;
  margin: 40px 0 0;
  padding: 36px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
}

.empty-state.is-visible {
  display: block;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 26px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 28px 90px rgba(2, 6, 23, 0.46);
}

.player-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  color: #f8fafc;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.play-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-2), var(--amber));
  font-size: 34px;
  box-shadow: 0 18px 60px rgba(245, 158, 11, 0.36);
}

.play-title {
  max-width: min(680px, calc(100% - 48px));
  font-size: clamp(22px, 4vw, 42px);
  font-weight: 900;
  text-align: center;
  text-shadow: 0 6px 28px rgba(0, 0, 0, 0.72);
}

.detail-card,
.side-info {
  margin-top: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  padding: 28px;
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 22px 70px rgba(2, 6, 23, 0.28);
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.12;
}

.detail-card h2,
.side-info h2 {
  margin: 28px 0 12px;
  color: #fef3c7;
  font-size: 22px;
}

.detail-card p {
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.9;
}

.detail-one-line {
  color: #f8fafc !important;
  font-size: 18px !important;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.side-poster {
  overflow: hidden;
  border-radius: 26px;
  background: rgba(30, 41, 59, 0.8);
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.34);
}

.side-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.side-info p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  margin: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
}

.side-info p:last-child {
  border-bottom: 0;
}

.side-info strong {
  color: #f8fafc;
}

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

.side-rank {
  position: sticky;
  top: 96px;
}

.site-footer {
  margin-top: 60px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.76), rgba(2, 6, 23, 0.98));
}

.footer-inner {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 1fr 1fr;
  gap: 40px;
}

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

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

.footer-links h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

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

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

.footer-bottom {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 34px;
  color: #64748b;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .header-search {
    display: none;
  }

  .large-grid,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .side-rank {
    position: static;
  }

  .detail-side {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 22px;
  }
}

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

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

  .hero-section {
    height: auto;
    min-height: 720px;
  }

  .hero-slide {
    align-items: flex-start;
    padding-top: 88px;
  }

  .hero-thumbs {
    left: 16px;
    right: 16px;
    bottom: 18px;
    width: auto;
    grid-template-columns: 1fr;
  }

  .hero-thumb {
    grid-template-columns: 46px 1fr;
  }

  .hero-thumb img {
    width: 46px;
    height: 58px;
  }

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

  .collection-grid,
  .movie-grid,
  .large-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

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

  .rank-row {
    grid-template-columns: 42px 48px 1fr;
  }

  .rank-meta {
    display: none;
  }

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

  .side-poster {
    max-width: 280px;
  }

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

@media (max-width: 520px) {
  .header-inner,
  .content-section,
  .page-main,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1400px);
  }

  .brand-name {
    font-size: 17px;
  }

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

  .hero-meta span,
  .detail-meta span,
  .tag-pill {
    padding: 7px 10px;
  }

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

  .movie-card-body h3 {
    font-size: 14px;
  }

  .movie-line {
    min-height: 38px;
    font-size: 12px;
  }

  .page-hero,
  .detail-card,
  .side-info {
    border-radius: 22px;
    padding: 22px;
  }

  .play-icon {
    width: 68px;
    height: 68px;
  }
}
