:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(30, 41, 59, 0.88);
  --line: rgba(250, 204, 21, 0.16);
  --line-strong: rgba(250, 204, 21, 0.38);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --gold: #facc15;
  --amber: #f59e0b;
  --dark: #0f172a;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  --gold-shadow: 0 18px 42px rgba(234, 179, 8, 0.16);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, 0.11), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(245, 158, 11, 0.09), transparent 32rem),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--dark);
  background: linear-gradient(135deg, var(--gold), var(--amber));
  box-shadow: 0 12px 28px rgba(250, 204, 21, 0.25);
}

.brand-text {
  font-size: 1.18rem;
  white-space: nowrap;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: rgba(250, 204, 21, 0.11);
}

.top-search,
.mobile-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.search-panel input,
.filter-control,
.select-control {
  min-width: 220px;
  height: 42px;
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: 14px;
  outline: 0;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  padding: 0 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.search-panel input:focus,
.filter-control:focus,
.select-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(250, 204, 21, 0.08);
}

.top-search button,
.mobile-search button,
.btn,
.hero-button,
.player-button {
  border: 0;
  border-radius: 999px;
  color: var(--dark);
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--amber));
  box-shadow: 0 14px 32px rgba(234, 179, 8, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.top-search button,
.mobile-search button {
  height: 42px;
  padding: 0 18px;
}

.top-search button:hover,
.mobile-search button:hover,
.btn:hover,
.hero-button:hover,
.player-button:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 18px 42px rgba(234, 179, 8, 0.28);
  filter: brightness(1.04);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  padding: 0 14px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 16px 18px;
  background: rgba(2, 6, 23, 0.92);
}

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

.mobile-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-nav .nav-link {
  background: rgba(15, 23, 42, 0.72);
}

.hero-slider {
  position: relative;
  height: 600px;
  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-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(51, 65, 85, 0.75));
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.72) 50%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(to right, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.1));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 700px;
  animation: slideIn 0.8s ease both;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.hero-copy h1 {
  margin: 16px 0 18px;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 660px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: 1.1rem;
  line-height: 1.8;
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.hero-button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
}

.btn-ghost {
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.3s ease, background 0.3s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--gold);
}

.section {
  padding: 72px 0;
}

.section-muted {
  background: rgba(15, 23, 42, 0.34);
  border-block: 1px solid rgba(250, 204, 21, 0.08);
}

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

.section-title {
  margin: 8px 0 0;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  line-height: 1.1;
}

.section-lead {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(250, 204, 21, 0.09);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.34);
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px) scale(1.01);
  background: rgba(30, 41, 59, 0.62);
  border-color: rgba(250, 204, 21, 0.34);
  box-shadow: var(--gold-shadow);
}

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

.poster-frame {
  position: relative;
  height: 260px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(250, 204, 21, 0.18), transparent 45%),
    linear-gradient(135deg, #0f172a, #1e293b);
}

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

.poster-frame img:not([src]),
.poster-frame img[src=""] {
  opacity: 0;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.9), transparent 56%);
}

.year-badge,
.play-badge,
.detail-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.year-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  color: var(--dark);
  background: linear-gradient(135deg, var(--gold), var(--amber));
}

.play-badge {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-row span,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--gold);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(250, 204, 21, 0.12);
  font-size: 0.82rem;
}

.movie-card-list .card-link {
  display: grid;
  grid-template-columns: 280px 1fr;
}

.movie-card-list .poster-frame {
  height: 100%;
  min-height: 190px;
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 28px;
  border-radius: 22px;
  border: 1px solid rgba(250, 204, 21, 0.12);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.8));
  transition: transform 0.25s ease, border 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--gold-shadow);
}

.category-icon {
  font-size: 2.6rem;
  margin-bottom: 18px;
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 34px;
}

.list-stack {
  display: grid;
  gap: 18px;
}

.rank-panel,
.info-panel,
.search-panel,
.detail-panel,
.player-card {
  border: 1px solid rgba(250, 204, 21, 0.1);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.rank-panel {
  padding: 22px;
}

.rank-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.rank-item:hover {
  background: rgba(30, 41, 59, 0.68);
}

.rank-num {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.9);
  color: var(--muted);
  font-weight: 900;
}

.rank-gold,
.rank-silver,
.rank-bronze {
  color: var(--dark);
}

.rank-gold {
  background: linear-gradient(135deg, var(--gold), var(--amber));
}

.rank-silver {
  background: linear-gradient(135deg, #e5e7eb, #94a3b8);
}

.rank-bronze {
  background: linear-gradient(135deg, #d97706, #92400e);
  color: #fff7ed;
}

.rank-title {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
}

.page-hero {
  padding: 58px 0 34px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.94rem;
}

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

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

.controls-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

.view-toggle {
  display: inline-flex;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.7);
}

.view-toggle button {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
}

.view-toggle button.is-active {
  color: var(--dark);
  background: linear-gradient(135deg, var(--gold), var(--amber));
}

.movies-list-view {
  grid-template-columns: 1fr !important;
}

.search-panel {
  padding: 24px;
  margin-bottom: 28px;
}

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

.search-panel input {
  width: 100%;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
  gap: 34px;
}

.player-card {
  overflow: hidden;
  margin-bottom: 26px;
}

.player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.12), rgba(2, 6, 23, 0.64));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
  width: 90px;
  height: 90px;
  border: 0;
  font-size: 1.9rem;
}

.detail-panel {
  padding: 28px;
  margin-bottom: 26px;
}

.detail-panel h2,
.info-panel h2 {
  margin: 0 0 16px;
  font-size: 1.45rem;
}

.detail-panel p,
.info-panel p {
  color: #d1d5db;
  line-height: 1.9;
}

.detail-cover {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(250, 204, 21, 0.12);
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

.detail-side {
  position: sticky;
  top: 94px;
  align-self: start;
}

.detail-badge {
  position: static;
  padding: 7px 12px;
  color: var(--dark);
  background: linear-gradient(135deg, var(--gold), var(--amber));
}

.side-box {
  margin-top: 18px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(250, 204, 21, 0.1);
  background: var(--panel);
}

.side-box dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.side-box div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.13);
  padding-bottom: 10px;
}

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

.side-box dd {
  margin: 0;
  text-align: right;
}

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

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding: 38px 0;
}

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

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

.footer-links a {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--muted);
}

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

.footer-bottom {
  border-top: 1px solid rgba(250, 204, 21, 0.08);
  padding: 18px;
  text-align: center;
  color: var(--muted-2);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .detail-side {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
  }

  .hero-slider {
    height: 560px;
  }

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

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

  .movie-card-list .poster-frame {
    height: 240px;
  }
}

@media (max-width: 620px) {
  .container,
  .header-inner {
    width: min(100% - 24px, 1180px);
  }

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

  .hero-slider {
    height: 620px;
  }

  .hero-copy p {
    font-size: 1rem;
  }

  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 54px 0;
  }

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

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

  .poster-frame {
    height: 230px;
  }
}
