:root {
  --color-orange: #ea580c;
  --color-amber: #f59e0b;
  --color-red: #dc2626;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-line: #e5e7eb;
  --color-soft: #fff7ed;
  --color-bg: #f9fafb;
  --shadow-card: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 12px 30px rgba(234, 88, 12, 0.12);
  --radius-large: 24px;
  --radius-medium: 18px;
  --radius-small: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-text);
  background: linear-gradient(180deg, #ffffff 0%, var(--color-bg) 48%, #ffffff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--color-line);
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.content-section,
.category-strip,
.search-panel,
.page-main,
.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #fb923c, var(--color-amber));
  box-shadow: var(--shadow-soft);
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-text strong {
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--color-orange), var(--color-amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  color: var(--color-muted);
  font-size: 12px;
}

.brand.compact .brand-icon {
  width: 38px;
  height: 38px;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

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

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

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: var(--color-soft);
  cursor: pointer;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--color-orange);
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

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

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

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

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

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 24%, rgba(251, 146, 60, 0.36), transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.58) 50%, rgba(0, 0, 0, 0.16) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
}

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

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-orange);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-kicker {
  padding: 9px 16px;
  color: #ffffff;
  background: rgba(234, 88, 12, 0.90);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero p {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-tags,
.detail-tags,
.movie-tags,
.ranking-tags,
.detail-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.detail-tags span,
.movie-tags span,
.ranking-tags span,
.detail-facts span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #92400e;
  background: #fffbeb;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

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

.primary-button,
.ghost-button,
.text-button,
.section-link,
.search-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.primary-button {
  min-height: 48px;
  padding: 0 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
  box-shadow: var(--shadow-soft);
}

.ghost-button {
  min-height: 48px;
  padding: 0 24px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover,
.section-link:hover,
.search-more:hover {
  transform: translateY(-2px);
}

.small-button {
  min-height: 40px;
  padding: 0 18px;
}

.hero-controls {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-controls button {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.search-panel {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: -34px;
  padding: 18px;
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: var(--radius-large);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.search-box {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: #ffffff;
}

.search-box span {
  color: var(--color-orange);
  font-size: 20px;
  font-weight: 900;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  border: 0;
  outline: none;
  color: var(--color-text);
  background: transparent;
}

.search-more,
.section-link,
.text-button {
  color: var(--color-orange);
}

.category-strip,
.content-section {
  padding: 68px 0 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.compact-head {
  margin-bottom: 18px;
}

.section-head h2,
.page-hero h1,
.detail-card h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

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

.category-chip {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-medium);
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  box-shadow: 0 12px 28px rgba(234, 88, 12, 0.08);
}

.category-chip strong {
  color: #9a3412;
  font-size: 20px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-medium);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: #fdba74;
  box-shadow: var(--shadow-card);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #fff7ed, #fde68a);
}

.poster-link img,
.ranking-poster img,
.side-poster img,
.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-red), var(--color-amber));
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.25);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 24px;
  color: var(--color-orange);
  font-size: 12px;
  font-weight: 800;
}

.movie-meta-line span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #fdba74;
}

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

.movie-card h3 a:hover,
.ranking-info h3 a:hover {
  color: var(--color-orange);
}

.movie-card p {
  margin: 0 0 14px;
  color: var(--color-muted);
  font-size: 14px;
}

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

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

.page-main {
  padding-top: 34px;
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 260px;
  padding: 38px;
  border-radius: var(--radius-large);
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.20), transparent 26%),
    linear-gradient(135deg, #7c2d12, var(--color-orange) 52%, var(--color-amber));
  box-shadow: var(--shadow-soft);
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.page-hero .section-kicker {
  color: #ffedd5;
}

.small-hero,
.channel-hero,
.search-hero,
.ranking-hero {
  min-height: 220px;
}

.slim-search {
  max-width: 420px;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.category-large-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding: 34px 0 68px;
}

.category-card-large {
  overflow: hidden;
  display: grid;
  grid-template-columns: 42% 1fr;
  min-height: 260px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-large);
  background: #ffffff;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.07);
}

.category-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  background: #fff7ed;
}

.category-large-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 28px;
}

.category-large-body span {
  color: var(--color-orange);
  font-weight: 800;
}

