* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: #111827;
  background: #f9fafb;
  line-height: 1.6;
}

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

img {
  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: 100;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.site-header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ec4899);
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.32);
}

.brand-text {
  font-size: 22px;
  line-height: 1;
  background: linear-gradient(135deg, #fb923c, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav-link {
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #f97316;
}

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

.header-search input,
.filter-panel input,
.search-page-form input {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 220px;
  padding: 10px 14px;
}

.header-search input:focus,
.filter-panel input:focus,
.search-page-form input:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.header-search button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #f97316, #ec4899);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
  color: #f97316;
  font-size: 24px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  gap: 8px;
}

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

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
  background: #f9fafb;
}

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

.hero-carousel {
  position: relative;
  min-height: 650px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  display: flex;
  align-items: center;
  background-position: center;
  background-size: cover;
  transition: opacity 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 2;
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 108px 0 156px;
  color: #ffffff;
}

.hero-badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-badge {
  padding: 9px 16px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(18px, 2vw, 24px);
}

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

.hero-tags span,
.detail-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ec4899);
  box-shadow: 0 16px 32px rgba(236, 72, 153, 0.26);
}

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

.btn-light {
  color: #f97316;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(255, 255, 255, 0.22);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 40px;
  z-index: 5;
  width: min(1180px, calc(100% - 32px));
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  transform: translateX(-50%);
}

.hero-thumb {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  padding: 8px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.48);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: border-color 0.25s ease, background 0.25s ease;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  border-color: rgba(251, 146, 60, 0.95);
  background: rgba(249, 115, 22, 0.45);
}

.hero-thumb img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.hero-thumb span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section {
  padding: 72px 0;
}

.section-soft {
  background: linear-gradient(135deg, #fff7ed, #fdf2f8);
}

.section-overlap {
  position: relative;
  z-index: 10;
  margin-top: -64px;
  padding-top: 0;
}

.section-heading {
  margin-bottom: 34px;
  text-align: center;
}

.section-heading h2 {
  margin: 10px 0 10px;
  color: #111827;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
}

.section-heading p {
  max-width: 680px;
  margin: 0 auto;
  color: #6b7280;
}

.row-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}

.eyebrow {
  padding: 6px 14px;
  color: #f97316;
  background: #ffedd5;
}

.eyebrow.red {
  color: #dc2626;
  background: #fee2e2;
}

.eyebrow.green {
  color: #047857;
  background: #d1fae5;
}

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

.text-link {
  color: #f97316;
  font-weight: 900;
}

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

.stat-card {
  padding: 26px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
  text-align: center;
}

.stat-card strong {
  display: block;
  margin-bottom: 4px;
  color: #f97316;
  font-size: 34px;
  line-height: 1;
}

.stat-card span {
  color: #6b7280;
  font-weight: 700;
}

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

.category-card {
  min-height: 248px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  padding: 22px;
  border-radius: 26px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ec4899);
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-count,
.category-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 900;
}

