:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --panel: #171717;
  --panel-soft: #202020;
  --line: #2b2b2b;
  --text: #f5f5f5;
  --muted: #a3a3a3;
  --muted-2: #737373;
  --accent: #f59e0b;
  --accent-2: #fbbf24;
  --danger: #ef4444;
  --radius: 18px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
  --content: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.14), transparent 28rem),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.05), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body::selection {
  background: rgba(245, 158, 11, 0.35);
}

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

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

main {
  min-height: 72vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr minmax(240px, 320px);
  gap: 22px;
  align-items: center;
  max-width: var(--content);
  margin: 0 auto;
  padding: 14px 22px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 190px;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #d97706);
  color: #171717;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.22);
}

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

.logo-text strong {
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.logo-text small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 999px;
  color: #d4d4d4;
  font-size: 0.92rem;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-2);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 9px 12px;
}

.global-search {
  position: relative;
}

.global-search-input,
.js-card-search,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 12px 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.global-search-input:focus,
.js-card-search:focus,
.filter-panel select:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.global-search-results {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: 0;
  z-index: 110;
  display: none;
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(23, 23, 23, 0.98);
  box-shadow: var(--shadow);
}

.global-search-results.is-open {
  display: block;
}

.global-search-results a {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.global-search-results a:hover {
  background: rgba(245, 158, 11, 0.1);
}

.global-search-results strong {
  display: block;
  color: var(--text);
}

.global-search-results span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s ease;
  pointer-events: none;
  background-position: center;
  background-size: cover;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.66) 42%, rgba(0, 0, 0, 0.25) 100%),
    linear-gradient(0deg, var(--bg), transparent 45%);
}

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

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--content);
  margin: 0 auto;
  padding: 120px 22px 80px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 8px 12px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.1);
  color: var(--accent-2);
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 660px;
  margin: 22px 0 0;
  color: #d4d4d4;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

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

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

.button {
  background: var(--accent);
  color: #171717;
}

.button:hover,
.button-secondary:hover {
  transform: translateY(-2px);
}

.button-secondary {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-meta span,
.movie-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e5e5e5;
  font-size: 0.8rem;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  color: var(--text);
  font-size: 1.7rem;
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  right: 0;
  bottom: 30px;
  left: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dot.is-active {
  background: var(--accent);
}

.section,
.page-hero,
.detail-section {
  max-width: var(--content);
  margin: 0 auto;
  padding: 70px 22px;
}

.page-hero {
  padding-top: 88px;
  padding-bottom: 36px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.section-header h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-header p,
.page-hero p,
.detail-title p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.16);
  transition: border 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.62);
  transform: translateY(-5px);
  box-shadow: 0 20px 58px rgba(245, 158, 11, 0.1);
}

.movie-card.is-hidden {
  display: none;
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #262626, #111111);
}

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

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

.movie-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.movie-type {
  right: 10px;
  bottom: 10px;
  padding: 4px 9px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  padding: 6px 9px;
  background: var(--accent);
  color: #171717;
}

.movie-info {
  padding: 16px;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.movie-info h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.movie-info h3 a:hover {
  color: var(--accent-2);
}

.movie-info p {
  display: -webkit-box;
  min-height: 3.4em;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.92rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 0.84rem;
}

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

.category-card {
  min-height: 150px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.15), transparent 52%),
    var(--panel);
  transition: transform 0.2s ease, border 0.2s ease;
}

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

.category-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.category-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 130px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--accent);
  color: #171717;
  font-weight: 900;
}

.rank-row img {
  width: 130px;
  height: 82px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-row h3 {
  margin: 0;
}

.rank-row p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: center;
  max-width: var(--content);
  margin: 0 auto;
  padding: 80px 22px 36px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.meta-list span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #e5e5e5;
}

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

.player-section {
  max-width: var(--content);
  margin: 0 auto;
  padding: 26px 22px 60px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background: rgba(0, 0, 0, 0.42);
  color: #ffffff;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--accent);
  color: #171717;
  font-size: 2rem;
  box-shadow: 0 20px 45px rgba(245, 158, 11, 0.22);
}

.content-box {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 22px 68px;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.article-panel,
.side-panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  padding: 24px;
}

.article-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

.article-panel p {
  margin: 0 0 18px;
  color: #d4d4d4;
  white-space: pre-line;
}

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

.side-links a {
  display: block;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #e5e5e5;
}

.side-links a:hover {
  background: rgba(245, 158, 11, 0.13);
  color: var(--accent-2);
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.32);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--content);
  margin: 0 auto;
  padding: 34px 22px;
}

.footer-inner p {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.copyright {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 22px 28px;
  color: var(--muted-2);
  font-size: 0.88rem;
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

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

@media (max-width: 1024px) {
  .header-inner {
    grid-template-columns: auto auto;
  }

  .menu-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .nav-links {
    grid-column: 1 / -1;
    display: none;
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
  }

  .nav-links.is-open {
    display: flex;
  }

  .global-search {
    grid-column: 1 / -1;
  }

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

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

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

  .detail-poster {
    max-width: 360px;
  }
}

@media (max-width: 760px) {
  .hero-carousel {
    min-height: 620px;
  }

  .hero-content {
    padding-top: 96px;
  }

  .hero-control {
    display: none;
  }

  .section,
  .page-hero,
  .detail-section {
    padding-right: 16px;
    padding-left: 16px;
  }

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

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

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

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

  .rank-row .button-secondary {
    grid-column: 1 / -1;
  }

  .rank-row img {
    width: 92px;
    height: 66px;
  }

  .detail-hero {
    padding-top: 50px;
  }

  .footer-inner {
    flex-direction: column;
  }
}
