:root {
  --bg: #0a0a0a;
  --panel: #171717;
  --panel-soft: #1f1f1f;
  --line: #2a2a2a;
  --line-soft: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: #a3a3a3;
  --muted-deep: #737373;
  --amber: #f59e0b;
  --amber-soft: #fbbf24;
  --amber-deep: #d97706;
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(23, 23, 23, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.nav-wrap {
  max-width: 1240px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--amber), var(--amber-deep));
  color: #111;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.24);
}

.logo-main {
  display: block;
  color: #fff;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.logo-sub {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a,
.mobile-panel a {
  border-radius: 10px;
  color: #d4d4d4;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-links a:hover,
.mobile-panel a:hover,
.nav-links a.active {
  color: #111;
  background: var(--amber);
}

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: #fff;
  background: #111;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 10px 18px 16px;
  background: #171717;
}

.mobile-panel a {
  display: block;
  margin: 4px 0;
}

.page-main {
  padding-top: 64px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #050505;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 70vh;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 10, 10, 0.96) 0%, rgba(10, 10, 10, 0.76) 44%, rgba(10, 10, 10, 0.2) 100%), linear-gradient(0deg, #0a0a0a 0%, rgba(10, 10, 10, 0) 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 78px 20px 86px;
  display: flex;
  align-items: center;
}

.hero-text {
  width: min(720px, 100%);
}

.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--amber-soft);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  width: min(620px, 100%);
  margin: 18px 0 0;
  color: #d4d4d4;
  font-size: 18px;
}

.meta-row,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.meta-row {
  margin-top: 20px;
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(23, 23, 23, 0.86);
  border: 1px solid rgba(245, 158, 11, 0.24);
  color: var(--amber-soft);
  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;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--amber);
  color: #111;
}

.btn-primary:hover {
  background: var(--amber-soft);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.hero-controls {
  position: absolute;
  right: max(20px, calc((100vw - 1240px) / 2 + 20px));
  bottom: 56px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-control {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.56);
  color: #fff;
  cursor: pointer;
  transition: background 0.25s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.78);
}

.hero-dots {
  position: absolute;
  left: max(20px, calc((100vw - 1240px) / 2 + 20px));
  bottom: 64px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

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

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

.section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 20px 0;
}

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

.section h2,
.article-block h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.2;
  font-weight: 900;
}

.section p,
.page-hero p,
.article-block p {
  color: var(--muted);
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--amber);
  font-weight: 800;
}

.search-band {
  margin-top: -36px;
  position: relative;
  z-index: 8;
}

.search-card {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(23, 23, 23, 0.94);
  box-shadow: var(--shadow);
}

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

.search-form input,
.filter-row input,
.filter-row select {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0f0f0f;
  color: #fff;
  padding: 0 14px;
  outline: none;
}

.search-form input:focus,
.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--amber);
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  transition: transform 0.28s ease, border 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--amber);
  box-shadow: 0 22px 32px rgba(245, 158, 11, 0.08);
}

.poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111;
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 62%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster::after {
  opacity: 1;
}

.corner-tag,
.type-tag {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  border-radius: 8px;
  background: rgba(23, 23, 23, 0.88);
  color: var(--amber-soft);
  border: 1px solid rgba(245, 158, 11, 0.22);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.type-tag {
  left: auto;
  right: 10px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 17px;
  line-height: 1.3;
  font-weight: 850;
  transition: color 0.25s ease;
}

.movie-card:hover h3 {
  color: var(--amber);
}

.card-body p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted-deep);
  font-size: 12px;
}

.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;
}

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

.category-card {
  min-height: 150px;
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 22px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(23, 23, 23, 0.96) 45%, #111);
  transition: transform 0.25s ease, border 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--amber);
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 120px 1fr auto;
  gap: 16px;
  align-items: center;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 12px;
  transition: border 0.25s ease, transform 0.25s ease;
}

.rank-item:hover {
  border-color: var(--amber);
  transform: translateX(4px);
}

.rank-num {
  color: var(--amber);
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.rank-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #111;
}

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

.rank-copy h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.rank-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.page-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 64px 20px 20px;
}

.page-hero-inner {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.28), transparent 28%), linear-gradient(135deg, #171717, #0b0b0b);
  padding: clamp(26px, 6vw, 58px);
  box-shadow: var(--shadow);
}

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

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

.filter-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.detail-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 20px 0;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
  gap: 28px;
}

.player-card,
.detail-card,
.side-card,
.article-block {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18));
  border: 0;
  color: #111;
  cursor: pointer;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-icon {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--amber);
  box-shadow: 0 18px 38px rgba(245, 158, 11, 0.28);
  font-size: 34px;
  font-weight: 900;
}

.detail-title {
  padding: 24px;
}

.detail-title h1 {
  font-size: clamp(30px, 5vw, 54px);
}

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

.detail-card,
.side-card,
.article-block {
  padding: 22px;
  margin-top: 22px;
}

.article-block h2,
.side-card h2 {
  font-size: 24px;
  margin-bottom: 12px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 3 / 4;
  background: #111;
}

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

.info-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 14px;
}

.info-list strong {
  color: #fff;
}

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

.search-results {
  min-height: 240px;
}

.empty-state {
  border-radius: 18px;
  border: 1px dashed var(--line);
  padding: 38px;
  text-align: center;
  color: var(--muted);
  background: rgba(23, 23, 23, 0.55);
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: #171717;
}

.footer-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 20px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 30px;
  color: var(--muted);
}

.footer-wrap h3 {
  margin: 0 0 12px;
  color: #fff;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }

  .menu-btn {
    display: block;
  }

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

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

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

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

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

@media (max-width: 640px) {
  .hero,
  .hero-slide img,
  .hero-content {
    min-height: 76vh;
  }

  .hero-content {
    align-items: end;
    padding-bottom: 100px;
  }

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

  .hero-controls {
    right: 20px;
    bottom: 26px;
  }

  .hero-dots {
    left: 20px;
    bottom: 42px;
  }

  .search-form,
  .filter-row {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .category-grid,
  .card-grid.featured,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 40px 92px 1fr;
  }

  .rank-item .btn {
    grid-column: 2 / 4;
  }

  .section-head {
    display: block;
  }
}
