:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --line: rgba(148, 163, 184, 0.16);
  --accent: #f59e0b;
  --accent-strong: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.18);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --container: 1180px;
}

* {
  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.12), transparent 34rem),
    radial-gradient(circle at 90% 16%, rgba(59, 130, 246, 0.10), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  padding: 0.7rem 1rem;
  border-radius: 0 0 12px 0;
  background: var(--accent);
  color: #111827;
  font-weight: 800;
}

.skip-link:focus {
  left: 0;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
}

.header-inner {
  max-width: var(--container);
  height: 68px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.brand-mark {
  width: 2.45rem;
  height: 2.45rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  color: white;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.24);
}

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

.brand-text strong {
  color: white;
  font-size: 1.22rem;
  letter-spacing: 0.02em;
}

.brand-text span {
  color: rgba(245, 158, 11, 0.86);
  font-size: 0.78rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a {
  color: #d1d5db;
  padding: 0.62rem 0.92rem;
  border-radius: 12px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: white;
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  color: white;
  background: rgba(30, 41, 59, 0.82);
  border-radius: 12px;
  padding: 0.5rem 0.78rem;
}

main {
  min-height: 70vh;
}

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
}

.page-pad {
  padding-top: 104px;
  padding-bottom: 4rem;
}

.hero {
  position: relative;
  min-height: 70vh;
  height: clamp(560px, 72vh, 760px);
  overflow: hidden;
  background: #020617;
}

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

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

.hero-media {
  position: absolute;
  inset: 0;
  display: block;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 6s ease;
}

.hero-slide.is-active .hero-media img {
  transform: scale(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.20) 45%, rgba(2, 6, 23, 0.20) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
  padding-top: 96px;
  padding-bottom: 5.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 7px rgba(245, 158, 11, 0.16);
}

.hero h1,
.hero h2 {
  width: min(760px, 100%);
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  color: white;
}

.hero p {
  width: min(720px, 100%);
  margin: 0 0 1.2rem;
  color: #d1d5db;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.pill,
.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.80);
  color: var(--accent);
  border: 1px solid rgba(245, 158, 11, 0.18);
  font-size: 0.86rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.85rem;
  padding: 0.72rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(30, 41, 59, 0.82);
  color: white;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.24);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: transparent;
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(12px);
}

.hero-search {
  width: min(600px, 100%);
  margin-top: 1.35rem;
  display: flex;
  gap: 0.65rem;
  padding: 0.38rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
}

.hero-search input,
.filter-input,
.filter-select {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  outline: none;
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.88);
  color: white;
  padding: 0 0.95rem;
}

.hero-search input {
  border-color: transparent;
  background: transparent;
}

.hero-control {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.46);
  color: white;
  backdrop-filter: blur(10px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.68);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: max(1rem, calc((100vw - var(--container)) / 2 - 4rem));
  transform: translateY(-50%);
}

.hero-next {
  right: max(1rem, calc((100vw - var(--container)) / 2 - 4rem));
  transform: translateY(-50%);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.45rem;
}

.hero-dots button {
  width: 0.62rem;
  height: 0.62rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.is-active {
  width: 2.3rem;
  background: var(--accent);
}

.section {
  margin: 0 0 4rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.section-head h1,
.section-head h2,
.page-title h1 {
  margin: 0;
  color: white;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.section-head p,
.page-title p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.home-wrap {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px) scale(1.012);
  background: rgba(30, 41, 59, 0.82);
  border-color: rgba(245, 158, 11, 0.34);
  box-shadow: var(--shadow);
}

.movie-poster {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #0f172a;
}

.movie-poster.tall {
  aspect-ratio: 3 / 4;
}

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

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

.movie-card:hover img,
.feature-tile:hover img,
.related-card:hover img {
  transform: scale(1.08);
}

.movie-year,
.movie-rank {
  position: absolute;
  z-index: 2;
  top: 0.75rem;
  right: 0.75rem;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.95);
  color: white;
  padding: 0.18rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.movie-rank {
  right: auto;
  left: 0.75rem;
  min-width: 2rem;
  text-align: center;
}

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.12));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.play-hover span {
  width: 4rem;
  height: 4rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 1.3rem;
  transform: scale(0.9);
  transition: transform 0.25s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
}

