:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.64);
  --bg-card-hover: rgba(51, 65, 85, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --accent: #f59e0b;
  --accent-deep: #d97706;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.12), transparent 28rem),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  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);
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.28);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #f97316);
  color: #111827;
  box-shadow: 0 12px 34px rgba(245, 158, 11, 0.24);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-weight: 600;
}

.nav-links a {
  transition: color 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-mini {
  position: relative;
  width: min(270px, 28vw);
}

.search-mini input,
.panel-search input,
.panel-search select {
  width: 100%;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  outline: 0;
  background: rgba(15, 23, 42, 0.86);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-mini input {
  padding: 11px 42px 11px 14px;
}

.search-mini button {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  color: #111827;
  background: var(--accent);
}

.search-mini input:focus,
.panel-search input:focus,
.panel-search select:focus {
  border-color: rgba(245, 158, 11, 0.72);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  background: rgba(15, 23, 42, 0.8);
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.mobile-panel a {
  display: block;
  padding: 12px 0;
  color: var(--muted);
  font-weight: 700;
}

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

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #0f172a;
}

.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-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.12) 0%, rgba(15, 23, 42, 0.68) 48%, #020617 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.84) 0%, rgba(2, 6, 23, 0.42) 48%, rgba(2, 6, 23, 0.14) 100%);
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 0 76px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--accent);
  font-weight: 800;
}

.hero-title {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.14);
  font-size: 13px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(30, 41, 59, 0.88);
}

.btn-primary {
  border-color: transparent;
  color: #111827;
  background: linear-gradient(135deg, var(--accent), #f97316);
  box-shadow: 0 14px 38px rgba(245, 158, 11, 0.22);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fbbf24, var(--accent-deep));
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.46);
  transition: background 0.25s ease, transform 0.25s ease;
}

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

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.54);
  transition: width 0.25s ease, background 0.25s ease;
}

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

.main-space {
  padding: 54px 0 72px;
}

.section {
  margin-bottom: 62px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.section-desc {
  margin: 8px 0 0;
  max-width: 720px;
  color: var(--subtle);
  line-height: 1.7;
}

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

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

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

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

.movie-card,
.cat-card,
.rank-card,
.info-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  transition: transform 0.28s ease, background 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover,
.cat-card:hover,
.rank-card:hover,
.info-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.35);
  background: var(--bg-card-hover);
}

.poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.18), transparent 42%),
    #0f172a;
}

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

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

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  font-size: 28px;
  background: rgba(0, 0, 0, 0.38);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.badge-top,
.badge-bottom,
.badge-year {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.68);
}

.badge-top {
  top: 10px;
  right: 10px;
  padding: 5px 8px;
}

.badge-bottom {
  left: 10px;
  bottom: 10px;
  padding: 5px 8px;
  color: #fbbf24;
}

.badge-year {
  top: 10px;
  left: 10px;
  padding: 5px 8px;
}

.card-body {
  padding: 14px;
}

.card-title {
  margin: 0 0 10px;
  min-height: 44px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.38;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s ease;
}

.movie-card:hover .card-title,
.rank-card:hover .card-title {
  color: var(--accent);
}

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

.card-tag {
  padding: 3px 7px;
  border-radius: 8px;
  color: #fbbf24;
  background: rgba(51, 65, 85, 0.72);
  font-size: 12px;
}

.card-meta {
  color: var(--subtle);
  font-size: 12px;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border: 1px solid rgba(245, 158, 11, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.category-chip:hover {
  color: #111827;
  transform: translateY(-2px);
  background: var(--accent);
}

.cat-card {
  position: relative;
  min-height: 190px;
  padding: 22px;
}

.cat-card h2,
.cat-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

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

.cat-card strong {
  color: var(--accent);
}

.cat-bg {
  position: absolute;
  right: -32px;
  bottom: -42px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.25), transparent 62%);
  transition: transform 0.3s ease;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.48);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(51, 65, 85, 0.62);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #111827;
  font-weight: 900;
  background: var(--accent);
}

.rank-thumb {
  position: relative;
  width: 72px;
  height: 54px;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

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

.rank-name {
  margin: 0 0 5px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: var(--subtle);
  font-size: 12px;
}

.rank-score {
  color: var(--accent);
  font-weight: 900;
}

.panel-search {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin: 24px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
}

.panel-search input,
.panel-search select {
  padding: 12px 14px;
}

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

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 20px;
  color: var(--subtle);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 30px;
  align-items: end;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.08), transparent 46%),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

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

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-info p {
  max-width: 820px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.player-panel {
  margin: 34px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--text);
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.72));
}

.player-cover.is-hidden {
  display: none;
}

.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 26px;
  border-radius: 999px;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), #f97316);
  box-shadow: 0 18px 46px rgba(245, 158, 11, 0.32);
}

.text-panel {
  display: grid;
  gap: 18px;
  margin: 28px 0;
}

.text-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.56);
}

.text-card h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

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

.empty-state {
  display: none;
  padding: 42px;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: var(--radius);
  color: var(--subtle);
  text-align: center;
}

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

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(2, 6, 23, 0.62);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
  color: var(--subtle);
}

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 12px;
  color: var(--text);
}

.footer-inner p,
.footer-inner a {
  margin: 0;
  color: var(--subtle);
  line-height: 1.8;
}

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

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

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

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

@media (max-width: 820px) {
  .nav-links,
  .search-mini {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .hero {
    height: 540px;
  }

  .hero-content {
    padding-bottom: 70px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .detail-hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }

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

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

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

  .logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 32px;
    height: 32px;
  }

  .hero {
    height: 500px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .grid-cards,
  .grid-related,
  .grid-cats {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 36px 58px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
  }
}
