:root {
  --bg: #f8fafc;
  --paper: #ffffff;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e2e8f0;
  --amber: #f59e0b;
  --orange: #f97316;
  --red: #ef4444;
  --dark: #111827;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.18), transparent 34rem),
    linear-gradient(180deg, #fff7ed 0%, var(--bg) 34rem);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--dark);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.9rem;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.7rem;
  color: #374151;
  font-weight: 700;
}

.desktop-nav a {
  position: relative;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: var(--orange);
}

.desktop-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.65rem;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.mobile-menu-button {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  background: white;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.28rem;
  cursor: pointer;
}

.mobile-menu-button span {
  width: 1.1rem;
  height: 2px;
  border-radius: 999px;
  background: var(--dark);
}

.mobile-nav {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem 1.25rem;
}

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

.mobile-nav > a,
.mobile-category-grid a {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.mobile-category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 1rem;
  color: var(--muted);
}

main {
  min-height: 70vh;
}

.hero-section {
  padding: 2rem 1.25rem 1.5rem;
}

.hero-shell {
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 2rem;
  color: white;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.22), transparent 16rem),
    linear-gradient(135deg, #111827 0%, #3b1d0a 52%, #f97316 140%);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

.hero-slider {
  position: relative;
  min-height: 34rem;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  display: grid;
  grid-template-columns: 0.94fr 1.06fr;
  gap: 2rem;
  align-items: center;
  padding: 3.5rem;
  transition: opacity 0.55s ease, transform 0.55s ease;
  transform: translateX(1.4rem);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.hero-media {
  height: 27rem;
  border-radius: 1.7rem;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.hero-media img {
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  max-width: 42rem;
}

.hero-kicker,
.detail-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.9rem;
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 800;
  font-size: 0.86rem;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy p {
  margin: 1.35rem 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  max-width: 40rem;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.hero-tags {
  margin-top: 1.4rem;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  background: #fff7ed;
  color: #9a3412;
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.14);
  color: #fff7ed;
}

.hero-actions,
.detail-info .primary-button {
  margin-top: 1.65rem;
}

.primary-button,
.ghost-button,
.search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  border-radius: 999px;
  padding: 0 1.45rem;
  font-weight: 900;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-box button {
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 14px 34px rgba(249, 115, 22, 0.28);
}

.ghost-button {
  margin-left: 0.7rem;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.primary-button:hover,
.ghost-button:hover,
.search-box button:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  left: 3.5rem;
  bottom: 2.25rem;
  display: flex;
  gap: 0.55rem;
}

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

.hero-dot.is-active {
  width: 2rem;
  background: white;
}

.hero-thumbs {
  position: absolute;
  right: 2rem;
  bottom: 2rem;
  display: flex;
  gap: 0.75rem;
}

.hero-thumbs a {
  width: 7.5rem;
  overflow: hidden;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-thumbs img {
  height: 4.4rem;
  object-fit: cover;
}

.hero-thumbs span {
  display: block;
  padding: 0.45rem 0.55rem 0.55rem;
  font-size: 0.76rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.content-section {
  max-width: 1240px;
  margin: 0 auto;
  padding: 3rem 1.25rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.45rem;
}

.section-heading h2,
.ranking-panel h2,
.movie-article h2,
.detail-side h2,
.category-tools h2 {
  margin: 0;
  color: var(--dark);
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-heading p,
.ranking-panel p,
.category-tools p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.section-heading a {
  color: var(--orange);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 1.35rem;
  background: var(--paper);
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #fed7aa, #fdba74, #f97316);
}

.poster-link img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.poster-badge {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  max-width: calc(100% - 1.5rem);
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  font-size: 0.75rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.movie-card-body {
  padding: 0.95rem;
}

.meta-line,
.detail-meta {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.movie-card h3 {
  margin: 0.45rem 0 0.45rem;
  color: var(--dark);
  font-size: 1.02rem;
  line-height: 1.3;
}

.movie-card p {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 1.5rem;
  align-items: start;
}

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

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

.category-tile {
  min-height: 11rem;
  padding: 1.2rem;
  border-radius: 1.35rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: 1rem;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 900;
}

.category-tile strong,
.category-tile em {
  display: block;
}

.category-tile strong {
  color: var(--dark);
  font-size: 1.16rem;
}

.category-tile em {
  margin-top: 0.45rem;
  color: var(--muted);
  font-style: normal;
  font-size: 0.9rem;
}

.ranking-panel,
.player-card,
.movie-article,
.detail-side,
.search-box {
  border-radius: 1.45rem;
  background: var(--paper);
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.07);
}

.ranking-panel {
  padding: 1.25rem;
}

.sticky-panel {
  position: sticky;
  top: 6.5rem;
}

.ranking-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.ranking-item {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.78rem;
  border-radius: 1rem;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-item:hover {
  background: #fff7ed;
  transform: translateX(3px);
}

.ranking-no {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-size: 0.78rem;
  font-weight: 900;
}

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

.ranking-score {
  color: var(--orange);
  font-weight: 900;
}

.page-hero,
.detail-hero {
  margin: 2rem auto 0;
  max-width: 1240px;
  padding: 0 1.25rem;
}

.slim-hero > div {
  overflow: hidden;
  border-radius: 1.8rem;
  padding: 3rem;
  color: white;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.22), transparent 18rem),
    linear-gradient(135deg, #111827, #7c2d12 62%, #f97316 130%);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  letter-spacing: -0.06em;
  line-height: 1;
}

.page-hero p {
  max-width: 48rem;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.06rem;
}

.category-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.category-tools input,
.search-box input,
.search-box select {
  min-height: 3rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  padding: 0 1rem;
  outline: none;
}

.category-tools input:focus,
.search-box input:focus,
.search-box select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.side-links {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.35rem;
  color: var(--muted);
}

.side-links strong {
  color: var(--dark);
}

.side-links a {
  padding: 0.55rem 0.7rem;
  border-radius: 0.8rem;
  background: #f8fafc;
}

.detail-hero {
  color: white;
}

.detail-hero::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 24% 4%, rgba(249, 115, 22, 0.22), transparent 22rem),
    linear-gradient(180deg, #111827 0, #111827 30rem, var(--bg) 30rem);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 1.2rem;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.92rem;
}

.breadcrumbs a:hover {
  color: white;
}

.detail-layout {
  display: grid;
  grid-template-columns: 21rem minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  padding: 2rem;
  border-radius: 1.8rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 1.4rem;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #fed7aa, #f97316);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.24);
}

.detail-poster img {
  height: 100%;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.detail-info p {
  max-width: 48rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
}

.detail-meta {
  color: rgba(255, 255, 255, 0.76);
}

.detail-meta span {
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.detail-tags {
  margin-top: 1rem;
}

.detail-content {
  margin-top: 1rem;
}

.player-card {
  padding: 1rem;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  object-fit: contain;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.15), rgba(2, 6, 23, 0.72));
  border: 0;
  cursor: pointer;
}

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

.play-overlay span {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  padding-left: 0.25rem;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 20px 45px rgba(249, 115, 22, 0.32);
  font-size: 2rem;
}

.play-overlay strong {
  font-size: 1.15rem;
}

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: 1.25rem;
  margin-top: 1.25rem;
  align-items: start;
}

.movie-article,
.detail-side {
  padding: 1.4rem;
}

.movie-article h2:not(:first-child) {
  margin-top: 2rem;
}

.movie-article p {
  color: #475569;
  font-size: 1.02rem;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.7rem 1rem;
  margin: 1rem 0 1.2rem;
}

.detail-side dt {
  color: var(--muted);
}

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

.full-button {
  width: 100%;
  margin-left: 0;
  color: var(--orange);
  border-color: #fed7aa;
  background: #fff7ed;
}

.search-section {
  max-width: 980px;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12rem auto;
  gap: 0.8rem;
  padding: 1rem;
}

.search-result-title {
  margin: 1.5rem 0 1rem;
  color: var(--dark);
  font-size: 1.35rem;
  font-weight: 900;
}

.site-footer {
  margin-top: 3rem;
  padding: 2rem 1.25rem;
  color: #cbd5e1;
  background: #111827;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-logo {
  color: white;
}

.site-footer p {
  margin: 0.55rem 0 0;
  color: #94a3b8;
}

.footer-links {
  display: flex;
  gap: 1rem;
  font-weight: 800;
}

.footer-links a:hover {
  color: white;
}

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

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

  .split-section,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }

  .hero-thumbs {
    display: none;
  }
}

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }

  .hero-slider {
    min-height: 45rem;
  }

  .hero-media {
    height: 20rem;
  }

  .hero-dots {
    left: 1.25rem;
    bottom: 1.25rem;
  }

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

  .detail-poster {
    max-width: 18rem;
  }

  .search-box {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .hero-section,
  .content-section,
  .page-hero,
  .detail-hero {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

  .hero-shell,
  .slim-hero > div,
  .detail-layout {
    border-radius: 1.2rem;
  }

  .hero-copy h1,
  .detail-info h1,
  .page-hero h1 {
    font-size: 2.35rem;
  }

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

  .movie-card-body {
    padding: 0.8rem;
  }

  .section-heading,
  .category-tools {
    display: block;
  }

  .section-heading a,
  .category-tools input {
    margin-top: 1rem;
  }

  .category-tools input {
    width: 100%;
  }

  .movie-article,
  .detail-side,
  .ranking-panel {
    padding: 1rem;
  }
}
