:root {
  color-scheme: dark;
  --bg-black: #020617;
  --bg-deep: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-solid: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(245, 158, 11, 0.35);
  --text-main: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --amber: #f59e0b;
  --orange: #ea580c;
  --red: #ef4444;
  --shadow: 0 25px 70px rgba(0, 0, 0, 0.38);
  --radius: 18px;
  --max: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.14), transparent 30%), linear-gradient(180deg, #020617 0%, #0f172a 45%, #000 100%);
  color: var(--text-main);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line-strong);
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
}

.site-header-inner {
  width: min(100%, var(--max));
  min-height: 78px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon,
.footer-logo span {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.32);
}

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

.brand-text strong,
.footer-logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

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

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #d1d5db;
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fbbf24;
  background: rgba(51, 65, 85, 0.62);
  transform: translateY(-1px);
}

.header-search,
.mobile-search,
.search-large-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.search-large-form input,
.filter-bar input,
.filter-bar select {
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.74);
  color: var(--text-main);
  outline: none;
  padding: 0 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 220px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-large-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.header-search button,
.mobile-search button,
.search-large-form button,
.primary-button,
.rank-play {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  color: #fff;
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.24);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-large-form button:hover,
.primary-button:hover,
.rank-play:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.7);
  color: var(--text-main);
}

.mobile-panel {
  display: none;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 0 24px 18px;
  border-top: 1px solid var(--line);
}

.mobile-panel.open {
  display: block;
}

.mobile-search input {
  flex: 1;
}

.mobile-links,
.mobile-sub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.mobile-sub-link {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  font-size: 13px;
}

.hero {
  position: relative;
  min-height: 68vh;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 68% 20%, rgba(251, 191, 36, 0.16), transparent 30%);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.88) 36%, rgba(15, 23, 42, 0.44) 72%, rgba(15, 23, 42, 0.1) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 110px 24px 72px;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--amber);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 15px 35px rgba(245, 158, 11, 0.28);
}

.hero h1 {
  max-width: 880px;
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 780px;
  margin: 0;
  color: #dbe4ef;
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-meta {
  margin-top: 18px;
}

.hero-meta span,
.detail-meta span,
.rank-meta span,
.card-meta span {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  padding: 5px 10px;
  font-size: 12px;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 13px;
  font-weight: 800;
}

.ghost-button {
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(15, 23, 42, 0.62);
  color: #fde68a;
  transition: transform 0.2s ease, background 0.2s ease;
}

.ghost-button:hover {
  background: rgba(245, 158, 11, 0.16);
  transform: translateY(-2px);
}

.content-section,
.page-shell,
.detail-shell {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 56px 24px;
}

.compact-section {
  padding-top: 12px;
  padding-bottom: 12px;
}

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

.section-heading h2,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--text-muted);
}

.section-more {
  color: #fbbf24;
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.78), rgba(15, 23, 42, 0.86));
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
  transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(245, 158, 11, 0.1);
}

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

.poster-link img,
.rank-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), transparent 62%);
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.94);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.36);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info h2 a:hover,
.category-sample-links a:hover,
.breadcrumb a:hover,
.side-card a:hover {
  color: #fbbf24;
}

.movie-card p {
  margin: 0 0 13px;
  color: var(--text-muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.card-tags span,
.detail-tags span {
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.82);
  color: #dbe4ef;
  padding: 5px 9px;
  font-size: 12px;
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  padding: 24px;
  min-height: 135px;
  transition: transform 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.86), rgba(194, 65, 12, 0.86));
}

.category-tile span,
.category-overview-card h2 {
  display: block;
  margin: 0 0 8px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.category-tile small,
.category-overview-card p {
  color: #cbd5e1;
}

.category-overview-card {
  min-height: 230px;
}

.category-sample-links {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.category-sample-links a {
  color: #e2e8f0;
  font-size: 14px;
}

.page-hero {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: radial-gradient(circle at 85% 20%, rgba(245, 158, 11, 0.24), transparent 34%), linear-gradient(135deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.82));
  box-shadow: var(--shadow);
}

.small-hero {
  padding: 44px;
  margin-bottom: 34px;
}

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

.breadcrumb strong {
  color: #f8fafc;
}

.filter-bar,
.search-panel {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.7);
}

.filter-bar label {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

.filter-bar input {
  width: min(560px, 78vw);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 138px 58px 1fr auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  padding: 14px;
  transition: transform 0.2s ease, border 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.45);
}

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

.rank-number {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.rank-info h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--text-muted);
}

.detail-shell {
  padding-top: 34px;
}

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

.player-area {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-area video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.12), rgba(0, 0, 0, 0.52));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-circle {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  font-size: 34px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
  transform: translateX(3px);
}

.detail-content,
.side-card {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.76);
  padding: 26px;
}

.detail-content h1 {
  margin-bottom: 12px;
}

.detail-content h2,
.side-card h2 {
  margin: 28px 0 10px;
  font-size: 22px;
}

.detail-content p {
  margin: 0 0 14px;
  color: #d1d5db;
}

.detail-one-line {
  font-size: 18px;
  color: #e5e7eb;
}

.detail-poster {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #0f172a;
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 12px;
  margin: 0;
}

.side-card dt {
  color: var(--text-muted);
}

.side-card dd {
  margin: 0;
  color: #f8fafc;
}

.related-section {
  padding-left: 0;
  padding-right: 0;
}

.search-panel {
  display: block;
}

.search-large-form input {
  flex: 1;
  min-width: min(620px, 100%);
  height: 52px;
}

.search-summary {
  min-height: 28px;
  margin-top: 14px;
  color: var(--text-muted);
}

.hidden-card {
  display: none;
}

.site-footer {
  margin-top: 48px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.84), #000);
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 44px 24px 28px;
  display: grid;
  grid-template-columns: 1.1fr 1.8fr;
  gap: 32px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-brand p {
  margin: 0;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 12px;
}

.footer-links a {
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.78);
  color: #d1d5db;
  padding: 8px 13px;
}

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

.footer-bottom {
  width: min(100%, var(--max));
  margin: 0 auto;
  padding: 18px 24px 28px;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

@media (max-width: 1100px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

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

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

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

@media (max-width: 760px) {
  .site-header-inner {
    min-height: 66px;
    padding: 0 16px;
  }

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

  .brand-text em {
    display: none;
  }

  .hero {
    min-height: 72vh;
  }

  .hero-content {
    padding: 86px 18px 48px;
  }

  .content-section,
  .page-shell,
  .detail-shell {
    padding: 38px 16px;
  }

  .small-hero {
    padding: 28px;
  }

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

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

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

  .rank-item {
    grid-template-columns: 92px 44px 1fr;
  }

  .rank-play {
    grid-column: 1 / -1;
    text-align: center;
  }

  .rank-cover {
    height: 78px;
  }

  .rank-number {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 18px;
  }

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

  .footer-inner {
    grid-template-columns: 1fr;
    padding: 36px 16px 24px;
  }
}

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

  .hero-actions {
    display: grid;
  }

  .rank-item {
    grid-template-columns: 86px 1fr;
  }

  .rank-number {
    position: absolute;
    margin-left: 56px;
    margin-top: -44px;
  }
}
