:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --amber: #f59e0b;
  --dark: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 12px 25px rgba(234, 88, 12, 0.35);
}

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

.brand-text strong {
  font-size: 20px;
  line-height: 1;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  flex: 1;
  min-width: 0;
}

.nav-link {
  color: #334155;
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
  transition: color 0.2s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: #fff7ed;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--orange);
  border-radius: 99px;
}

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

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 10px;
  color: #334155;
  background: #f8fafc;
}

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

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: var(--dark);
}

.hero-stage {
  position: relative;
  min-height: 70vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, visibility 0.7s ease, transform 1.8s ease;
  transform: scale(1.03);
}

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

.hero-content {
  width: min(1180px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 92px 0 138px;
  color: #fff;
}

.hero-kicker,
.section-title span,
.page-hero span {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: #fed7aa;
  background: rgba(234, 88, 12, 0.18);
  border: 1px solid rgba(251, 146, 60, 0.28);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 750;
}

.hero-content h1 {
  max-width: 820px;
  margin: 18px 0 16px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-content p {
  max-width: 680px;
  margin: 0;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-tags,
.detail-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span,
.detail-badges span,
.detail-badges a {
  display: inline-flex;
  align-items: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 14px 30px rgba(234, 88, 12, 0.34);
}

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

.primary-btn.inline {
  margin-top: 10px;
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  gap: 14px;
}

.hero-dots {
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 36px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dot.is-active {
  background: #fff;
}

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

.hero-thumb {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 8px;
  backdrop-filter: blur(14px);
  opacity: 0.76;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  opacity: 1;
  border-color: rgba(251, 146, 60, 0.65);
}

.hero-thumb img {
  width: 50px;
  height: 58px;
  object-fit: cover;
  border-radius: 10px;
  background: #1f2937;
}

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

.section {
  padding: 64px 0;
}

.section-soft {
  background: #fff7ed;
}

.section-search {
  margin-top: -1px;
  background: #fff;
}

.section-title {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
}

.section-title.centered {
  text-align: center;
  justify-items: center;
}

.section-title span,
.page-hero span {
  color: var(--orange-dark);
  background: #ffedd5;
  border-color: #fed7aa;
}

.section-title h2,
.page-hero h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.section-title p,
.page-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 150px;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 15px;
  background: #f8fafc;
  border-radius: 14px;
}

.search-box input,
.search-panel select {
  width: 100%;
  min-height: 48px;
  border: 0;
  outline: 0;
  color: #1f2937;
  background: #f8fafc;
  border-radius: 14px;
}

.search-panel select {
  padding: 0 12px;
}

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

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
}

.movie-poster {
  position: relative;
  display: block;
  height: 280px;
  overflow: hidden;
  background: #111827;
}

.library-grid .movie-poster {
  height: 230px;
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease, opacity 0.25s ease;
}

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

.play-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.duration,
.rank-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  left: 10px;
  right: auto;
  top: 10px;
  bottom: auto;
  background: linear-gradient(135deg, var(--orange), var(--amber));
}

.movie-info {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.meta-row a {
  color: var(--orange-dark);
  background: #fff7ed;
  border-radius: 999px;
  padding: 4px 8px;
  font-weight: 800;
}

.movie-info h3 {
  min-height: 48px;
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

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

.movie-info p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span,
.detail-tags a {
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
}

.ranking-layout {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 34px;
  align-items: start;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 38px 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 16px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(249, 115, 22, 0.45);
}

.rank-num {
  color: var(--orange);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 82px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
  background: #111827;
}

.rank-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-copy strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy em {
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-rank {
  color: #fff;
  background: var(--orange);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

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

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

.category-tile {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  overflow: hidden;
  padding: 22px;
  color: #fff;
  background-size: cover;
  background-position: center;
  border-radius: 22px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.15);
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.2);
}

.category-tile span {
  font-size: 24px;
  font-weight: 900;
}

.category-tile strong {
  color: #ffedd5;
  font-size: 14px;
  line-height: 1.8;
}

.page-hero {
  padding: 76px 0 46px;
  background: radial-gradient(circle at 18% 0%, rgba(251, 146, 60, 0.22), transparent 30%), linear-gradient(135deg, #fff7ed, #ffffff 58%, #f8fafc);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.page-hero .container {
  display: grid;
  gap: 14px;
}

.breadcrumb,
.breadcrumb-line a {
  color: var(--orange-dark);
  font-weight: 800;
}

.detail-head {
  padding: 28px 0 0;
  background: #fff;
}

.breadcrumb-line {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}

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

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

.detail-main,
.detail-side {
  min-width: 0;
}

.video-frame {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: 22px;
  box-shadow: 0 25px 65px rgba(15, 23, 42, 0.28);
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.65));
  border: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start span {
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  font-size: 30px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.player-start strong {
  font-size: 18px;
}

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

.detail-copy {
  display: grid;
  gap: 20px;
  padding-top: 24px;
}

.detail-badges {
  margin-top: 0;
}

.detail-badges span,
.detail-badges a {
  color: var(--orange-dark);
  background: #fff7ed;
  border-color: #fed7aa;
}

.detail-copy h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.lead {
  margin: 0;
  color: #475569;
  font-size: 18px;
  line-height: 1.8;
}

.content-card,
.poster-card,
.side-card {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.content-card {
  padding: 24px;
}

.content-card.warm {
  background: linear-gradient(135deg, #fff7ed, #ffffff);
}

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

.content-card p {
  margin: 0;
  color: #334155;
  line-height: 1.9;
}

.detail-tags a {
  padding: 8px 12px;
}

.detail-side {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 16px;
}

.poster-card {
  overflow: hidden;
}

.poster-card img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  background: #111827;
}

.poster-card div {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.poster-card strong {
  font-size: 18px;
}

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

.side-card {
  padding: 16px;
}

.rank-list.compact .rank-row {
  grid-template-columns: 74px minmax(0, 1fr);
}

.rank-list.compact .rank-num,
.rank-list.compact .mini-rank {
  display: none;
}

.rank-list.compact .rank-row img {
  width: 74px;
  height: 52px;
}

.empty-state {
  display: none;
  margin-top: 24px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

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

.brand-footer .brand-text strong {
  color: #fff;
}

.footer-brand p {
  max-width: 580px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 18px;
}

.footer-links div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.footer-links a:hover {
  color: #fff;
  background: rgba(234, 88, 12, 0.42);
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  text-align: center;
}

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

  .menu-toggle {
    display: inline-flex;
  }

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

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

  .ranking-layout,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 68px;
  }

  .brand-text small {
    display: none;
  }

  .hero,
  .hero-stage,
  .hero-content {
    min-height: 76vh;
  }

  .hero-content {
    padding-bottom: 190px;
  }

  .hero-tags,
  .hero-actions {
    gap: 8px;
  }

  .hero-thumbs {
    display: none;
  }

  .search-panel {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .featured-grid,
  .library-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-poster,
  .library-grid .movie-poster {
    height: 220px;
  }

  .movie-info {
    padding: 12px;
  }

  .rank-row {
    grid-template-columns: 32px 72px minmax(0, 1fr);
  }

  .mini-rank {
    display: none;
  }

  .detail-copy h1 {
    letter-spacing: -0.025em;
  }

  .poster-card img {
    height: 360px;
  }
}

@media (max-width: 460px) {
  .brand-text strong {
    font-size: 17px;
  }

  .movie-grid,
  .featured-grid,
  .library-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

  .movie-poster,
  .library-grid .movie-poster {
    height: 300px;
  }

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