* {
  box-sizing: border-box;
}

:root {
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-soft: #fff7ed;
  --accent-soft: #fdf8f6;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f9fafb;
  --card: #ffffff;
  --dark: #111827;
  --shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.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);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--dark);
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #fb923c);
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.35);
}

.logo-text {
  white-space: nowrap;
  font-size: 18px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #374151;
  font-weight: 600;
}

.main-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
  color: var(--primary-dark);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(360px, 36vw);
  background: #f3f4f6;
  border: 1px solid transparent;
  border-radius: 999px;
  overflow: hidden;
}

.header-search:focus-within {
  border-color: rgba(249, 115, 22, 0.55);
  background: #ffffff;
}

.header-search input {
  width: 100%;
  border: 0;
  background: transparent;
  outline: 0;
  padding: 11px 14px 11px 18px;
}

.header-search button {
  border: 0;
  background: var(--primary);
  color: #ffffff;
  padding: 11px 18px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--dark);
  border-radius: 10px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: 12px 16px 18px;
}

.mobile-panel a {
  display: block;
  padding: 10px 0;
  font-weight: 700;
}

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

.hero-track,
.hero-slide,
.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-overlay {
  background:
    radial-gradient(circle at 78% 35%, rgba(249, 115, 22, 0.28), transparent 30%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.96) 0%, rgba(17, 24, 39, 0.82) 42%, rgba(17, 24, 39, 0.28) 78%, rgba(17, 24, 39, 0.78) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.98) 0%, rgba(17, 24, 39, 0.12) 45%, rgba(17, 24, 39, 0.45) 100%);
}

.hero-content {
  position: relative;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 86px 0 106px;
}

.hero-copy {
  max-width: 740px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 660px;
  margin: 22px 0 0;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.86);
}

.hero-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags {
  margin: 26px 0 0;
}

.hero-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 7px 12px;
}

.card-tags span {
  color: var(--primary-dark);
  background: var(--primary-soft);
  padding: 5px 9px;
}

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

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

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

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

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-poster {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  transform: perspective(900px) rotateY(-8deg);
}

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

.hero-poster span {
  position: absolute;
  left: 22px;
  bottom: 22px;
  padding: 9px 16px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hero-dots,
.hero-arrows {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot,
.hero-prev,
.hero-next {
  border: 0;
  cursor: pointer;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dot.active {
  width: 34px;
  background: var(--primary);
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 30px;
  line-height: 1;
}

.quick-search {
  position: relative;
  margin-top: -36px;
  z-index: 3;
}

.quick-panel {
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.quick-panel form {
  display: flex;
  gap: 12px;
}

.quick-panel input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  outline: 0;
  padding: 14px 16px;
}

.quick-panel input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(249, 115, 22, 0.65);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.quick-panel button {
  border: 0;
  border-radius: 16px;
  color: #ffffff;
  background: var(--primary);
  padding: 0 26px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.category-chips a {
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 8px 13px;
  font-weight: 700;
}

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

.soft-section {
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
}

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

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

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more,
.ranking-more {
  color: var(--primary-dark);
  font-weight: 800;
}

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

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

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

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

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

.card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), transparent 52%);
  opacity: 0.85;
}

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

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

.card-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.62);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 12px 0 6px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.rank-card h2 a:hover {
  color: var(--primary-dark);
}

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

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: #9ca3af;
  font-size: 13px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 36px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 96px;
  border-radius: 24px;
  padding: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.ranking-panel h2 {
  margin: 0 0 18px;
}

.ranking-panel ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ranking-panel li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.ranking-panel li span,
.rank-index {
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 800;
}

.ranking-panel li span {
  width: 30px;
  height: 30px;
}

.ranking-panel li a {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 700;
}

.ranking-panel li em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.ranking-more {
  display: inline-flex;
  margin-top: 18px;
}

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

.category-card {
  position: relative;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  border-radius: 22px;
  padding: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-card strong {
  font-size: 21px;
  color: var(--dark);
}

.category-card span,
.category-card em {
  margin-top: 8px;
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.category-card.large {
  min-height: 260px;
  color: #ffffff;
}

.category-card.large img,
.category-layer {
  position: absolute;
  inset: 0;
}

.category-card.large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-layer {
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.9), rgba(17, 24, 39, 0.18));
}

.category-card.large strong,
.category-card.large em {
  position: relative;
  color: #ffffff;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 75% 10%, rgba(249, 115, 22, 0.35), transparent 26%),
    linear-gradient(135deg, #111827, #1f2937 55%, #7c2d12);
}

.slim-hero {
  padding: 74px 0;
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
}

.breadcrumb {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.ranking-list-page {
  display: grid;
  gap: 18px;
}

.rank-card {
  display: grid;
  grid-template-columns: 52px 128px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  border-radius: 24px;
  padding: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.rank-index {
  width: 52px;
  height: 52px;
  font-size: 20px;
}

.rank-cover {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

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

.rank-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.detail-backdrop,
.detail-mask {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.1);
  transform: scale(1.04);
}

.detail-mask {
  background:
    radial-gradient(circle at 78% 20%, rgba(249, 115, 22, 0.24), transparent 32%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.78)),
    linear-gradient(0deg, #111827 0%, rgba(17, 24, 39, 0.28) 58%, rgba(17, 24, 39, 0.7) 100%);
}

.detail-hero-inner {
  position: relative;
  padding: 58px 0 68px;
}

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

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 64px);
}

.detail-one-line {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.24));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 22px 42px rgba(249, 115, 22, 0.36);
  font-size: 34px;
}

.player-title {
  position: absolute;
  left: 28px;
  bottom: 24px;
  font-size: 22px;
  font-weight: 800;
}

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

.detail-article h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

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

.detail-article p {
  margin: 0;
  color: #374151;
  font-size: 17px;
}

.detail-meta-box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.detail-meta-box span {
  border-radius: 12px;
  background: #f3f4f6;
  padding: 10px 12px;
  color: #374151;
  font-weight: 700;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
  padding: 48px 0 22px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
}

.footer-logo {
  color: #ffffff;
  font-size: 22px;
}

.site-footer p {
  max-width: 640px;
  margin: 14px 0 0;
  color: #9ca3af;
}

.footer-links {
  display: grid;
  gap: 10px;
  font-weight: 700;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 20px;
  border-top: 1px solid #1f2937;
  color: #9ca3af;
  font-size: 14px;
}

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

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

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .main-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

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

  .hero,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 54px;
  }

  .hero-poster {
    width: min(260px, 72vw);
    transform: none;
  }

  .hero-controls {
    bottom: 22px;
  }

  .quick-panel form,
  .filter-panel,
  .detail-grid,
  .rank-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .quick-panel form {
    display: grid;
  }

  .detail-poster {
    width: min(260px, 70vw);
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    height: 64px;
  }

  .logo-mark {
    width: 38px;
    height: 38px;
  }

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

  .hero,
  .hero-content {
    min-height: 680px;
  }

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

  .hero p,
  .detail-one-line {
    font-size: 16px;
  }

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

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

  .card-body {
    padding: 13px;
  }

  .card-body h3 {
    font-size: 16px;
  }

  .card-body p {
    font-size: 13px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .rank-cover {
    width: 118px;
  }

  .detail-article {
    padding: 22px;
  }

  .player-play {
    width: 72px;
    height: 72px;
    font-size: 26px;
  }

  .player-title {
    left: 18px;
    bottom: 16px;
    font-size: 17px;
  }
}