.category-large-body h2 {
  margin: 0;
  font-size: 28px;
}

.category-large-body p {
  margin: 0;
  color: var(--color-muted);
}

.channel-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 22px 0 0;
}

.channel-tabs a {
  padding: 9px 14px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  color: #374151;
  background: #ffffff;
  font-weight: 800;
}

.channel-tabs a.active,
.channel-tabs a:hover {
  color: #ffffff;
  border-color: var(--color-orange);
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
}

.flush-section {
  width: 100%;
  padding-bottom: 68px;
}

.ranking-list {
  display: grid;
  gap: 14px;
  padding: 34px 0 68px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 70px 150px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-medium);
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.ranking-number {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
  font-weight: 900;
}

.ranking-poster {
  display: block;
  height: 92px;
  overflow: hidden;
  border-radius: 14px;
  background: #fff7ed;
}

.ranking-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-info p {
  margin: 0 0 10px;
  color: var(--color-muted);
}

.detail-main {
  padding-bottom: 70px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 22px;
  color: var(--color-muted);
  font-weight: 700;
}

.breadcrumbs a:hover {
  color: var(--color-orange);
}

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

.detail-primary {
  display: grid;
  gap: 22px;
}

.player-card,
.detail-card,
.side-card {
  border: 1px solid var(--color-line);
  border-radius: var(--radius-large);
  background: #ffffff;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
}

.player-card {
  overflow: hidden;
  background: #0f172a;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.46));
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
}

.player-play {
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
  box-shadow: 0 20px 50px rgba(234, 88, 12, 0.38);
  cursor: pointer;
  pointer-events: auto;
}

.detail-card {
  padding: 28px;
}

.detail-title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.detail-facts {
  margin-bottom: 16px;
}

.detail-tags {
  margin-bottom: 18px;
}

.detail-card .one-line {
  color: #9a3412;
  padding: 18px;
  border-radius: var(--radius-medium);
  background: var(--color-soft);
  font-weight: 800;
}

.detail-card h2 {
  margin: 26px 0 10px;
  font-size: 22px;
}

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

.detail-pager {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
}

.detail-pager a {
  flex: 1;
  padding: 12px 16px;
  border-radius: 999px;
  color: var(--color-orange);
  background: var(--color-soft);
  text-align: center;
  font-weight: 800;
}

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

.side-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-large);
  background: #fff7ed;
  box-shadow: var(--shadow-card);
}

.side-card {
  padding: 22px;
}

.side-card h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px 14px;
  margin: 0;
}

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

.side-card dd {
  margin: 0;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid var(--color-line);
  background: linear-gradient(180deg, #fff7ed, #ffffff);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 40px;
  padding: 46px 0;
}

.footer-brand p {
  max-width: 640px;
  color: var(--color-muted);
}

.footer-column {
  display: grid;
  gap: 8px;
  align-content: start;
}

.footer-column h3 {
  margin: 0 0 8px;
}

.footer-column a {
  color: var(--color-muted);
}

.footer-column a:hover {
  color: var(--color-orange);
}

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

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

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

  .detail-sidebar {
    grid-template-columns: 220px 1fr;
  }
}

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

  .menu-button {
    display: block;
  }

  .mobile-nav.open {
    display: grid;
    gap: 4px;
  }

  .hero {
    min-height: 620px;
  }

  .search-panel,
  .page-hero,
  .section-head,
  .detail-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .category-chip-grid,
  .movie-grid,
  .search-grid,
  .hot-grid,
  .category-large-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-card-large {
    grid-template-columns: 1fr;
  }

  .category-cover {
    min-height: 180px;
  }

  .ranking-row {
    grid-template-columns: 48px 110px 1fr;
    gap: 12px;
  }

  .ranking-poster {
    height: 76px;
  }

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

@media (max-width: 560px) {
  .header-inner,
  .footer-inner,
  .content-section,
  .category-strip,
  .search-panel,
  .page-main,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

  .brand-text small {
    display: none;
  }

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

  .movie-grid,
  .search-grid,
  .hot-grid,
  .category-chip-grid,
  .category-large-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 28px;
  }

  .ranking-row {
    grid-template-columns: 42px 1fr;
  }

  .ranking-poster {
    display: none;
  }

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