:root {
  --page-bg: #fff7ed;
  --page-bg-2: #fffbeb;
  --panel: #ffffff;
  --panel-soft: rgba(255, 255, 255, 0.82);
  --text: #1f2937;
  --muted: #6b7280;
  --line: #fed7aa;
  --brand: #f97316;
  --brand-dark: #ea580c;
  --brand-soft: #ffedd5;
  --amber: #f59e0b;
  --shadow: 0 20px 45px rgba(124, 45, 18, 0.15);
  --shadow-soft: 0 14px 32px rgba(124, 45, 18, 0.10);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--page-bg) 0%, var(--page-bg-2) 48%, #fef3c7 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 247, 237, 0.96), rgba(255, 251, 235, 0.96));
  border-bottom: 1px solid rgba(251, 146, 60, 0.24);
  box-shadow: 0 10px 28px rgba(124, 45, 18, 0.08);
  backdrop-filter: blur(18px);
}

.site-nav {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, #fb923c, #f59e0b);
  box-shadow: 0 12px 24px rgba(234, 88, 12, 0.28);
}

.logo-text {
  font-size: 22px;
  background: linear-gradient(90deg, #ea580c, #d97706);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  padding: 10px 16px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: linear-gradient(90deg, #f97316, #f59e0b);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.24);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: #9a3412;
  background: #ffedd5;
}

.hero-slider {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #111827;
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(251, 146, 60, 0.25), transparent 32%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.58) 46%, rgba(0, 0, 0, 0.10));
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100% - 1280px) / 2 + 24px));
  width: min(650px, calc(100% - 48px));
  transform: translateY(-50%);
  color: #ffffff;
  z-index: 2;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #fbbf24;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.05em;
  text-shadow: 0 18px 36px rgba(0, 0, 0, 0.42);
}

.hero-content p {
  margin: 0 0 24px;
  font-size: clamp(17px, 2vw, 23px);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.88);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 800;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

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

.primary-button,
.ghost-button,
.rank-action,
.clear-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button,
.rank-action,
.clear-search {
  color: #ffffff;
  background: linear-gradient(90deg, #f97316, #f59e0b);
  box-shadow: 0 14px 26px rgba(249, 115, 22, 0.26);
}

.primary-button:hover,
.ghost-button:hover,
.rank-action:hover,
.clear-search:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 18px 32px rgba(249, 115, 22, 0.30);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(12px);
}

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

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

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

.section-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

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

.section-heading.centered {
  max-width: 840px;
  margin: 0 auto 28px;
  display: block;
  text-align: center;
}

.section-heading h2,
.page-hero h1,
.detail-card h1,
.detail-card h2 {
  margin: 0;
  color: #1f2937;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-heading p,
.page-hero p,
.footer-inner p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-heading a {
  color: #ea580c;
  font-weight: 900;
}

.library-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 auto 30px;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 18px;
  border: 1px solid rgba(251, 146, 60, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: var(--shadow-soft);
}

.search-box span {
  color: #ea580c;
  font-weight: 900;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #f97316, #fbbf24);
}

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

.wide-card .poster-link {
  height: 230px;
}

.poster-link img,
.tile-posters img,
.rank-thumb img,
.poster-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.58);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.rank-badge {
  left: 12px;
  right: auto;
  background: linear-gradient(90deg, #f97316, #f59e0b);
}

.movie-card-body {
  padding: 18px;
}

.movie-card-body h3 {
  margin: 0 0 8px;
  color: #1f2937;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 950;
}

.movie-card-body h3 a:hover,
.rank-info h3 a:hover,
.side-links a:hover {
  color: #ea580c;
}

.movie-card-body p,
.rank-info p,
.detail-card p {
  margin: 0;
  color: #667085;
  line-height: 1.75;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 12px 0;
  color: #8a4b18;
  font-size: 13px;
  font-weight: 800;
}

.category-band {
  background: linear-gradient(90deg, rgba(255, 237, 213, 0.82), rgba(254, 243, 199, 0.86));
}

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

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

.category-tile {
  display: grid;
  gap: 16px;
  min-height: 220px;
  padding: 20px;
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.category-tile:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow);
}

.tile-posters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  height: 110px;
}

