:root {
  --bg: #f9fafb;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --dark: #111827;
  --amber: #d97706;
  --amber-dark: #b45309;
  --amber-soft: #fef3c7;
  --purple: #7c3aed;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  --radius: 22px;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 42%, #fff7ed 100%);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid rgba(229, 231, 235, 0.88);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark,
.footer-logo span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), #f59e0b);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(217, 119, 6, 0.32);
}

.brand-name {
  font-size: 22px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 15px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-dark);
  background: var(--amber-soft);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #f3f4f6;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #374151;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #4b5563;
  font-weight: 700;
}

.mobile-nav a:hover {
  background: #fff7ed;
  color: var(--amber-dark);
}

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

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.88) 0%, rgba(3, 7, 18, 0.56) 46%, rgba(3, 7, 18, 0.16) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(var(--max), calc(100% - 32px));
  transform: translate(-50%, -50%);
  color: #fff;
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fde68a;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

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

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  color: #92400e;
  background: #fffbeb;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.section-more,
.quick-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn,
.quick-search button {
  color: #fff;
  background: var(--amber);
  box-shadow: 0 14px 28px rgba(217, 119, 6, 0.25);
}

.primary-btn:hover,
.quick-search button:hover {
  background: var(--amber-dark);
  transform: translateY(-2px);
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.ghost-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.24);
}

.ghost-btn.dark {
  color: var(--text);
  border-color: #e5e7eb;
  background: #fff;
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

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

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: #f59e0b;
}

.search-panel,
.page-main,
.detail-main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.search-panel {
  position: relative;
  z-index: 2;
  margin-top: -44px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search,
.filter-bar {
  display: flex;
  gap: 12px;
}

.quick-search input,
.filter-bar input {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: #fff;
  color: var(--text);
}

.quick-search input:focus,
.filter-bar input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.quick-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.quick-cats a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  font-weight: 700;
  font-size: 14px;
}

.page-main {
  padding: 56px 0 64px;
}

.top-space {
  padding-top: 36px;
}

.content-section {
  margin-bottom: 68px;
}

.content-section.tinted {
  padding: 36px;
  border-radius: 32px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
}

.gradient-band {
  padding: 36px;
  border-radius: 32px;
  background: linear-gradient(120deg, #f3e8ff, #fce7f3, #fef3c7);
}

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

.section-head h2,
.ranking-card h2,
.sidebar-panel h2 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  color: var(--amber-dark);
  background: #fffbeb;
}

.section-more:hover {
  color: #fff;
  background: var(--amber);
  transform: translateY(-2px);
}

.block-more {
  width: 100%;
  margin-top: 16px;
}

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

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

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

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

.movie-card,
.wide-card,
.compact-card,
.category-card,
.detail-card,
.sidebar-panel,
.ranking-card {
  background: var(--surface);
  border: 1px solid rgba(229, 231, 235, 0.78);
  box-shadow: var(--soft-shadow);
}

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.wide-card:hover,
.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-wrap,
.wide-poster,
.compact-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

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

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

.movie-card:hover img,
.wide-card:hover img,
.compact-card:hover img,
.category-card:hover img {
  transform: scale(1.08);
}

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

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

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.type-badge {
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  color: #fbbf24;
  background: rgba(17, 24, 39, 0.78);
  backdrop-filter: blur(10px);
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.28);
}

.play-hover {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--amber);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-hover,
.wide-card:hover .play-hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 14px;
}

.card-body h3,
.wide-info h3,
.compact-body h3 {
  margin: 0;
  color: #1f2937;
  font-size: 16px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.wide-info h3 a:hover,
.compact-body h3 a:hover {
  color: var(--amber-dark);
}

.movie-meta,
.compact-meta {
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.card-body p,
.wide-info p,
.compact-body p,
.category-card p {
  display: -webkit-box;
  margin: 0 0 12px;
  overflow: hidden;
  color: #4b5563;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.wide-list,
.compact-list {
  display: grid;
  gap: 16px;
}

.wide-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 18px;
  padding: 14px;
  border-radius: 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wide-poster {
  min-height: 220px;
  border-radius: 16px;
}

.wide-info {
  align-self: center;
}

.wide-info h3 {
  font-size: 22px;
}

.compact-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.compact-card:hover {
  background: #f9fafb;
}

.compact-poster {
  height: 118px;
  border-radius: 12px;
}

.compact-body h3 {
  font-size: 15px;
}

.compact-body p {
  font-size: 13px;
}

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

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

.category-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  isolation: isolate;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.18), rgba(17, 24, 39, 0.88));
}

