* {
  box-sizing: border-box;
}

:root {
  --amber: #f59e0b;
  --amber-dark: #b45309;
  --green: #15803d;
  --green-deep: #14532d;
  --ink: #1f2937;
  --muted: #6b7280;
  --paper: #ffffff;
  --line: rgba(31, 41, 55, 0.1);
  --soft: #fff7ed;
  --shadow: 0 24px 60px rgba(31, 41, 55, 0.14);
  --radius: 24px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fff7ed 0%, #f0fdf4 48%, #eff6ff 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(240, 253, 244, 0.96));
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.navbar {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #111827;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fbbf24, #16a34a);
  color: white;
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.28);
}

.brand-text {
  font-size: 22px;
  letter-spacing: 0.02em;
}

.nav-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  flex: 1;
}

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

.nav-link {
  position: relative;
  font-size: 15px;
  font-weight: 650;
  color: #374151;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 3px;
  border-radius: 999px;
  background: var(--amber);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-dark);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-search,
.wide-search {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-search input,
.wide-search input {
  min-width: 230px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  padding: 12px 18px;
  outline: none;
  background: rgba(255, 255, 255, 0.76);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.wide-search input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.nav-search button,
.wide-search button,
.primary-btn,
.ghost-btn,
.section-link {
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.wide-search button,
.primary-btn {
  background: var(--amber);
  color: white;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.26);
}

.nav-search button:hover,
.wide-search button:hover,
.primary-btn:hover {
  background: var(--amber-dark);
  transform: translateY(-2px);
}

.ghost-btn,
.section-link {
  background: rgba(255, 255, 255, 0.18);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(12px);
}

.section-link {
  color: var(--amber-dark);
  background: white;
  border-color: rgba(245, 158, 11, 0.22);
  box-shadow: 0 12px 24px rgba(31, 41, 55, 0.08);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  width: 42px;
  height: 42px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: #111827;
  border-radius: 999px;
}

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(69, 26, 3, 0.94), rgba(20, 83, 45, 0.76) 48%, rgba(15, 23, 42, 0.62));
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: min(1120px, calc(100% - 48px));
  transform: translate(-50%, -50%);
  color: white;
}

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

.hero-content h1 {
  max-width: 820px;
  margin: 0 0 22px;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 28px;
  color: #ffedd5;
  font-size: clamp(18px, 2.2vw, 25px);
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-tags span,
.detail-meta span,
.movie-meta-row span {
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.16);
  color: #fff7ed;
}

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

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

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

.hero-dot.active {
  background: #fbbf24;
}

.search-band {
  margin-top: -42px;
  position: relative;
  z-index: 6;
  padding: 0 24px;
}

.search-band-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 28px;
  align-items: center;
  backdrop-filter: blur(20px);
}

.search-band h2,
.section-heading h2,
.ranking-panel h2,
.page-hero h1,
.detail-info h1,
.article-card h2,
.side-card h2,
.text-section h2,
.category-preview h2 {
  margin: 0;
  color: #111827;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.search-band h2 {
  font-size: clamp(24px, 3vw, 38px);
}

.search-band p,
.section-heading p,
.page-hero p,
.text-section p,
.category-preview p {
  color: var(--muted);
  line-height: 1.8;
}

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

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

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

.section-heading p {
  max-width: 720px;
  margin: 10px 0 0;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(31, 41, 55, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.7);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 26px 62px rgba(31, 41, 55, 0.16);
}

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

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

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

.poster-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 7px 11px;
  color: white;
  background: rgba(180, 83, 9, 0.92);
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

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

.movie-meta-row span {
  color: #92400e;
  background: #fef3c7;
}

.movie-card h3 {
  margin: 14px 0 10px;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card p {
  margin: 0 0 14px;
  min-height: 50px;
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-list span {
  border-radius: 999px;
  padding: 6px 10px;
  color: #166534;
  background: #dcfce7;
  font-size: 12px;
  font-weight: 800;
}

.tag-list.large span {
  color: white;
  background: rgba(255, 255, 255, 0.16);
}

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

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  border-radius: 24px;
  box-shadow: 0 18px 44px rgba(31, 41, 55, 0.12);
  isolation: isolate;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(69, 26, 3, 0.86));
  z-index: -1;
}

.category-tile img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.category-tile span,
.category-tile strong {
  position: relative;
  display: block;
  margin-left: 18px;
  margin-right: 18px;
  color: white;
}

.category-tile span {
  margin-top: 72px;
  color: #fde68a;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 8px;
  line-height: 1.35;
}

