:root {
  --amber: #d97706;
  --amber-dark: #b45309;
  --orange: #ea580c;
  --slate: #111827;
  --muted: #6b7280;
  --paper: #ffffff;
  --soft: #fffbeb;
  --line: #e5e7eb;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #111827;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 42%, #fff7ed 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 26px rgba(17, 24, 39, 0.08);
}

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

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.32);
  font-size: 18px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #374151;
  font-weight: 600;
}

.desktop-nav a,
.mobile-menu a {
  border-radius: 12px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a {
  padding: 10px 14px;
}

.desktop-nav a:hover,
.mobile-menu a:hover,
.desktop-nav a.active {
  color: var(--amber);
  background: #fffbeb;
}

.mobile-toggle {
  display: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: #374151;
  font-size: 26px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0 18px;
}

.mobile-menu.is-open {
  display: grid;
  gap: 8px;
}

.mobile-menu a {
  padding: 12px 14px;
  color: #374151;
  font-weight: 650;
}

.main-content {
  flex: 1;
}

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

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.14));
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0;
  color: #fff;
}

.hero-card {
  max-width: 720px;
}

.hero-eyebrow,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
}

.hero-eyebrow {
  padding: 8px 14px;
  background: rgba(245, 158, 11, 0.94);
  color: #fff;
  margin-bottom: 16px;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.07em;
  font-weight: 900;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hero-desc {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

.hero-actions,
.section-title-row,
.meta-row,
.card-meta,
.tag-row,
.breadcrumbs,
.pager,
.player-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 0;
  background: var(--amber);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  background: var(--amber-dark);
  box-shadow: 0 18px 34px rgba(217, 119, 6, 0.34);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
  backdrop-filter: blur(10px);
}

.button.light {
  background: #fff;
  color: #111827;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(245, 158, 11, 0.88);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.section {
  padding: 64px 0;
}

.section.soft {
  background: #f9fafb;
}

.section-title-row {
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--amber);
  font-weight: 800;
}

.section-title {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.section-desc {
  max-width: 780px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.85;
}

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

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

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

.movie-card,
.category-card,
.info-panel,
.rank-card,
.search-panel,
.detail-card {
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
}

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

.movie-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--shadow);
}

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

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

.movie-card:hover .poster-wrap img,
.category-card:hover .category-image,
.scroll-card:hover img,
.related-card:hover img {
  transform: scale(1.08);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent 62%);
  opacity: 0;
  transition: opacity 0.2s ease;
}

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

.badge-top,
.rating-badge {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.badge-top {
  right: 12px;
  background: rgba(17, 24, 39, 0.74);
}

.rating-badge {
  left: 12px;
  background: rgba(245, 158, 11, 0.92);
}

.card-body {
  padding: 18px;
}

.card-title {
  margin: 0 0 10px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title,
.related-card:hover h3,
.scroll-card:hover h3 {
  color: var(--amber);
}

.card-desc {
  margin: 0 0 14px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.65;
}

.line-2,
.line-3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.line-2 {
  -webkit-line-clamp: 2;
}

.line-3 {
  -webkit-line-clamp: 3;
}

.pill {
  padding: 7px 11px;
  background: #f3f4f6;
  color: #374151;
}

.pill.amber {
  background: #f59e0b;
  color: #fff;
}

.pill.soft-amber {
  background: #fffbeb;
  color: #92400e;
}

.card-meta {
  color: #6b7280;
  font-size: 13px;
  justify-content: space-between;
}

.category-card {
  min-height: 178px;
  padding: 22px;
  overflow: hidden;
  position: relative;
  color: #fff;
  background: linear-gradient(135deg, #d97706, #ea580c);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #111827, #374151);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #b45309, #7c2d12);
}

.category-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 72px 120px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-number {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-size: 24px;
  font-weight: 900;
}

.rank-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
}

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

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 850;
}

.rank-info p {
  margin: 0;
  color: #6b7280;
  line-height: 1.6;
}

.horizontal-scroll {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
}

.scroll-card {
  flex: 0 0 320px;
  scroll-snap-align: start;
}

.scroll-card .poster-wrap {
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.13);
}

.scroll-card h3 {
  margin: 14px 0 4px;
  font-size: 18px;
  font-weight: 850;
}

.scroll-card p {
  margin: 0;
  color: #6b7280;
}

.page-hero {
  color: #fff;
  background: linear-gradient(135deg, #d97706, #ea580c);
  padding: 70px 0;
}

.page-hero.dark {
  background: linear-gradient(135deg, #111827, #374151);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.06em;
}

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

.filter-bar,
.search-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
  padding: 14px;
}

.filter-input,
.search-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 0 16px;
  color: #111827;
  background: #fff;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 32px;
}

.player-section {
  padding: 32px 0;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.28));
  cursor: pointer;
}

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

.play-circle {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  box-shadow: 0 18px 40px rgba(245, 158, 11, 0.28);
  font-size: 40px;
  transform: translateZ(0);
}

.detail-card,
.info-panel {
  padding: 28px;
}

.breadcrumbs {
  margin-bottom: 22px;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumbs a {
  color: #92400e;
  font-weight: 700;
}

.detail-title {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.meta-row {
  color: #6b7280;
  margin-bottom: 22px;
}

.detail-section h2,
.sidebar-section h2 {
  margin: 0 0 16px;
  color: #111827;
  font-size: 26px;
  font-weight: 900;
}

.detail-section p {
  margin: 0 0 18px;
  color: #374151;
  line-height: 1.9;
  font-size: 16px;
}

.sidebar-section {
  display: grid;
  gap: 16px;
}

.related-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.07);
}

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

.related-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
}

.related-card p {
  margin: 0;
  color: #6b7280;
  font-size: 13px;
}

.site-footer {
  color: #fff;
  background: linear-gradient(90deg, #111827, #1f2937);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 24px;
  font-weight: 900;
  color: #f59e0b;
}

.footer-inner p,
.footer-inner a {
  color: #d1d5db;
  line-height: 1.8;
}

.footer-inner h3 {
  margin: 0 0 14px;
  color: #f59e0b;
  font-size: 18px;
}

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

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

.copyright {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #9ca3af;
  text-align: center;
  font-size: 14px;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 48px;
  height: 48px;
  display: none;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--amber);
  box-shadow: 0 14px 32px rgba(217, 119, 6, 0.32);
  cursor: pointer;
  font-size: 22px;
}

.back-to-top.is-visible {
  display: block;
}

.empty-state {
  padding: 48px 20px;
  color: #6b7280;
  text-align: center;
}

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

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

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

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

  .mobile-toggle {
    display: inline-flex;
  }

  .hero-slider {
    min-height: 78vh;
  }

  .hero-content {
    padding: 40px 0 64px;
  }

  .hero-control {
    display: none;
  }

  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 46px 0;
  }

  .rank-card {
    grid-template-columns: 52px 92px 1fr;
  }

  .rank-card .button {
    grid-column: 1 / -1;
    width: 100%;
  }

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

  .detail-card,
  .info-panel {
    padding: 22px;
  }

  .related-card {
    grid-template-columns: 96px 1fr;
  }
}

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

  .logo {
    font-size: 22px;
  }

  .scroll-card {
    flex-basis: 82vw;
  }

  .filter-bar,
  .search-panel {
    padding: 10px;
  }
}