.tile-posters img {
  min-width: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #fdba74, #fbbf24);
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 950;
}

.category-tile p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
}

.category-tile span {
  color: #ea580c;
  font-weight: 900;
}

.page-main {
  min-height: 60vh;
}

.page-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: 56px;
  border-radius: var(--radius-xl);
  color: #ffffff;
  background:
    radial-gradient(circle at 82% 16%, rgba(251, 191, 36, 0.45), transparent 28%),
    linear-gradient(135deg, #7c2d12, #ea580c 56%, #f59e0b);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  color: #ffffff;
  font-size: clamp(38px, 6vw, 64px);
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 76px 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
}

.rank-number {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #f59e0b);
  font-size: 20px;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.24);
}

.rank-thumb {
  width: 96px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #fdba74, #fbbf24);
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 950;
}

.detail-main {
  width: min(1280px, calc(100% - 32px));
  margin: 30px auto 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  color: #9a3412;
  font-weight: 800;
}

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

.player-card,
.detail-card,
.sidebar-card {
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
}

.video-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #f59e0b);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
  font-size: 34px;
}

.player-cover strong {
  max-width: min(680px, 86%);
  text-align: center;
  font-size: clamp(22px, 4vw, 36px);
  line-height: 1.25;
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.6);
}

.player-message {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 5;
  display: none;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.66);
  transform: translateX(-50%);
}

.player-message.visible {
  display: block;
}

.detail-card,
.sidebar-card {
  padding: 24px;
  margin-bottom: 24px;
}

.main-detail-card h1 {
  margin-bottom: 14px;
  font-size: clamp(30px, 4vw, 46px);
}

.detail-card h2,
.sidebar-card h2 {
  margin: 18px 0 12px;
  font-size: 24px;
  font-weight: 950;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-weight: 900;
}

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

.lead-text {
  margin-bottom: 18px !important;
  color: #374151 !important;
  font-size: 18px;
  font-weight: 700;
}

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

.poster-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  background: linear-gradient(135deg, #fdba74, #fbbf24);
  object-fit: cover;
}

.primary-button.full {
  width: 100%;
  margin-top: 16px;
}

.info-list {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

.info-list dt {
  color: #9a3412;
  font-weight: 950;
}

.info-list dd {
  margin: 0;
  color: #4b5563;
  line-height: 1.6;
}

.side-links {
  display: grid;
  gap: 10px;
}

.side-links a {
  padding: 12px 14px;
  border-radius: 14px;
  color: #374151;
  background: #fff7ed;
  font-weight: 800;
}

.site-footer {
  margin-top: 72px;
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr auto;
  gap: 28px;
  align-items: start;
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

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

.copyright {
  text-align: right;
}

.movie-card.is-hidden,
.rank-item.is-hidden {
  display: none;
}

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

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

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

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

  .detail-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-nav {
    height: auto;
    min-height: 66px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0 4px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    width: 100%;
  }

  .hero-slider {
    height: 560px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.74));
  }

  .hero-content {
    left: 20px;
    bottom: 68px;
    top: auto;
    width: calc(100% - 40px);
    transform: none;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .section-wrap {
    width: min(100% - 24px, 1280px);
    padding: 48px 0;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .library-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .home-grid,
  .poster-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .wide-card .poster-link {
    height: auto;
    aspect-ratio: 3 / 4;
  }

  .movie-card-body {
    padding: 14px;
  }

  .movie-card-body h3 {
    font-size: 16px;
  }

  .movie-card-body p {
    display: none;
  }

  .page-hero {
    width: min(100% - 24px, 1280px);
    padding: 32px 22px;
  }

  .rank-item {
    grid-template-columns: 48px 72px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-number {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 16px;
  }

  .rank-thumb {
    width: 72px;
  }

  .rank-action {
    display: none;
  }

  .rank-info p {
    display: none;
  }

  .detail-main {
    width: min(100% - 24px, 1280px);
  }

  .detail-card,
  .sidebar-card {
    padding: 18px;
  }

  .play-circle {
    width: 64px;
    height: 64px;
    font-size: 28px;
  }

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

  .copyright {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .poster-grid,
  .home-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 34px;
  }

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