:root {
  --amber: #d97706;
  --amber-dark: #92400e;
  --amber-soft: #fef3c7;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.32);
}

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

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

.desktop-nav a,
.footer-links a {
  transition: color 0.2s ease;
}

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

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

.header-search input,
.mobile-search input,
.toolbar input,
.toolbar select,
.search-box-large input {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  padding: 10px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.toolbar input:focus,
.toolbar select:focus,
.search-box-large input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.header-search button,
.mobile-search button,
.search-box-large button,
.primary-button {
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.24);
}

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

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--amber-dark);
}

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

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

.mobile-brand {
  margin-bottom: 14px;
  color: var(--amber-dark);
  font-size: 20px;
  font-weight: 800;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.mobile-search input {
  flex: 1;
}

.mobile-panel nav {
  display: grid;
  gap: 12px;
  color: #374151;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

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

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 420px;
  align-items: center;
  gap: 48px;
  padding: 72px max(24px, calc((100vw - 1280px) / 2 + 24px));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
  background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.74), rgba(17, 24, 39, 0.36)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 30%, rgba(245, 158, 11, 0.22), transparent 34%), linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.3));
}

.hero-content,
.hero-cover {
  position: relative;
  z-index: 2;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h1 {
  max-width: 780px;
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 20px;
}

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

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  padding: 10px 20px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero-cover {
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 35px 75px rgba(0, 0, 0, 0.46);
  transform: rotate(1.5deg);
}

.hero-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 18px;
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 30px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.hero-dots {
  display: flex;
  gap: 9px;
}

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

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

.section-block {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
}

.section-overlap {
  margin-top: -48px;
  position: relative;
  z-index: 4;
}

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

.section-heading h2,
.panel-heading h2,
.detail-content h1,
.page-hero h1 {
  margin: 0;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

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

.section-heading a {
  color: var(--amber-dark);
  font-weight: 800;
}

.compact-heading {
  align-items: center;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.75);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.64));
}

.type-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  border-radius: 999px;
  padding: 5px 11px;
  color: #ffffff;
  background: rgba(180, 83, 9, 0.92);
  font-size: 12px;
  font-weight: 800;
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
  color: var(--muted);
  font-size: 13px;
}

.movie-meta-line span:not(:last-child)::after {
  content: "";
}

.movie-card h2 {
  margin: 8px 0 8px;
  font-size: 19px;
  line-height: 1.32;
}

.movie-card h2 a:hover,
.ranking-card h2 a:hover {
  color: var(--amber-dark);
}

.movie-card p {
  display: -webkit-box;
  min-height: 52px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #4b5563;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--amber-dark);
  background: var(--amber-soft);
  font-size: 12px;
  font-weight: 800;
}

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

.category-grid-home,
.category-large-grid {
  display: grid;
  gap: 18px;
}

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

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

