:root {
  --color-bg: #f3f4f6;
  --color-panel: #ffffff;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-line: #e5e7eb;
  --color-amber: #f59e0b;
  --color-orange: #f97316;
  --color-red: #ef4444;
  --color-blue: #3b82f6;
  --shadow-soft: 0 10px 30px rgba(17, 24, 39, 0.08);
  --shadow-strong: 0 22px 60px rgba(17, 24, 39, 0.22);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  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(--color-text);
  background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 36%, #eef2f7 100%);
}

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: 50;
  background: linear-gradient(90deg, #d97706, #f97316);
  color: #ffffff;
  box-shadow: 0 8px 28px rgba(217, 119, 6, 0.32);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: #ffffff;
  color: #d97706;
  box-shadow: inset 0 0 0 2px rgba(251, 191, 36, 0.4);
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #fff7ed;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.header-search input {
  width: 220px;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  border-radius: 999px;
  color: #111827;
  background: #ffffff;
}

.header-search button,
.large-search-form button,
.global-search-form button {
  border: 0;
  color: #ffffff;
  background: #111827;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-search button:hover,
.large-search-form button:hover,
.global-search-form button:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

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

.hero-tags,
.detail-actions,
.hero-actions,
.hero-keywords,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-tags span,
.hero-keywords span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.hero-content h1 {
  max-width: 780px;
  margin: 18px 0 18px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 760px;
  color: #f3f4f6;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.primary-button,
.ghost-button,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 16px 38px rgba(249, 115, 22, 0.35);
}

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

.outline-button {
  color: #b45309;
  background: #ffffff;
  border: 1px solid #fed7aa;
}

.primary-button:hover,
.ghost-button:hover,
.outline-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: translateY(-50%) scale(1.05);
}

.hero-arrow-prev {
  left: 24px;
  transform: translateY(-50%);
}

.hero-arrow-next {
  right: 24px;
  transform: translateY(-50%);
}

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

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

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

.search-band {
  margin-top: -38px;
  position: relative;
  z-index: 6;
}

.search-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  background: #ffffff;
  border-radius: 26px;
  box-shadow: var(--shadow-strong);
}

.search-panel h2 {
  margin: 5px 0 0;
  font-size: clamp(24px, 3vw, 34px);
}

.section-block {
  padding: 64px 0 0;
}

.section-heading {
  margin-bottom: 24px;
}

.section-kicker,
.page-kicker {
  display: inline-flex;
  color: #d97706;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.detail-copy h1 {
  margin: 8px 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

.section-heading p,
.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--color-muted);
  line-height: 1.7;
}

.large-search-form,
.global-search-form {
  display: flex;
  gap: 10px;
  width: min(560px, 100%);
}

.large-search-form input,
.global-search-form input,
.site-search-input {
  width: 100%;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  padding: 14px 18px;
  outline: 0;
  background: #ffffff;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  padding: 22px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #92400e, #f59e0b);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.08), rgba(17, 24, 39, 0.72));
  z-index: 1;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile strong,
.category-tile small,
.category-count {
  position: relative;
  z-index: 2;
}

.category-tile strong {
  display: block;
  margin-top: 54px;
  font-size: 25px;
}

.category-tile small {
  display: block;
  margin-top: 8px;
  color: #fff7ed;
  line-height: 1.6;
}

.category-count {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 800;
}

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

.category-tile:hover img {
  transform: scale(1.08);
  opacity: 0.5;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid var(--color-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
}

.sticky-toolbar {
  position: sticky;
  top: 84px;
  z-index: 12;
}

.result-count,
.search-status {
  color: var(--color-muted);
  font-weight: 700;
  white-space: nowrap;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(17, 24, 39, 0.18);
}

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

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #374151);
}

.movie-card-compact .poster-frame {
  aspect-ratio: 16 / 10;
}

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

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0), rgba(17, 24, 39, 0.75));
}

.poster-type,
.poster-rating,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.poster-type {
  left: 10px;
  top: 10px;
  background: rgba(17, 24, 39, 0.72);
}

.poster-rating {
  right: 10px;
  bottom: 10px;
  background: rgba(245, 158, 11, 0.95);
}

.rank-badge {
  right: 10px;
  top: 10px;
  background: rgba(239, 68, 68, 0.94);
}

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

