:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --amber: #d97706;
  --amber-dark: #b45309;
  --amber-light: #fffbeb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 48%, #fff7ed 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.header-inner,
.footer-inner,
.page-shell,
.hero-content,
.search-band {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #111827;
  font-size: 22px;
  font-weight: 850;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.28);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-panel a,
.footer-links a,
.text-link {
  color: var(--text);
  text-decoration: none;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 15px;
  color: #4b5563;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #92400e;
  background: var(--amber-light);
}

.menu-button {
  display: none;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--amber-light);
  color: #92400e;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.mobile-panel a {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  color: #4b5563;
}

.mobile-panel a:hover {
  background: #fff7ed;
  color: #92400e;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.10));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
}

.hero-content > * {
  max-width: 680px;
}

.hero-kicker,
.detail-kicker,
.page-title-card p {
  margin: 0 0 12px;
  color: #fbbf24;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-text {
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span,
.filter-chips button {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 251, 235, 0.96);
  color: #92400e;
  font-size: 13px;
  font-weight: 700;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  transition: 0.25s ease;
}

.primary-button {
  color: #ffffff;
  background: var(--amber);
  box-shadow: 0 16px 32px rgba(217, 119, 6, 0.30);
}

.primary-button:hover {
  background: var(--amber-dark);
  transform: translateY(-2px);
}

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

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

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

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

.search-band {
  margin-top: -44px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  align-items: center;
  gap: 20px;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.search-band h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 4vw, 38px);
  letter-spacing: -0.03em;
}

.search-band p {
  margin: 0;
  color: var(--muted);
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box span {
  color: #92400e;
  font-size: 13px;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
}

.search-box input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.page-shell {
  padding: 42px 0 56px;
}

.top-gap {
  padding-top: 34px;
}

.content-section {
  margin-top: 44px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading a,
.text-link {
  color: #b45309;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
}

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

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

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

.type-label {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 10px;
  color: #fbbf24;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--amber);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: 0.28s ease;
}

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

.card-body {
  padding: 14px;
}

.card-body h3,
.compact-body h3 {
  margin: 0 0 7px;
  font-size: 16px;
  line-height: 1.35;
}

.card-body h3 a,
.compact-body h3 {
  color: #1f2937;
  text-decoration: none;
}

.card-body h3 a:hover,
.compact-body h3:hover {
  color: var(--amber);
}

.movie-meta {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 13px;
}

.tag-row span {
  background: #fff7ed;
  font-size: 12px;
}

.highlight-section {
  padding: 30px;
  border-radius: 30px;
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

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

.category-tile,
.category-overview-card,
.page-title-card,
.tool-row,
.detail-content article {
  border: 1px solid rgba(229, 231, 235, 0.85);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.category-tile {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  color: var(--text);
  text-decoration: none;
  transition: 0.28s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: #fbbf24;
}

.category-tile h3,
.category-overview-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile p,
.category-overview-card p,
.page-title-card span,
.detail-content p,
.compact-body p {
  color: var(--muted);
  line-height: 1.75;
}

.category-tile div {
  display: grid;
  gap: 5px;
  color: #92400e;
  font-size: 13px;
  font-weight: 700;
}

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

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

.movie-card-compact {
  overflow: visible;
}

.compact-link {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  padding: 10px;
  color: inherit;
  text-decoration: none;
}

.compact-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #111827, #78350f);
}

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

.rank-badge {
  position: absolute;
  left: 7px;
  top: 7px;
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0 7px;
  border-radius: 9px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  font-size: 13px;
}

.compact-body {
  min-width: 0;
  padding: 4px 0;
}

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

.page-title-card {
  padding: clamp(26px, 5vw, 44px);
  background: linear-gradient(135deg, #ffffff, #fff7ed);
}

.page-title-card h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.category-overview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  padding: 16px;
}

.category-cover-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-cover-row img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #92400e;
  text-decoration: none;
  font-weight: 700;
}

.tool-row {
  margin-top: 22px;
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  align-items: end;
  gap: 16px;
  padding: 18px;
}

.filter-chips {
  justify-content: flex-end;
}

.filter-chips button {
  border: 0;
  cursor: pointer;
}

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

.detail-shell {
  max-width: 1180px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 26px;
  align-items: stretch;
}

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

.movie-video,
.player-cover,
.player-cover img {
  width: 100%;
  height: 100%;
}

.movie-video {
  display: block;
  object-fit: contain;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #000000;
}

.player-cover.is-hidden {
  display: none;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.72;
}

.player-cover span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--amber);
  font-size: 34px;
  box-shadow: 0 18px 36px rgba(217, 119, 6, 0.36);
  transform: translate(-50%, -50%);
}

.detail-info {
  padding: 28px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 4.6vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-meta span {
  color: #374151;
  background: #f3f4f6;
}

.detail-one-line {
  margin: 20px 0;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.8;
}

.detail-content article {
  padding: clamp(24px, 4vw, 36px);
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

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

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

.site-footer {
  margin-top: 40px;
  padding: 42px 0 28px;
  background: #111827;
  color: #e5e7eb;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 28px;
}

.footer-logo {
  color: #ffffff;
}

.site-footer p {
  color: #9ca3af;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.08);
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  font-size: 14px;
}

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

@media (max-width: 1100px) {
  .movie-grid,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

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

  .hero {
    height: 68vh;
    min-height: 520px;
  }

  .hero-content {
    padding-right: 42px;
  }

  .hero-arrow {
    width: 40px;
    height: 40px;
    font-size: 30px;
  }

  .search-band,
  .tool-row,
  .footer-inner,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

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

  .ranking-list,
  .full-ranking,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .filter-chips,
  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .footer-inner,
  .page-shell,
  .hero-content,
  .search-band {
    width: min(100% - 22px, 1180px);
  }

  .logo {
    font-size: 18px;
  }

  .hero {
    min-height: 560px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-text {
    font-size: 16px;
  }

  .hero-prev {
    left: 8px;
  }

  .hero-next {
    right: 8px;
  }

  .highlight-section {
    padding: 18px;
  }

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

  .card-body {
    padding: 12px;
  }

  .compact-link {
    grid-template-columns: 76px 1fr;
  }

  .detail-info {
    padding: 20px;
  }

  .player-wrap {
    border-radius: 18px;
  }
}
