:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --dark: #0f172a;
  --amber: #d97706;
  --amber-dark: #92400e;
  --amber-soft: #fffbeb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--amber-dark);
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 10px 25px rgba(180, 83, 9, 0.32);
}

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

.main-nav a:hover,
.mobile-panel a:hover,
.section-link:hover,
.text-btn:hover {
  color: var(--amber-dark);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 320px;
}

.top-search input,
.search-page-form input,
.filter-bar input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  outline: none;
  color: var(--text);
  background: #ffffff;
}

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

.top-search button,
.search-page-form button,
.primary-btn,
.ghost-btn,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
}

.top-search button,
.search-page-form button,
.primary-btn {
  color: #ffffff;
  background: var(--amber);
  box-shadow: 0 12px 25px rgba(217, 119, 6, 0.28);
}

.top-search button:hover,
.search-page-form button:hover,
.primary-btn:hover {
  background: var(--amber-dark);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.text-btn {
  display: inline-flex;
  color: var(--amber-dark);
  background: var(--amber-soft);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  background: #f3f4f6;
}

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

.mobile-panel.open {
  display: grid;
  gap: 12px;
}

.mobile-panel form {
  display: flex;
  gap: 8px;
}

.mobile-panel input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
}

.mobile-panel button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: var(--amber);
}

.showcase {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.showcase-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
  pointer-events: none;
}

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

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

.showcase-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.35), transparent 30%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.66), rgba(15, 23, 42, 0.2));
}

.showcase-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.showcase-copy {
  max-width: 680px;
  padding: 44px 0;
}

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

.eyebrow span,
.tag-row span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.eyebrow span {
  padding: 6px 12px;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.92);
}

.dark-eye span {
  background: var(--amber-soft);
  color: var(--amber-dark);
}

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

.showcase p {
  max-width: 620px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 18px;
}

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

.showcase-dots {
  position: absolute;
  left: 50%;
  bottom: 24px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.showcase-dot {
  width: 28px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.showcase-dot.active {
  width: 46px;
  background: #f59e0b;
}

.section-block {
  padding: 68px 0;
}

.soft-section {
  background: linear-gradient(180deg, #fffbeb, #ffffff);
}

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

.section-heading.in-panel {
  margin-bottom: 20px;
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--amber);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2,
.rank-panel h2,
.page-title h1,
.detail-info h1,
.detail-article h2,
.related-panel h2,
.overview-content h2 {
  margin: 0;
  line-height: 1.16;
}

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

.section-link {
  font-weight: 800;
  color: var(--amber);
}

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

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

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

.movie-card,
.overview-card,
.rank-card,
.rank-panel,
.detail-article,
.related-panel,
.stream-panel {
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #111827;
}

.poster-link img,
.category-tile img,
.overview-media img,
.detail-poster img,
.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.movie-card:hover .poster-link img,
.category-tile:hover img,
.overview-card:hover img,
.rank-card:hover .rank-poster img {
  transform: scale(1.08);
}

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.card-content {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
}

.card-meta span {
  padding: 4px 9px;
  background: #f3f4f6;
}

.movie-card h3,
.rank-card h2,
.compact-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

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

.movie-card p,
.compact-card p,
.rank-card p,
.overview-content p,
.page-title p,
.detail-one-line,
.detail-article p,
.related-panel p {
  color: var(--muted);
}

.movie-card p,
.compact-card p,
.rank-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0;
}

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

.tag-row span {
  padding: 5px 10px;
  color: var(--amber-dark);
  background: var(--amber-soft);
}

.light-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

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

.category-tile {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 22px;
  color: #ffffff;
  background: #111827;
  box-shadow: var(--shadow);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

.category-tile span,
.category-tile small {
  position: absolute;
  z-index: 1;
  left: 18px;
}

.category-tile span {
  bottom: 42px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  bottom: 20px;
  color: #fef3c7;
}

.split-section {
  background: #f3f4f6;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

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

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

.compact-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  min-height: 154px;
}

.compact-card .poster-link {
  aspect-ratio: auto;
  height: 100%;
}

.rank-panel {
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 26px;
}

.home-rank-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 22px;
}

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

.home-rank-row strong {
  color: var(--amber);
}

.home-rank-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.home-rank-row em {
  color: var(--muted);
  font-style: normal;
}

.wide-btn {
  display: flex;
  justify-content: center;
}

.page-title {
  padding: 62px 0 46px;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 30%, rgba(245, 158, 11, 0.32), transparent 35%),
    linear-gradient(135deg, #111827, #1f2937);
}

.page-title h1 {
  font-size: clamp(36px, 6vw, 62px);
}

.page-title p {
  max-width: 760px;
  margin: 14px 0 0;
  color: #d1d5db;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #fef3c7;
  font-weight: 700;
}

.channel-title {
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.35), transparent 30%),
    linear-gradient(135deg, #1f2937, #111827);
}

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

.overview-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 44% 1fr;
}

