:root {
  --bg: #fff7ed;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f9fafb;
  --line: #e5e7eb;
  --brand: #f97316;
  --brand-deep: #ea580c;
  --brand-soft: #ffedd5;
  --dark: #111827;
  --shadow: 0 20px 45px rgba(17, 24, 39, 0.14);
  --radius: 22px;
}

* {
  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(--ink);
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 46%, #ffffff 100%);
  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.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), #fb923c);
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
  font-size: 15px;
}

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

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

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

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.header-search input {
  width: 190px;
  border: 0;
  outline: 0;
  padding: 8px 10px;
  background: transparent;
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  color: #ffffff;
  background: var(--brand);
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  border-radius: 999px;
  background: #111827;
}

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

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

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

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

.mobile-link {
  display: block;
  padding: 12px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
}

.mobile-link:hover,
.mobile-link.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.home-hero {
  padding: 32px 0 22px;
}

.hero-carousel {
  position: relative;
  height: 560px;
  overflow: hidden;
  border-radius: 26px;
  background: #111827;
  box-shadow: var(--shadow);
}

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

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

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

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.38) 48%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 70px);
  right: clamp(24px, 8vw, 88px);
  bottom: clamp(28px, 8vw, 72px);
  max-width: 760px;
  color: #ffffff;
}

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

.tag-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.hero-content h1 {
  margin: 16px 0 14px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(16px, 2vw, 19px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.hero-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  color: #ffffff;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover {
  background: var(--brand-deep);
}

.btn-glass {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 22px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

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

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

.page-section {
  padding: 54px 0;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.section-title > span {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--brand);
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.24);
  font-weight: 900;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(25px, 4vw, 34px);
  letter-spacing: -0.03em;
}

.section-title p {
  margin: 3px 0 0;
  color: var(--muted);
}

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

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 40px rgba(17, 24, 39, 0.14);
}

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: radial-gradient(circle at 20% 10%, #fed7aa, #111827 65%);
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.1));
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-wrap::after {
  opacity: 1;
}

.poster-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 800;
}

.play-fab {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--brand);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.84);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-fab {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-body h3 {
  margin: 0 0 8px;
  min-height: 2.8em;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 18px;
  line-height: 1.38;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--brand);
}

.movie-card-body p {
  margin: 0 0 12px;
  min-height: 3.1em;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--muted);
  font-size: 14px;
}

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #6b7280;
  font-size: 13px;
}

.movie-genre {
  margin-top: 8px;
  overflow: hidden;
  color: var(--brand);
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 750;
}

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

.category-tile {
  min-height: 150px;
  border: 1px solid #fed7aa;
  border-radius: 22px;
  padding: 22px;
  background: linear-gradient(135deg, #ffffff, #fff7ed);
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 38px rgba(249, 115, 22, 0.18);
}

.category-tile strong {
  display: block;
  margin-bottom: 12px;
  font-size: 20px;
}

.category-tile span {
  color: var(--muted);
  font-size: 14px;
}

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

.rank-panel,
.side-card,
.detail-content-card,
.overview-card {
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
}

.rank-panel {
  position: sticky;
  top: 94px;
  padding: 18px;
}

.rank-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.rank-panel-head h2 {
  margin: 0;
}

.rank-panel-head a {
  color: var(--brand);
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 34px 74px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  padding: 10px;
  background: #ffffff;
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.rank-num {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--brand);
  font-weight: 900;
}

.rank-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #111827;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info {
  min-width: 0;
}

.rank-info strong,
.compact-info strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
}

.rank-info em,
.compact-info em {
  display: block;
  overflow: hidden;
  color: var(--muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  font-style: normal;
  font-size: 12px;
}

.page-hero {
  padding: 54px 0;
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(249, 115, 22, 0.82), transparent 34%), linear-gradient(135deg, #111827, #7c2d12);
}

.small-hero h1,
.category-hero h1,
.search-hero h1 {
  margin: 12px 0 12px;
  font-size: clamp(34px, 6vw, 54px);
  letter-spacing: -0.04em;
}

.small-hero p,
.category-hero p,
.search-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.page-filter {
  margin-top: 24px;
}

.page-filter-input {
  width: min(100%, 620px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  outline: 0;
  padding: 15px 18px;
  color: #111827;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 32px rgba(17, 24, 39, 0.16);
}

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

.overview-card {
  overflow: hidden;
}

.overview-main {
  display: block;
  padding: 24px;
  background: linear-gradient(135deg, #fff7ed, #ffffff);
}

.overview-main h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.overview-main p {
  margin: 0;
  color: var(--muted);
}

.overview-samples {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.compact-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  padding: 10px;
  transition: background 0.2s ease;
}

.compact-card:hover {
  background: #fff7ed;
}

.compact-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #111827;
}

.compact-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

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

.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) scale(1.04);
  opacity: 0.54;
}

.detail-backdrop-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.66) 58%, rgba(17, 24, 39, 0.36));
}

.detail-head {
  position: relative;
  z-index: 2;
  padding: 36px 0 54px;
}

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

.detail-poster {
  overflow: hidden;
  border: 5px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  aspect-ratio: 3 / 4;
  background: #111827;
  box-shadow: 0 28px 56px rgba(0, 0, 0, 0.3);
}

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

.detail-info h1 {
  margin: 18px 0 12px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 830px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 750;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.6));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  box-shadow: 0 18px 44px rgba(249, 115, 22, 0.38);
  font-size: 34px;
}

.player-card.playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

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

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

.detail-content-card p {
  margin: 0;
  color: #374151;
  font-size: 16px;
}

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

.side-card {
  padding: 20px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 0;
}

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

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

.detail-tag {
  background: rgba(249, 115, 22, 0.94);
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 30px;
  padding: 42px 0;
}

.brand-footer .brand-text {
  color: #ffffff;
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-content: start;
}

.footer-links a:hover {
  color: #ffffff;
}

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

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

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

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

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

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

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

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

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

  .hero-carousel {
    height: 500px;
    border-radius: 20px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .large-grid,
  .compact-grid,
  .overview-grid,
  .full-rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-head-grid {
    grid-template-columns: 160px minmax(0, 1fr);
    align-items: center;
  }

  .detail-info h1 {
    font-size: 34px;
  }

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

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

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

  .hero-carousel {
    height: 470px;
  }

  .hero-content {
    left: 18px;
    right: 18px;
    bottom: 50px;
  }

  .hero-content h1 {
    font-size: 32px;
  }

  .hero-content p {
    font-size: 15px;
  }

  .movie-grid,
  .large-grid,
  .compact-grid,
  .category-grid,
  .overview-grid,
  .full-rank-list {
    grid-template-columns: 1fr;
  }

  .page-section {
    padding: 38px 0;
  }

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

  .detail-poster {
    width: 210px;
  }

  .rank-item {
    grid-template-columns: 30px 70px minmax(0, 1fr);
  }
}
