:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --amber: #f59e0b;
  --blue: #2563eb;
  --green: #16a34a;
  --red: #dc2626;
  --text: #1f2937;
  --muted: #6b7280;
  --soft: #fff7ed;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 16px 35px rgba(15, 23, 42, 0.09);
  --shadow-strong: 0 28px 70px rgba(15, 23, 42, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.site-container {
  width: min(1280px, 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(229, 231, 235, 0.85);
  backdrop-filter: blur(18px);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}

.site-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--orange), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  border-radius: 999px;
  font-size: 14px;
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.32);
}

.nav-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
}

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

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

.top-search {
  width: min(360px, 34vw);
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  overflow: hidden;
}

.top-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  background: transparent;
}

.top-search button,
.search-band button,
.filter-panel button {
  border: 0;
  color: #fff;
  background: var(--orange);
  padding: 10px 18px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.top-search button:hover,
.search-band button:hover,
.filter-panel button:hover {
  background: var(--orange-dark);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #374151;
  font-size: 28px;
}

.hero-section {
  padding: 32px 0 18px;
}

.hero-title-panel {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.hero-title-panel h1 {
  margin: 0 0 6px;
  font-size: clamp(32px, 5vw, 60px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.06em;
  color: #111827;
}

.hero-title-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

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

.hero-links a,
.quick-links a,
.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-links a,
.quick-links a,
.secondary-btn {
  color: var(--orange-dark);
  background: #ffedd5;
}

.hero-links a:hover,
.quick-links a:hover,
.secondary-btn:hover,
.primary-btn:hover {
  transform: translateY(-2px);
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.32);
}

.primary-btn.full {
  width: 100%;
}

.hero-shell {
  position: relative;
  height: 500px;
  overflow: hidden;
  border-radius: 28px;
  background: #111827;
  box-shadow: var(--shadow-strong);
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.44) 45%, rgba(0, 0, 0, 0.08)), linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 58%);
}

.hero-copy {
  position: absolute;
  left: clamp(24px, 5vw, 64px);
  bottom: clamp(28px, 5vw, 64px);
  width: min(680px, calc(100% - 48px));
  color: #fff;
}

.hero-label {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 15px;
  background: var(--orange);
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

.hero-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.04;
  font-weight: 900;
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 18px;
  color: #e5e7eb;
  font-size: 18px;
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.hero-meta span {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

.hero-dots button.is-active {
  width: 34px;
  background: #fff;
}

.search-band {
  margin-top: 22px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(249, 115, 22, 0.16);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.search-band form {
  flex: 1;
  display: flex;
  min-width: 280px;
  overflow: hidden;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff;
}

.search-band input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 14px 18px;
}

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

.content-section {
  padding: 42px 0;
}

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

.section-heading span {
  display: block;
  margin-bottom: 4px;
  color: var(--orange);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
  color: #111827;
}

.section-heading a {
  color: var(--orange-dark);
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
  background: var(--card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-box {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #111827;
}

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

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

.corner-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  color: #fff;
  background: var(--orange);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: #111827;
}

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

.movie-card h3 {
  min-height: 44px;
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.38;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

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

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

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 26px;
  margin-bottom: 12px;
}

.movie-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  color: var(--orange-dark);
  background: #ffedd5;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

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

.category-card,
.category-overview-card a {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 22px;
  border-radius: 20px;
  color: #fff;
  box-shadow: var(--shadow);
}

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

.category-card::after,
.category-overview-card a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.2));
}

.category-card:hover img,
.category-overview-card:hover img {
  transform: scale(1.08);
}

.category-card span,
.category-card p,
.category-overview-card div {
  position: relative;
  z-index: 2;
}

.category-card span,
.category-overview-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p,
.category-overview-card p {
  margin: 0;
  color: #e5e7eb;
  line-height: 1.6;
}

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

.category-overview-card {
  border-radius: 22px;
  overflow: hidden;
}

.category-overview-card a {
  min-height: 260px;
}

.category-overview-card span {
  display: block;
  margin-top: 14px;
  color: #fed7aa;
  line-height: 1.6;
}

.page-hero {
  padding: 52px 0;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--amber));
}

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