.overview-media {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  min-height: 260px;
  overflow: hidden;
  background: #111827;
}

.overview-media img {
  min-height: 130px;
}

.overview-content {
  padding: 26px;
}

.overview-content h2 {
  font-size: 26px;
  margin-bottom: 12px;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.filter-bar input {
  max-width: 320px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.filter-pill {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: #374151;
  background: #f3f4f6;
  cursor: pointer;
}

.filter-pill.active,
.filter-pill:hover {
  color: #ffffff;
  background: var(--amber);
}

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

.rank-card {
  display: grid;
  grid-template-columns: 78px 150px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  padding: 18px;
}

.rank-number {
  color: var(--amber);
  font-size: 24px;
  font-weight: 900;
}

.rank-poster {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  background: #111827;
}

.search-page-form {
  display: flex;
  max-width: 720px;
  gap: 12px;
  margin-top: 28px;
}

.search-summary {
  margin-bottom: 22px;
  color: var(--muted);
  font-weight: 700;
}

.detail-top {
  padding: 54px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 18%, rgba(245, 158, 11, 0.3), transparent 36%),
    linear-gradient(135deg, #111827, #1f2937 55%, #0f172a);
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
}

.detail-info h1 {
  font-size: clamp(34px, 6vw, 58px);
  margin-bottom: 16px;
}

.detail-one-line {
  max-width: 820px;
  color: #e5e7eb;
  font-size: 18px;
}

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

.detail-meta-list span {
  border-radius: 999px;
  padding: 8px 12px;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.12);
}

.player-section {
  padding-bottom: 36px;
  background: #111827;
}

.stream-panel {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

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

.stream-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #000000;
  transition: opacity 260ms ease;
}

.stream-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

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

.play-ring {
  position: absolute;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.92);
  box-shadow: 0 0 0 14px rgba(217, 119, 6, 0.22);
  font-size: 34px;
}

.stream-message {
  position: absolute;
  left: 20px;
  bottom: 16px;
  margin: 0;
  color: #ffffff;
  font-weight: 700;
}

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

.detail-article,
.related-panel {
  padding: 28px;
}

.detail-article h2,
.related-panel h2 {
  margin-bottom: 16px;
  font-size: 26px;
}

.detail-article h2:not(:first-child) {
  margin-top: 30px;
}

.detail-article p {
  margin: 0 0 16px;
  font-size: 17px;
}

.related-panel {
  position: sticky;
  top: 88px;
}

.empty-text {
  grid-column: 1 / -1;
  margin: 0;
  padding: 32px;
  border-radius: 22px;
  color: var(--muted);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.site-footer {
  padding: 50px 0;
  color: #d1d5db;
  background: #111827;
}

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

.site-footer p {
  max-width: 620px;
  margin: 16px 0 0;
  color: #9ca3af;
}

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

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
}

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

[data-movie-card].is-hidden {
  display: none;
}

@media (max-width: 980px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .main-nav,
  .top-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

  .featured-grid,
  .compact-grid,
  .overview-grid,
  .split-grid,
  .detail-body-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-panel,
  .related-panel {
    position: static;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .showcase {
    min-height: 620px;
  }

  .showcase-mask {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.94));
  }

  .showcase-content {
    align-items: end;
  }

  .section-heading,
  .filter-bar,
  .search-page-form {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-bar input {
    max-width: none;
  }

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

  .card-content {
    padding: 14px;
  }

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

  .compact-card,
  .rank-card,
  .overview-card {
    grid-template-columns: 1fr;
  }

  .compact-card .poster-link {
    aspect-ratio: 16 / 10;
  }

  .rank-card {
    gap: 12px;
  }

  .rank-poster {
    aspect-ratio: 16 / 9;
  }

  .detail-poster {
    max-width: 260px;
  }

  .play-ring {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
