* {
  box-sizing: border-box;
}

:root {
  --bg: #050608;
  --bg-soft: #10131a;
  --panel: #151922;
  --panel-light: #1f2633;
  --text: #f8fafc;
  --muted: #9ca3af;
  --soft: #d1d5db;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #fbbf24;
  --accent-strong: #f59e0b;
  --danger: #ef4444;
  --blue: #60a5fa;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  color-scheme: dark;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.12), transparent 30%), linear-gradient(180deg, #111827 0%, #020617 52%, #111827 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.88);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #0b0b0c;
  box-shadow: 0 0 32px rgba(251, 191, 36, 0.45);
  transition: transform 0.45s ease;
}

.brand:hover .brand-mark {
  transform: rotate(180deg) scale(1.05);
}

.brand-text {
  font-size: clamp(20px, 2.2vw, 26px);
  background: linear-gradient(90deg, var(--accent), #fde68a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #e5e7eb;
}

.desktop-nav a {
  position: relative;
  transition: color 0.25s ease;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: var(--accent);
  transition: transform 0.25s ease;
}

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

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
  transform: scaleX(1);
}

.top-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 300px;
}

.top-search input,
.catalog-search input,
.catalog-sort select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: #111827;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  padding: 10px 88px 10px 16px;
}

.top-search input:focus,
.catalog-search input:focus,
.catalog-sort select:focus {
  border-color: rgba(251, 191, 36, 0.72);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12);
}

.top-search button {
  position: absolute;
  right: 4px;
  border: 0;
  border-radius: 999px;
  padding: 7px 16px;
  color: #111827;
  background: var(--accent);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.top-search button:hover,
.primary-btn:hover {
  transform: translateY(-1px) scale(1.02);
  background: var(--accent-strong);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
}

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

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: var(--soft);
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #000;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

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

.hero-slide.active img {
  transform: scale(1.1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.93), rgba(0, 0, 0, 0.72) 42%, rgba(0, 0, 0, 0.2) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.98), transparent 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: min(1180px, calc(100% - 32px));
}

.hero-content > * {
  max-width: 680px;
}

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

.eyebrow {
  margin-bottom: 18px;
  font-size: 18px;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(44px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0 0 28px;
  color: #d1d5db;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.7;
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.hero-meta {
  margin-bottom: 34px;
}

.hero-meta span,
.detail-meta span,
.detail-meta a,
.movie-meta span,
.score-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  padding: 6px 12px;
}

.hero-meta span:first-child,
.score-pill {
  color: #111827;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 800;
}

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

.primary-btn,
.ghost-btn,
.panel-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 12px;
  padding: 0 24px;
  font-weight: 800;
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.primary-btn {
  color: #111827;
  background: var(--accent);
  box-shadow: 0 16px 50px rgba(251, 191, 36, 0.28);
}

.ghost-btn,
.panel-link {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  background: rgba(15, 23, 42, 0.5);
}

.ghost-btn:hover,
.panel-link:hover {
  border-color: rgba(251, 191, 36, 0.65);
  color: var(--accent);
  transform: translateY(-1px);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 36px;
  border-radius: 999px;
  background: var(--accent);
}

.section-block {
  padding: 72px 0;
}

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

.section-title h2,
.content-card h2,
.related-box h2 {
  margin: 6px 0 0;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
}

.section-title a {
  color: var(--accent);
  font-weight: 700;
}

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

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

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

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

.movie-card {
  background: rgba(31, 41, 55, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.34);
  box-shadow: 0 22px 60px rgba(251, 191, 36, 0.12);
}

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

.movie-card.large .poster-link {
  aspect-ratio: 16 / 11;
}

.movie-card.minimal .poster-link {
  aspect-ratio: 4 / 3;
}

.poster-link img,
.category-tile img,
.category-cover img,
.rank-poster img,
.row-poster img,
.aside-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img,
.category-tile:hover img,
.category-panel:hover img,
.rank-item:hover img,
.movie-row:hover img {
  transform: scale(1.08);
}

.poster-link::after,
.category-tile::after,
.category-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.82));
  opacity: 0.85;
}

.type-badge,
.score-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.type-badge {
  top: 12px;
  left: 12px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.72);
}

.score-badge {
  right: 12px;
  bottom: 12px;
  color: #111827;
  background: var(--accent);
}

.movie-body {
  padding: 16px;
}

.movie-body h3,
.movie-row h3,
.rank-item h3 {
  margin: 0 0 9px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-body h3 a,
.movie-row h3 a,
.rank-item h3 a {
  transition: color 0.2s ease;
}

.movie-body h3 a:hover,
.movie-row h3 a:hover,
.rank-item h3 a:hover {
  color: var(--accent);
}

.movie-body p,
.movie-row p,
.rank-item p,
.category-panel p,
.content-card p,
.detail-head p,
.site-footer p {
  color: var(--muted);
  line-height: 1.7;
}

.movie-body p,
.movie-row p,
.rank-item p {
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  gap: 8px;
  font-size: 13px;
}

.movie-meta span {
  padding: 4px 9px;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
}

.tag-row span,
.detail-tags a {
  border-radius: 999px;
  padding: 5px 10px;
  color: #fef3c7;
  background: rgba(251, 191, 36, 0.12);
  font-size: 12px;
}

.latest-block,
.score-block {
  position: relative;
}

.latest-block::before,
.editor-block::before {
  content: "";
  position: absolute;
  inset: 24px -24px;
  z-index: -1;
  border-radius: 32px;
  background: linear-gradient(90deg, rgba(31, 41, 55, 0.72), rgba(0, 0, 0, 0));
}

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

.category-tile {
  position: relative;
  min-height: 200px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.category-tile img {
  position: absolute;
  inset: 0;
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile small {
  margin-top: 8px;
  color: #d1d5db;
  line-height: 1.5;
}

.cta-panel {
  margin-bottom: 72px;
  padding: 46px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  border-radius: 32px;
  background: linear-gradient(120deg, rgba(146, 64, 14, 0.92), rgba(113, 63, 18, 0.92));
  box-shadow: var(--shadow);
}

.cta-panel span {
  color: var(--accent);
  font-size: 54px;
}

.cta-panel h2 {
  margin: 10px 0;
  font-size: clamp(30px, 4vw, 44px);
}

.cta-panel p {
  margin: 0;
  color: #fde68a;
  font-size: 18px;
}

.page-hero {
  padding: 92px 0;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 18% 28%, rgba(251, 191, 36, 0.15), transparent 28%), linear-gradient(90deg, #020617, #1f2937);
}

.slim-hero {
  padding: 82px 0;
}

.page-hero h1 {
  margin: 12px 0 12px;
  font-size: clamp(42px, 6vw, 64px);
  line-height: 1.05;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--soft);
  font-size: 20px;
  line-height: 1.7;
}

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

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

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

.category-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(31, 41, 55, 0.72);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-panel:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.35);
}