.search-hero {
  background: linear-gradient(135deg, #2563eb, #14b8a6);
}

.category-hero {
  background: linear-gradient(135deg, var(--orange), #fb923c);
}

.page-hero h1 {
  margin: 12px 0 10px;
  font-size: clamp(34px, 4vw, 54px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

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

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

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

.detail-breadcrumb {
  margin: 26px 0;
  color: #6b7280;
}

.detail-breadcrumb strong {
  color: #111827;
}

.filter-panel {
  margin-top: -28px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.7fr repeat(3, 1fr) auto;
  gap: 12px;
  padding: 18px;
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 0 14px;
  outline: 0;
  background: #fff;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}

.filter-panel button {
  border-radius: 12px;
  min-width: 86px;
}

.empty-state {
  margin-top: 24px;
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

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

.rank-row a {
  display: grid;
  grid-template-columns: 54px 96px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

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

.rank-row img {
  width: 96px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-content strong,
.rank-content em,
.rank-content b {
  display: block;
}

.rank-content strong {
  margin-bottom: 6px;
  font-size: 18px;
}

.rank-content em {
  margin-bottom: 6px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-content b {
  color: var(--orange-dark);
  font-size: 13px;
}

.detail-wrap {
  padding-bottom: 52px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.movie-detail-card,
.side-card {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-card {
  margin-bottom: 24px;
}

.player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.player-stage video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.2));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.36);
  font-size: 30px;
}

.player-error {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #fff;
  background: rgba(0, 0, 0, 0.78);
  text-align: center;
}

.movie-detail-card {
  padding: clamp(22px, 4vw, 36px);
}

.movie-detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  font-weight: 900;
  color: #111827;
}

.detail-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-meta span {
  padding: 7px 12px;
  color: #374151;
  background: #f3f4f6;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.movie-detail-card h2,
.side-card h2 {
  margin: 28px 0 12px;
  font-size: 22px;
  font-weight: 900;
}

.movie-detail-card p {
  margin: 0 0 14px;
  color: #4b5563;
  line-height: 1.9;
  font-size: 16px;
}

.lead-text {
  color: #111827 !important;
  font-size: 18px !important;
  font-weight: 700;
}

.detail-nav-links {
  display: grid;
  gap: 10px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.detail-nav-links a {
  color: var(--orange-dark);
  font-weight: 800;
}

.detail-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 20px;
}

.side-card {
  padding: 20px;
}

.cover-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 16px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #f9fafb;
  transition: background 0.2s ease, transform 0.2s ease;
}

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

.related-item img {
  width: 92px;
  height: 68px;
  object-fit: cover;
  border-radius: 10px;
}

.related-item strong,
.related-item em {
  display: block;
}

.related-item strong {
  margin-bottom: 5px;
  font-size: 14px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.site-footer {
  margin-top: 28px;
  background: linear-gradient(180deg, #f9fafb, #f3f4f6);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
  padding: 44px 0;
}

.footer-grid p {
  max-width: 520px;
  color: #6b7280;
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 900;
}

.footer-grid a:not(.footer-logo) {
  display: block;
  margin: 8px 0;
  color: #6b7280;
}

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

.footer-bottom {
  padding: 18px 16px;
  text-align: center;
  color: #6b7280;
  border-top: 1px solid var(--line);
}

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

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

@media (max-width: 880px) {
  .site-nav {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: block;
  }

  .nav-panel {
    display: none;
    width: 100%;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-bottom: 16px;
  }

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

  .top-search {
    width: 100%;
  }

  .hero-title-panel,
  .search-band,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-links {
    justify-content: flex-start;
  }

  .hero-shell {
    height: 520px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18));
  }

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

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

  .detail-side {
    position: static;
  }

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

  .filter-panel input {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .site-container {
    width: min(100% - 22px, 1280px);
  }

  .site-logo {
    font-size: 22px;
  }

  .hero-section {
    padding-top: 22px;
  }

  .hero-shell {
    height: 560px;
    border-radius: 22px;
  }

  .hero-copy {
    left: 18px;
    bottom: 24px;
    width: calc(100% - 36px);
  }

  .hero-copy p {
    -webkit-line-clamp: 3;
  }

  .hero-dots {
    left: 18px;
    right: auto;
    bottom: 14px;
  }

  .search-band form {
    min-width: 100%;
  }

  .movie-grid,
  .ranking-grid {
    gap: 14px;
  }

  .poster-box {
    height: 180px;
  }

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

  .movie-card h3 {
    font-size: 14px;
  }

  .movie-card p,
  .movie-tags {
    display: none;
  }

  .category-grid,
  .category-overview-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .rank-row a {
    grid-template-columns: 42px 74px 1fr;
    gap: 12px;
  }

  .rank-row img {
    width: 74px;
    height: 58px;
  }

  .rank-content em {
    display: none;
  }

  .related-item {
    grid-template-columns: 78px 1fr;
  }

  .related-item img {
    width: 78px;
    height: 58px;
  }
}