.ranking-panel,
.article-card,
.side-card,
.category-preview,
.text-section {
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #fff7ed;
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: #ffedd5;
}

.rank-num {
  color: var(--amber-dark);
  font-weight: 900;
  font-size: 18px;
}

.rank-item img {
  width: 58px;
  height: 74px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  line-height: 1.35;
  font-weight: 900;
}

.rank-info em {
  margin-top: 5px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.full {
  display: block;
  text-align: center;
}

.page-hero {
  max-width: 1280px;
  margin: 36px auto 0;
  padding: 56px 24px;
}

.compact-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(69, 26, 3, 0.94), rgba(20, 83, 45, 0.9));
  color: white;
  box-shadow: var(--shadow);
}

.compact-hero h1 {
  color: white;
  font-size: clamp(36px, 5vw, 64px);
}

.compact-hero p {
  max-width: 760px;
  color: #ffedd5;
}

.inline-filter {
  align-self: center;
}

.category-overview {
  display: grid;
  gap: 26px;
}

.category-preview {
  padding: 28px;
}

.category-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

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

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

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

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

.movie-card.compact p {
  font-size: 14px;
}

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

.detail-bg,
.detail-shade {
  position: absolute;
  inset: 0;
}

.detail-bg {
  height: 100%;
  object-fit: cover;
  filter: blur(3px) scale(1.04);
}

.detail-shade {
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(69, 26, 3, 0.82) 52%, rgba(20, 83, 45, 0.72));
}

.detail-wrap {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  min-height: 620px;
  padding: 64px 24px;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 42px;
  align-items: center;
  color: white;
}

.detail-poster img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.detail-info h1 {
  color: white;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 1.06;
}

.lead {
  max-width: 820px;
  color: #ffedd5;
  font-size: 22px;
  line-height: 1.75;
}

.detail-meta {
  margin: 24px 0;
}

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

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #050505;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050505;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: white;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.34), rgba(0, 0, 0, 0.56));
  cursor: pointer;
}

.play-cover.hidden {
  display: none;
}

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.95);
  box-shadow: 0 18px 44px rgba(245, 158, 11, 0.34);
  font-size: 32px;
}

.article-card,
.side-card {
  padding: 28px;
}

.article-card h2,
.side-card h2 {
  margin-bottom: 16px;
  font-size: 28px;
}

.article-card p,
.side-card dd,
.side-card a,
.text-section p {
  color: #4b5563;
  line-height: 1.9;
}

.detail-side {
  display: grid;
  gap: 20px;
  align-content: start;
}

.side-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.side-card dt {
  color: var(--amber-dark);
  font-weight: 900;
}

.side-card dd {
  margin: 0 0 6px;
}

.nav-side a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.text-page-hero {
  margin-bottom: 34px;
}

.text-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 34px;
}

.text-section h2 {
  margin-top: 28px;
  font-size: 30px;
}

.text-section h2:first-child {
  margin-top: 0;
}

.feature-text-grid {
  max-width: 1180px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.feature-text-grid article {
  padding: 26px;
  border-radius: 22px;
  background: #fff7ed;
}

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

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: white;
  font-size: 22px;
  font-weight: 900;
}

.footer-inner h3 {
  margin: 0 0 16px;
  color: white;
}

.footer-inner p {
  max-width: 420px;
  color: #9ca3af;
  line-height: 1.8;
}

.footer-inner a {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
}

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

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

.is-hidden {
  display: none !important;
}

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

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-panel {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
  }

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

  .nav-links {
    flex-wrap: wrap;
    gap: 14px;
  }

  .nav-search,
  .nav-search input,
  .wide-search,
  .wide-search input {
    width: 100%;
  }

  .search-band-inner,
  .compact-hero,
  .detail-wrap,
  .footer-inner,
  .feature-text-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    width: min(100% - 32px, 720px);
  }

  .detail-wrap {
    padding-top: 36px;
  }

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

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

@media (max-width: 640px) {
  .navbar {
    padding: 0 16px;
  }

  .brand-text {
    font-size: 19px;
  }

  .hero {
    height: 520px;
  }

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

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

  .content-section {
    padding: 48px 16px 0;
  }

  .page-hero {
    margin: 20px 16px 0;
    padding: 34px 20px;
  }

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

  .section-heading,
  .category-preview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-band {
    padding: 0 16px;
  }

  .search-band-inner,
  .article-card,
  .side-card,
  .category-preview,
  .text-section {
    padding: 22px;
  }
}