.movie-card-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-line {
  min-height: 42px;
  margin: 0 0 12px;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.section-more {
  margin-top: 24px;
  text-align: center;
}

.page-hero {
  padding: 72px 0;
  color: #ffffff;
  background: linear-gradient(135deg, #d97706, #f97316);
}

.page-hero p,
.page-hero .breadcrumb a,
.page-hero .breadcrumb span {
  color: rgba(255, 255, 255, 0.88);
}

.gradient-hero {
  background: linear-gradient(135deg, #d97706, #f97316);
}

.ranking-hero {
  background: linear-gradient(135deg, #111827, #374151);
}

.search-hero {
  background: linear-gradient(135deg, #1d4ed8, #7c3aed);
}

.category-hero {
  background: linear-gradient(135deg, #92400e, #f59e0b);
}

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

.category-overview-block {
  padding: 24px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

.category-overview-head span {
  color: #d97706;
  font-weight: 900;
}

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

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

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

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

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

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-strong);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-copy h1 {
  max-width: 820px;
  color: #ffffff;
  font-size: clamp(36px, 6vw, 72px);
}

.detail-copy p {
  max-width: 820px;
  color: #f3f4f6;
  font-size: 18px;
  line-height: 1.8;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 28px;
  padding-top: 36px;
}

.detail-main,
.detail-sidebar {
  display: grid;
  align-content: start;
  gap: 22px;
}

.player-card,
.info-card,
.content-card,
.sidebar-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.player-card {
  padding: 0;
}

.video-shell {
  position: relative;
  background: #000000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.72));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 999px;
  padding: 16px 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 20px 48px rgba(249, 115, 22, 0.36);
}

.play-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.player-note {
  margin: 0;
  padding: 14px 18px;
  color: #6b7280;
  background: #f9fafb;
  font-weight: 700;
}

.info-card,
.content-card,
.sidebar-card {
  padding: 24px;
}

.info-card h2,
.content-card h2,
.sidebar-card h2 {
  margin: 0 0 16px;
}

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

.info-grid div {
  padding: 14px;
  border-radius: 14px;
  background: #f9fafb;
}

.info-grid span {
  display: block;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
}

.info-grid strong {
  display: block;
  margin-top: 6px;
  line-height: 1.4;
}

.tag-list {
  margin-top: 18px;
}

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

.detail-sidebar {
  position: sticky;
  top: 92px;
}

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

.sidebar-list .movie-card {
  box-shadow: none;
  border: 1px solid var(--color-line);
}

.sidebar-link {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid var(--color-line);
  color: #b45309;
  font-weight: 900;
}

.sidebar-link:last-child {
  border-bottom: 0;
}

.responsive-table {
  overflow-x: auto;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-line);
  text-align: left;
}

th {
  color: #92400e;
  background: #fffbeb;
}

td a {
  color: #b45309;
  font-weight: 900;
}

.global-search-form {
  margin-top: 24px;
}

.search-status {
  margin-bottom: 20px;
  padding: 16px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-logo {
  display: inline-block;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.footer-inner p {
  max-width: 620px;
  margin: 0;
  line-height: 1.7;
}

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

.footer-links a {
  color: #fbbf24;
  font-weight: 800;
}

.accent-amber {
  --tile-color: #f59e0b;
}

.accent-orange {
  --tile-color: #f97316;
}

.accent-blue {
  --tile-color: #3b82f6;
}

.accent-pink {
  --tile-color: #ec4899;
}

.accent-indigo {
  --tile-color: #6366f1;
}

.accent-red {
  --tile-color: #ef4444;
}

.accent-green {
  --tile-color: #22c55e;
}

.accent-slate {
  --tile-color: #475569;
}

.accent-purple {
  --tile-color: #8b5cf6;
}

.accent-cyan {
  --tile-color: #06b6d4;
}

.accent-teal {
  --tile-color: #14b8a6;
}

.accent-brown {
  --tile-color: #92400e;
}

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

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

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

  .detail-sidebar {
    position: static;
  }
}

@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .mobile-menu-button {
    display: block;
  }

  .site-nav {
    display: none;
    width: 100%;
    padding: 10px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
  }

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

  .header-search {
    width: 100%;
    margin-left: 0;
  }

  .header-search input {
    width: 100%;
  }

  .hero {
    min-height: 600px;
  }

  .hero-content {
    padding: 80px 0 120px;
  }

  .search-panel,
  .category-overview-head,
  .footer-inner,
  .detail-hero-grid {
    flex-direction: column;
    display: flex;
    align-items: flex-start;
  }

  .detail-poster {
    width: min(260px, 100%);
  }

  .large-search-form,
  .global-search-form {
    flex-direction: column;
  }

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

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

  .hero-arrow {
    display: none;
  }
}

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

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

  .site-nav {
    flex-wrap: wrap;
  }

  .hero {
    min-height: 560px;
  }

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

  .hero-actions,
  .detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

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

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .result-count {
    white-space: normal;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .info-card,
  .content-card,
  .sidebar-card {
    padding: 18px;
  }
}