.category-card span {
  display: inline-flex;
  padding: 6px 10px;
  margin-bottom: 44px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(0, 0, 0, 0.34);
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.category-card p {
  color: #e5e7eb;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.ranking-card,
.sidebar-panel {
  padding: 22px;
  border-radius: 24px;
}

.ranking-card {
  position: sticky;
  top: 92px;
}

.editor-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}

.archive-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(38px, 6vw, 72px);
  margin-bottom: 42px;
  border-radius: 34px;
  color: #fff;
  background: radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.32), transparent 30%), linear-gradient(135deg, #111827, #3b0764 58%, #92400e);
  box-shadow: var(--shadow);
}

.archive-hero h1 {
  max-width: 780px;
  margin: 8px 0 14px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.08;
}

.archive-hero p {
  max-width: 760px;
  margin: 0;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.8;
}

.eyebrow {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.archive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-filter {
  max-width: 760px;
  margin-top: 28px;
}

.empty-state {
  padding: 36px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 24px;
  background: #fff;
}

.detail-main {
  padding-bottom: 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: #6b7280;
  font-size: 14px;
}

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

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

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.78));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: var(--amber);
  font-size: 34px;
  box-shadow: 0 20px 42px rgba(217, 119, 6, 0.35);
}

.player-overlay strong {
  padding: 0 24px;
  text-align: center;
  font-size: 22px;
}

.detail-card {
  margin-top: 22px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 24px;
}

.detail-card h1 {
  margin: 0 0 14px;
  color: #111827;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.16;
}

.detail-card h2 {
  margin: 28px 0 12px;
  color: #1f2937;
  font-size: 24px;
}

.detail-card p {
  margin: 0;
  color: #4b5563;
  line-height: 1.9;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 12px;
  color: #92400e;
  background: #fffbeb;
  font-weight: 800;
  font-size: 14px;
}

.lead-text {
  padding: 18px;
  margin-bottom: 18px !important;
  border-radius: 18px;
  color: #1f2937 !important;
  background: #fff7ed;
  font-weight: 700;
}

.detail-tags {
  margin-bottom: 10px;
}

.detail-sidebar {
  position: sticky;
  top: 92px;
}

.detail-more {
  margin-top: 46px;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
}

.footer-brand p {
  max-width: 420px;
  color: #9ca3af;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 10px;
  align-content: start;
}

.footer-links h3 {
  margin: 0 0 8px;
  color: #fff;
}

.footer-links a {
  color: #9ca3af;
}

.footer-links a:hover {
  color: #f59e0b;
}

.footer-bottom {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
  font-size: 14px;
}

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

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

  .two-column-section,
  .detail-layout,
  .editor-layout {
    grid-template-columns: 1fr;
  }

  .ranking-card,
  .detail-sidebar {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 78vh;
    min-height: 560px;
  }

  .hero-content {
    top: 52%;
  }

  .hero-control {
    display: none;
  }

  .quick-search,
  .filter-bar {
    flex-direction: column;
  }

  .quick-search button {
    width: 100%;
  }

  .content-section.tinted,
  .gradient-band {
    padding: 22px;
  }

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

  .six-col,
  .four-col,
  .two-col,
  .category-grid,
  .category-grid.large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wide-card {
    grid-template-columns: 120px 1fr;
  }

  .wide-poster {
    min-height: 168px;
  }

  .wide-info h3 {
    font-size: 18px;
  }

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

@media (max-width: 520px) {
  .header-inner,
  .search-panel,
  .page-main,
  .detail-main,
  .mobile-nav,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 22px, var(--max));
  }

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

  .hero h1 {
    font-size: 38px;
  }

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

  .hero-tags span:nth-child(n + 4) {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .six-col,
  .four-col,
  .two-col,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body p,
  .tag-list {
    display: none;
  }

  .wide-card {
    grid-template-columns: 96px 1fr;
    gap: 12px;
  }

  .wide-poster {
    min-height: 138px;
  }

  .compact-card {
    grid-template-columns: 76px 1fr;
  }

  .compact-poster {
    height: 106px;
  }

  .archive-hero {
    padding: 28px;
    border-radius: 24px;
  }

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