.category-card h3 {
  margin: 28px 0 8px;
  font-size: 26px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

.category-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.category-thumbs img {
  width: 52px;
  height: 70px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  object-fit: cover;
  background: rgba(17, 24, 39, 0.4);
}

.from-orange { background: linear-gradient(135deg, #f97316, #ec4899); }
.from-pink { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.from-purple { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.from-rose { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.from-yellow { background: linear-gradient(135deg, #f59e0b, #f97316); }
.from-cyan { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.from-amber { background: linear-gradient(135deg, #d97706, #f97316); }
.from-red { background: linear-gradient(135deg, #dc2626, #f97316); }
.from-blue { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.from-green { background: linear-gradient(135deg, #059669, #10b981); }
.from-indigo { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.from-teal { background: linear-gradient(135deg, #0d9488, #14b8a6); }

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

.poster-year,
.poster-type,
.rank-badge {
  position: absolute;
  z-index: 3;
  border-radius: 999px;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(17, 24, 39, 0.76);
  backdrop-filter: blur(8px);
}

.poster-year {
  left: 10px;
  bottom: 10px;
}

.poster-type {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, #f97316, #ec4899);
}

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

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #f97316;
  font-size: 13px;
  font-weight: 900;
}

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

.movie-card h3 a:hover,
.ranking-info h2 a:hover {
  color: #f97316;
}

.movie-card p {
  min-height: 68px;
  margin: 0 0 12px;
  color: #6b7280;
  font-size: 14px;
}

.tag-row span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #4b5563;
  background: #f3f4f6;
  font-size: 12px;
  font-weight: 700;
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 64px 96px minmax(0, 1fr) 86px;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.ranking-number {
  color: #f97316;
  font-size: 30px;
  font-weight: 900;
  text-align: center;
}

.ranking-poster {
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

.ranking-poster img {
  width: 96px;
  height: 124px;
  object-fit: cover;
}

.ranking-info h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.ranking-info p {
  margin: 0 0 10px;
  color: #6b7280;
  font-size: 14px;
}

.ranking-score {
  text-align: center;
}

.ranking-score strong {
  display: block;
  color: #f97316;
  font-size: 30px;
  line-height: 1;
}

.ranking-score span {
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.cta-section,
.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ec4899);
}

.cta-section {
  padding: 84px 0;
  text-align: center;
}

.cta-section h2,
.page-hero h1 {
  margin: 12px 0 12px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.1;
}

.cta-section p,
.page-hero p {
  max-width: 720px;
  margin: 0 auto 28px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.page-hero {
  padding: 74px 0 78px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

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

.category-overview-block {
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

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

.category-overview-head h2 {
  margin: 8px 0;
  font-size: 30px;
}

.category-overview-head p {
  max-width: 760px;
  margin: 0;
  color: #6b7280;
}

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

.compact-card {
  overflow: hidden;
  border-radius: 18px;
  background: #f9fafb;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.compact-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: #111827;
}

.compact-card span {
  display: block;
  overflow: hidden;
  padding: 10px;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-panel,
.search-page-box {
  margin-bottom: 28px;
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.filter-panel label,
.search-page-box label {
  display: grid;
  gap: 10px;
  color: #374151;
  font-weight: 900;
}

.filter-panel input {
  width: 100%;
  padding: 13px 18px;
}

.filter-panel p,
.search-hint {
  margin: 12px 0 0;
  color: #6b7280;
}

.search-page-form {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.search-page-form input {
  flex: 1;
  padding: 14px 18px;
}

.detail-hero {
  padding: 54px 0 72px;
  color: #ffffff;
  background-position: center;
  background-size: cover;
}

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

.detail-poster {
  width: 240px;
  aspect-ratio: 3 / 4;
  border: 5px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  object-fit: cover;
  background: #111827;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

.detail-intro h1 {
  margin: 12px 0 16px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
}

.detail-intro p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 20px;
}

.detail-section {
  padding-top: 54px;
}

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

.player-card,
.content-card,
.side-card {
  overflow: hidden;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.1);
}

.player-frame {
  position: relative;
  background: #050505;
  aspect-ratio: 16 / 9;
}

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #050505;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.36), rgba(17, 24, 39, 0.72));
  cursor: pointer;
  font-weight: 900;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ec4899);
  box-shadow: 0 18px 42px rgba(236, 72, 153, 0.32);
}

.player-status {
  margin: 0;
  padding: 14px 18px;
  color: #6b7280;
  background: #ffffff;
  font-size: 14px;
}

.content-card {
  margin-top: 24px;
  padding: 28px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: #374151;
  font-size: 17px;
  line-height: 1.9;
}

.detail-sidebar {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 22px;
}

.side-card {
  padding: 24px;
}

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

.side-card dl div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
}

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

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

.detail-tags.dark span {
  color: #4b5563;
  background: #f3f4f6;
}

.searchable-card.is-hidden {
  display: none;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 54px 0 34px;
}

.footer-brand p {
  max-width: 360px;
  color: #9ca3af;
}

.footer-column h3 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 18px;
}

.footer-column ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-column a:hover {
  color: #fb923c;
}

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

.footer-bottom p {
  margin: 0;
  color: #9ca3af;
}

@media (max-width: 1080px) {
  .header-search {
    display: none;
  }

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

  .home-ranking {
    grid-template-columns: 1fr;
  }

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

  .detail-sidebar {
    position: static;
  }

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

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

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

  .site-header-inner {
    gap: 12px;
  }

  .hero-section,
  .hero-carousel {
    min-height: 720px;
  }

  .hero-content {
    padding: 78px 0 220px;
  }

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

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

  .row-heading,
  .category-overview-head,
  .search-page-form {
    align-items: stretch;
    flex-direction: column;
  }

  .ranking-item {
    grid-template-columns: 46px 82px minmax(0, 1fr);
  }

  .ranking-score {
    display: none;
  }

  .ranking-poster img {
    width: 82px;
    height: 108px;
  }

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

  .detail-poster {
    width: 190px;
  }
}

@media (max-width: 560px) {
  .brand-text {
    font-size: 18px;
  }

  .section,
  .page-hero,
  .cta-section {
    padding: 48px 0;
  }

  .hero-content h1,
  .detail-intro h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .hero-controls {
    bottom: 22px;
    gap: 8px;
  }

  .hero-thumb img {
    width: 38px;
    height: 38px;
  }

  .stats-grid,
  .movie-grid,
  .category-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .movie-card p {
    min-height: auto;
  }

  .ranking-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .ranking-poster {
    display: none;
  }

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