.category-tile,
.category-card-large {
  display: block;
  min-height: 160px;
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: var(--radius);
  padding: 22px;
  background: linear-gradient(145deg, #ffffff, #fff7ed);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-tile span,
.category-card-large strong {
  display: block;
  color: var(--amber-dark);
  font-size: 22px;
  font-weight: 900;
}

.category-tile p,
.category-card-large p {
  margin: 10px 0;
  color: #4b5563;
}

.category-tile em,
.category-card-large div {
  color: #6b7280;
  font-size: 13px;
  font-style: normal;
}

.category-card-large div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-card-large div span {
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(245, 158, 11, 0.12);
}

.ranking-panel,
.side-card,
.detail-content,
.player-card {
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
}

.ranking-panel {
  align-self: start;
  padding: 24px;
  position: sticky;
  top: 94px;
}

.panel-heading span {
  color: var(--amber);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.panel-heading h2 {
  margin-top: 4px;
  margin-bottom: 18px;
  font-size: 30px;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-number {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: #111827;
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-heat {
  color: var(--amber-dark);
  font-weight: 900;
}

.list-stack {
  display: grid;
  gap: 18px;
}

.movie-card-list {
  display: grid;
  grid-template-columns: 170px 1fr;
}

.movie-card-list .poster-link img {
  height: 100%;
  aspect-ratio: auto;
}

.movie-card-list .movie-card-body {
  padding: 22px;
}

.page-hero {
  margin: 0;
  padding: 92px max(24px, calc((100vw - 1280px) / 2 + 24px));
  color: #ffffff;
  background: radial-gradient(circle at 18% 18%, rgba(245, 158, 11, 0.28), transparent 34%), linear-gradient(135deg, #111827, #451a03);
}

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

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

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.toolbar label {
  display: grid;
  gap: 8px;
  min-width: 220px;
  color: #374151;
  font-weight: 800;
}

.toolbar input,
.toolbar select {
  min-width: 220px;
}

.ranking-list {
  display: grid;
  gap: 16px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.ranking-poster {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}

.ranking-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.ranking-poster span {
  position: absolute;
  left: 8px;
  top: 8px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.86);
  font-weight: 900;
}

.ranking-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.ranking-card p {
  margin: 0 0 10px;
  color: #4b5563;
}

.search-box-large {
  display: flex;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.search-box-large input {
  flex: 1;
}

.search-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 28px;
}

.search-chips button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--amber-dark);
  background: var(--amber-soft);
  font-weight: 800;
  cursor: pointer;
}

.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 0;
}

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

.breadcrumbs a {
  color: var(--amber-dark);
  font-weight: 800;
}

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

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #000000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.68));
  cursor: pointer;
  text-align: center;
}

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

.play-circle {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 50%;
  padding-left: 4px;
  color: #111827;
  background: #fbbf24;
  font-size: 34px;
  box-shadow: 0 24px 60px rgba(245, 158, 11, 0.42);
}

.player-overlay strong {
  max-width: 80%;
  font-size: 20px;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  border-radius: 999px;
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
  font-size: 13px;
}

.player-status:empty {
  display: none;
}

.detail-content {
  padding: 28px;
}

.detail-content h1 {
  font-size: clamp(34px, 4vw, 52px);
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 6px 12px;
  color: #374151;
  background: #f3f4f6;
  font-weight: 800;
}

.lead-text {
  color: #374151;
  font-size: 20px;
  font-weight: 700;
}

.detail-content h2 {
  margin: 30px 0 10px;
  font-size: 24px;
}

.detail-content p {
  color: #374151;
}

.detail-side {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 94px;
}

.side-poster {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.side-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.side-card {
  padding: 20px;
}

.side-card h2 {
  margin: 0 0 14px;
  font-size: 21px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px 12px;
  margin: 0;
}

.side-card dt {
  color: #6b7280;
}

.side-card dd {
  margin: 0;
  font-weight: 800;
}

.compact-rank .rank-row {
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
}

.compact-rank .rank-number {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  font-size: 12px;
}

.related-section {
  padding-top: 46px;
}

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

.movie-card-compact h2 {
  font-size: 17px;
}

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

.site-footer {
  margin-top: 48px;
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 36px;
}

.footer-logo {
  color: #fbbf24;
  font-size: 22px;
}

.footer-about p {
  max-width: 560px;
  color: #9ca3af;
}

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

.footer-links h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 18px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 24px;
  text-align: center;
  color: #9ca3af;
}

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

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

  .ranking-panel,
  .detail-side {
    position: static;
  }

  .hero-slide {
    grid-template-columns: 1fr 320px;
  }
}

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

  .mobile-menu-button {
    display: block;
    margin-left: auto;
  }

  .header-inner {
    height: 64px;
  }

  .hero {
    min-height: 720px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 26px;
    padding-top: 52px;
  }

  .hero-cover {
    max-width: 260px;
    margin: 0 auto;
  }

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

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

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

@media (max-width: 560px) {
  .section-block,
  .detail-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .movie-card-list,
  .ranking-card {
    grid-template-columns: 1fr;
  }

  .search-box-large,
  .mobile-search {
    flex-direction: column;
  }

  .hero-content h1,
  .page-hero h1 {
    font-size: 40px;
  }

  .hero-content p,
  .lead-text {
    font-size: 17px;
  }
}