.movie-card:hover .play-hover span {
  transform: scale(1);
}

.movie-body {
  padding: 1rem;
}

.movie-body h3 {
  margin: 0 0 0.45rem;
  color: white;
  font-size: 1.05rem;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover h3,
.related-card:hover h3 {
  color: var(--accent);
}

.movie-body p {
  margin: 0 0 0.8rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

.feature-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(120deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.72));
  padding: 1.35rem;
  box-shadow: var(--shadow);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature-tile {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
}

.feature-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.feature-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.12));
}

.feature-info {
  position: absolute;
  z-index: 2;
  inset: auto 0 0;
  padding: 1.2rem;
}

.feature-info h3 {
  margin: 0 0 0.35rem;
  color: white;
  font-size: 1.25rem;
}

.feature-info p {
  margin: 0;
  color: #d1d5db;
  font-size: 0.9rem;
}

.scroll-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.2rem 0.1rem 1rem;
  scrollbar-color: var(--accent) rgba(15, 23, 42, 0.72);
}

.scroll-row .movie-card {
  flex: 0 0 260px;
}

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

.category-card {
  min-height: 175px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.13), transparent 55%),
    rgba(15, 23, 42, 0.76);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.34);
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.22), transparent 58%),
    rgba(30, 41, 59, 0.84);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 0.45rem;
  color: white;
}

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

.category-count {
  margin-top: 1rem;
  color: var(--accent);
  font-weight: 800;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.rank-item {
  display: grid;
  grid-template-columns: 3rem 74px 1fr;
  gap: 0.9rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.rank-no {
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 900;
}

.rank-thumb {
  width: 74px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

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

.rank-info h3 {
  margin: 0 0 0.15rem;
  color: white;
  font-size: 1rem;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 0.35fr));
  gap: 0.8rem;
  margin: 1.5rem 0 1.8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.68);
}

.result-count {
  margin: -0.8rem 0 1.4rem;
  color: var(--muted);
}

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

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-element {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: #020617;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.18));
}

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

.play-mark {
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
  font-weight: 900;
  font-size: 1.08rem;
}

.play-mark i {
  width: 4.8rem;
  height: 4.8rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  font-style: normal;
  font-size: 1.65rem;
  box-shadow: 0 22px 60px rgba(245, 158, 11, 0.35);
}

.content-panel,
.side-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  padding: 1.25rem;
}

.content-panel h1 {
  margin: 0 0 1rem;
  color: white;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.content-panel h2,
.side-panel h2 {
  margin: 1.65rem 0 0.7rem;
  color: white;
  font-size: 1.45rem;
}

.content-panel p {
  color: var(--muted-strong);
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.8rem 0 1rem;
}

.meta-line span {
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.78);
  color: var(--muted-strong);
  font-size: 0.88rem;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.side-poster {
  overflow: hidden;
  border-radius: 18px;
  background: #0f172a;
  aspect-ratio: 3 / 4;
  margin-bottom: 1rem;
}

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

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.related-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
}

.related-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.related-card h3 {
  margin: 0;
  padding: 0.8rem;
  color: white;
  font-size: 0.96rem;
}

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

.footer-inner {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

.footer-inner strong {
  color: white;
}

.empty-state {
  display: none;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .card-grid,
  .feature-grid,
  .category-grid,
  .related-grid,
  .rank-list,
  .detail-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-layout {
    display: flex;
    flex-direction: column;
  }

  .side-panel {
    width: 100%;
  }

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

@media (max-width: 760px) {
  .header-inner {
    height: 62px;
  }

  .brand-text strong {
    font-size: 1rem;
  }

  .brand-text span {
    display: none;
  }

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

  .main-nav {
    position: absolute;
    top: 62px;
    left: 1rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: var(--shadow);
  }

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

  .hero {
    height: auto;
    min-height: 680px;
  }

  .hero-content {
    padding-top: 100px;
    padding-bottom: 5rem;
  }

  .hero-control {
    display: none;
  }

  .hero-search {
    flex-direction: column;
  }

  .card-grid,
  .feature-grid,
  .category-grid,
  .related-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 2.8rem 72px 1fr;
  }

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

  .section-head,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