.category-cover {
  position: relative;
  display: block;
  height: 210px;
  overflow: hidden;
  border-radius: 18px;
}

.category-cover strong {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 2;
  font-size: 28px;
}

.mini-links {
  min-height: 62px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.mini-links span {
  border-radius: 999px;
  padding: 6px 10px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.catalog-toolbar {
  margin-bottom: 28px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
}

.catalog-search span,
.catalog-sort span {
  display: block;
  margin: 0 0 8px;
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
}

.catalog-search input,
.catalog-sort select {
  height: 48px;
  padding: 0 16px;
}

.empty-state {
  display: none;
  margin: 28px 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(31, 41, 55, 0.75);
  color: var(--muted);
  text-align: center;
}

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

.rank-item,
.movie-row {
  display: grid;
  grid-template-columns: auto 92px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(31, 41, 55, 0.74);
}

.movie-row {
  grid-template-columns: 118px 1fr;
}

.rank-no {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #111827;
  background: var(--accent);
  font-weight: 900;
}

.rank-poster,
.row-poster {
  height: 124px;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

.row-poster {
  height: 132px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding-top: 34px;
  padding-bottom: 76px;
}

.detail-main,
.detail-aside {
  min-width: 0;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-box video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.player-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: #111827;
  background: rgba(251, 191, 36, 0.92);
  box-shadow: 0 0 0 18px rgba(251, 191, 36, 0.12), 0 20px 70px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease;
}

.player-play span {
  margin-left: 6px;
  font-size: 38px;
}

.player-play:hover {
  transform: translate(-50%, -50%) scale(1.08);
  background: #fcd34d;
}

.player-box.is-playing .player-play {
  opacity: 0;
  pointer-events: none;
}

.player-loading {
  position: absolute;
  left: 24px;
  bottom: 22px;
  width: 28px;
  height: 28px;
  display: none;
  border: 3px solid rgba(255, 255, 255, 0.28);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.player-box.is-loading .player-loading {
  display: block;
}

.player-status {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  margin: 0;
  color: #fecaca;
  text-align: center;
  pointer-events: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.detail-card,
.content-card,
.related-box,
.aside-cover {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(31, 41, 55, 0.78);
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.detail-head h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.15;
}

.detail-head p {
  margin: 0;
  font-size: 18px;
}

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

.detail-tags a {
  font-size: 13px;
}

.content-card h2,
.related-box h2 {
  font-size: 26px;
}

.content-card p {
  margin: 14px 0 0;
  white-space: pre-line;
  font-size: 17px;
}

.detail-aside {
  position: relative;
}

.detail-aside > * {
  position: sticky;
  top: 92px;
}

.aside-cover img {
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  object-fit: cover;
}

.aside-cover .primary-btn {
  width: 100%;
  margin-top: 18px;
}

.related-box {
  position: static;
}

.related-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.related-list .movie-row {
  grid-template-columns: 86px 1fr;
  padding: 10px;
}

.related-list .row-poster {
  height: 104px;
}

.related-list .movie-row h3 {
  font-size: 16px;
}

.related-list .movie-row p {
  font-size: 13px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #0b0f18;
  color: var(--muted);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 34px;
}

.footer-brand {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

.footer-brand span {
  color: var(--accent);
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 17px;
}

.site-footer a {
  display: block;
  margin: 9px 0;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px;
  text-align: center;
  font-size: 14px;
}

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

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

  .detail-aside > * {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

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

  .hero {
    min-height: 600px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.96), rgba(0, 0, 0, 0.56));
  }

  .section-title,
  .cta-panel,
  .detail-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid-large,
  .grid-compact,
  .grid-standard,
  .category-grid,
  .category-panels,
  .row-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .nav-wrap {
    height: 62px;
  }

  .brand-text {
    font-size: 19px;
  }

  .hero {
    min-height: 560px;
  }

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

  .hero-actions,
  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .grid-large,
  .grid-compact,
  .grid-standard,
  .category-grid,
  .category-panels,
  .row-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-poster {
    height: 96px;
  }

  .movie-row {
    grid-template-columns: 96px 1fr;
  }

  .row-poster {
    height: 118px;
  }

  .detail-card,
  .content-card,
  .related-box,
  .aside-cover {
    padding: 18px;
  }

  .player-play {
    width: 68px;
    height: 68px;
  }

  .player-play span {
    font-size: 30px;
  }

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