:root {
  --brand: #f97316;
  --brand-dark: #c2410c;
  --brand-soft: #ffedd5;
  --ink: #111827;
  --muted: #6b7280;
  --paper: #ffffff;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --shadow: 0 20px 45px rgba(17, 24, 39, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #fff7ed 0, #ffffff 360px, #f9fafb 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(135deg, #ea580c 0%, #f97316 45%, #a855f7 100%);
  box-shadow: 0 12px 30px rgba(194, 65, 12, 0.22);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 13px;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 15px;
  font-weight: 650;
}

.main-nav a,
.mobile-panel a {
  opacity: 0.92;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.nav-search {
  position: relative;
  width: 260px;
  flex: 0 0 auto;
}

.nav-search input,
.mobile-search input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  outline: none;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(10px);
  padding: 10px 48px 10px 18px;
  transition: background 0.2s ease, box-shadow 0.2s ease, width 0.2s ease;
}

.nav-search input::placeholder,
.mobile-search input::placeholder {
  color: #ffedd5;
}

.nav-search input:focus,
.mobile-search input:focus {
  background: rgba(255, 255, 255, 0.30);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28);
}

.nav-search button,
.mobile-search button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding: 14px 0 18px;
}

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

.mobile-panel .mobile-links {
  display: grid;
  gap: 10px;
}

.mobile-panel a {
  display: block;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.10);
}

.mobile-search {
  position: relative;
  margin-top: 12px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.85s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 22%, rgba(249, 115, 22, 0.38), transparent 34%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.83) 0%, rgba(0, 0, 0, 0.60) 46%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.88) 0%, rgba(17, 24, 39, 0.05) 44%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 760px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 14px;
  color: #ffedd5;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 20px 0 16px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 700px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: clamp(16px, 2.2vw, 21px);
}

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

.tag,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 11px;
  color: #7c2d12;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags .tag {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-actions,
.section-head,
.card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-actions {
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 12px 25px rgba(249, 115, 22, 0.28);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(249, 115, 22, 0.34);
}

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.32);
  box-shadow: none;
}

.btn-light {
  color: #9a3412;
  background: #ffffff;
  box-shadow: 0 14px 26px rgba(255, 255, 255, 0.18);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

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

main {
  min-height: 70vh;
}

.section {
  padding: 56px 0 0;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-title h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.section-mark {
  width: 6px;
  height: 34px;
  border-radius: 999px;
  background: var(--brand);
}

.more-link {
  color: var(--brand-dark);
  font-weight: 800;
}

.horizontal-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 320px);
  gap: 22px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x mandatory;
}

.horizontal-track .movie-card {
  scroll-snap-align: start;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.poster-link img,
.category-card img,
.detail-poster img,
.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.66) 100%);
}

.card-badge,
.card-rating {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-badge {
  left: 12px;
  background: rgba(249, 115, 22, 0.90);
}

.card-rating {
  right: 12px;
  background: rgba(0, 0, 0, 0.50);
}

.card-body {
  padding: 18px;
}

.card-body h2,
.card-body h3,
.rank-body h2,
.rank-body h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 850;
}

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

.card-meta {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #4b5563;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.category-panel {
  border-radius: 32px;
  background: linear-gradient(135deg, #eff6ff, #faf5ff 55%, #fff7ed);
  padding: 34px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  border-radius: 24px;
  color: #ffffff;
  background: #111827;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.12);
}

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

.category-card-content {
  position: absolute;
  z-index: 2;
  inset: auto 18px 18px;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 6px;
  font-size: 21px;
  line-height: 1.2;
}

.category-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #e5e7eb;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-radius: 22px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.07);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #a855f7);
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  background: #111827;
}

.rank-body p {
  margin: 0;
  color: #4b5563;
}

.rank-score {
  color: #f59e0b;
  font-weight: 900;
  white-space: nowrap;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #ea580c 0%, #f97316 50%, #7e22ce 100%);
  padding: 70px 0;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.28), transparent 28%);
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  color: #ffedd5;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px 160px;
  gap: 14px;
  border-radius: 26px;
  margin-top: 28px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.filter-input,
.filter-select {
  border-color: rgba(255, 255, 255, 0.30);
  color: #ffffff;
  padding-right: 18px;
}

.filter-select option {
  color: #111827;
}

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

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--detail-image) center / cover no-repeat;
  filter: blur(12px) scale(1.08);
  opacity: 0.35;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 20%, rgba(249, 115, 22, 0.35), transparent 28%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.70));
}

.detail-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 8px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: #111827;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.42);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #ffedd5;
  font-size: 14px;
  font-weight: 700;
}

.detail-copy h1 {
  font-size: clamp(36px, 5.8vw, 64px);
  line-height: 1.08;
}

.detail-lead {
  max-width: 820px;
  color: #e5e7eb;
  font-size: 19px;
}

.detail-meta {
  margin: 20px 0;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
  gap: 28px;
  padding-top: 42px;
}

.player-card,
.detail-text,
.side-card {
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.09);
}

.player-card {
  overflow: hidden;
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #050505;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 18px 36px rgba(249, 115, 22, 0.34);
  font-size: 32px;
}

.player-title {
  padding: 18px 22px;
}

.player-title h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
}

.detail-text {
  margin-top: 22px;
  padding: 26px;
}

.detail-text h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
}

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

.side-card {
  padding: 22px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  transition: background 0.2s ease;
}

.compact-card:hover {
  background: #f9fafb;
}

.compact-card img {
  width: 92px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  background: #111827;
}

.compact-card h3 {
  margin: 0 0 5px;
  font-size: 16px;
  line-height: 1.25;
}

.compact-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #6b7280;
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.no-results {
  display: none;
  border-radius: 24px;
  margin-top: 24px;
  padding: 28px;
  color: #7c2d12;
  background: #ffedd5;
  font-weight: 800;
}

.no-results.is-visible {
  display: block;
}

.site-footer {
  margin-top: 72px;
  color: #d1d5db;
  background: #111827;
}

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

.footer-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

.footer-grid p,
.footer-grid a {
  margin: 0 0 10px;
  color: #9ca3af;
}

.footer-grid a:hover {
  color: #fb923c;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding: 18px 0;
  color: #9ca3af;
  font-size: 14px;
}

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

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

  .nav-search {
    width: 220px;
  }
}

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

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero {
    height: 540px;
  }

  .hero-control {
    display: none;
  }

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

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

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

  .detail-poster {
    max-width: 300px;
  }

  .rank-item {
    grid-template-columns: 42px 96px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
  }
}

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

  .brand {
    font-size: 18px;
  }

  .hero {
    height: 520px;
  }

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

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

  .section {
    padding-top: 42px;
  }

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

  .horizontal-track {
    grid-auto-columns: minmax(240px, 84vw);
  }

  .category-panel {
    padding: 22px;
    border-radius: 24px;
  }

  .rank-item {
    grid-template-columns: 38px 82px minmax(0, 1fr);
    gap: 12px;
  }

  .card-body h2,
  .card-body h3 {
    font-size: 18px;
  }
}
