:root {
  --bg: #fff7ed;
  --bg-soft: #fffbf5;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #fed7aa;
  --primary: #ea580c;
  --primary-dark: #9a3412;
  --accent: #f59e0b;
  --shadow: 0 20px 45px rgba(124, 45, 18, 0.12);
  --shadow-soft: 0 12px 30px rgba(124, 45, 18, 0.09);
  --radius: 24px;
  --radius-sm: 16px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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;
  color: #ffffff;
  background: linear-gradient(90deg, #92400e 0%, #c2410c 45%, #9a3412 100%);
  box-shadow: 0 10px 30px rgba(124, 45, 18, 0.22);
}

.header-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-name {
  font-size: 22px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #9a3412;
  background: #fef3c7;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #78350f;
  background: #ffffff;
}

.search-form,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.search-form input,
.mobile-search input,
.filter-input,
.filter-select {
  border: 0;
  outline: 0;
  min-width: 210px;
  color: #7c2d12;
  background: #ffffff;
  border-radius: 999px;
  padding: 10px 14px;
}

.search-form button,
.mobile-search button,
.btn,
.btn-ghost {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  transition: 0.25s ease;
}

.search-form button,
.mobile-search button,
.btn {
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  box-shadow: 0 12px 26px rgba(220, 38, 38, 0.28);
}

.search-form button:hover,
.mobile-search button:hover,
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(220, 38, 38, 0.34);
}

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.28);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 10px;
}

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

.mobile-nav {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.hero {
  position: relative;
  min-height: 620px;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 76% 28%, rgba(251, 146, 60, 0.5), transparent 30%), linear-gradient(120deg, #78350f 0%, #9a3412 43%, #431407 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.32) 1px, transparent 1px);
  background-size: 34px 34px;
  animation: floatGlow 18s linear infinite;
}

.hero-slider {
  position: relative;
  z-index: 2;
}

.hero-slide {
  display: none;
  align-items: center;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  min-height: 620px;
  padding: 68px 0;
}

.hero-slide.active {
  display: grid;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fde68a;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 18px 0 22px;
  max-width: 760px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0;
  max-width: 660px;
  color: rgba(255, 255, 255, 0.85);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #7c2d12;
  background: #ffedd5;
  font-weight: 800;
  font-size: 13px;
}

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

.hero-media {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  min-height: 420px;
  box-shadow: 0 38px 70px rgba(67, 20, 7, 0.42);
  background: linear-gradient(135deg, #f97316, #7c2d12);
}

.hero-media::after,
.poster::after,
.detail-poster::after,
.rank-poster::after,
.compact-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.58) 100%);
  pointer-events: none;
}

.hero-media img,
.poster img,
.detail-poster img,
.rank-poster img,
.compact-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.45s ease;
}

.hero-media img.image-hidden,
.poster img.image-hidden,
.detail-poster img.image-hidden,
.rank-poster img.image-hidden,
.compact-cover img.image-hidden {
  opacity: 0;
}

.hero-card-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(16px);
}

.hero-card-caption strong {
  display: block;
  font-size: 22px;
  margin-bottom: 4px;
}

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

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

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

.section {
  padding: 72px 0;
}

.section.soft {
  background: linear-gradient(180deg, #fff7ed, #ffffff);
}

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

.section-head.center {
  display: block;
  text-align: center;
}

.section-head h1,
.section-head h2,
.page-hero h1,
.detail-main h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.detail-lead {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 17px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: 0.3s ease;
}

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

.poster,
.detail-poster,
.rank-poster,
.compact-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #fed7aa, #fb923c 45%, #7c2d12);
}

.poster {
  aspect-ratio: 16 / 10;
}

.movie-card:hover .poster img,
.compact-card:hover .compact-cover img,
.rank-item:hover .rank-poster img {
  transform: scale(1.08);
}

.play-badge,
.duration-badge,
.type-badge {
  position: absolute;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
  font-size: 12px;
  background: rgba(234, 88, 12, 0.92);
  box-shadow: 0 10px 20px rgba(124, 45, 18, 0.28);
}

.play-badge {
  left: 14px;
  bottom: 14px;
}

.duration-badge,
.type-badge {
  right: 14px;
  top: 14px;
  background: rgba(17, 24, 39, 0.72);
}

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

.movie-meta-line,
.movie-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
}

.movie-card-title {
  margin: 8px 0 8px;
  min-height: 56px;
  font-size: 20px;
  line-height: 1.35;
}

.movie-card-title a:hover,
.rank-info a:hover,
.breadcrumb a:hover {
  color: var(--primary);
}

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

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  border-radius: var(--radius);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: 0.28s ease;
}

.category-tile:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: var(--shadow);
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto auto;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.category-tile h2,
.category-tile h3 {
  position: relative;
  margin: 0 0 8px;
  font-size: 24px;
}

.category-tile p {
  position: relative;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.category-tile span {
  position: relative;
  margin-top: 22px;
  font-weight: 900;
}

.from-orange { background: linear-gradient(135deg, #f97316, #c2410c); }
.from-red { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.from-blue { background: linear-gradient(135deg, #3b82f6, #0e7490); }
.from-amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.from-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.from-crimson { background: linear-gradient(135deg, #e11d48, #9f1239); }
.from-cyan { background: linear-gradient(135deg, #06b6d4, #0f766e); }
.from-slate { background: linear-gradient(135deg, #475569, #111827); }
.from-indigo { background: linear-gradient(135deg, #6366f1, #3730a3); }
.from-yellow { background: linear-gradient(135deg, #eab308, #ca8a04); }
.from-pink { background: linear-gradient(135deg, #ec4899, #be185d); }
.from-violet { background: linear-gradient(135deg, #7c3aed, #4c1d95); }
.from-green { background: linear-gradient(135deg, #22c55e, #15803d); }
.from-lime { background: linear-gradient(135deg, #84cc16, #4d7c0f); }
.from-sky { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.from-zinc { background: linear-gradient(135deg, #3f3f46, #18181b); }
.from-stone { background: linear-gradient(135deg, #78716c, #292524); }
.from-teal { background: linear-gradient(135deg, #14b8a6, #0f766e); }
.from-neutral { background: linear-gradient(135deg, #525252, #171717); }
.from-rose { background: linear-gradient(135deg, #fb7185, #be123c); }

.page-hero {
  padding: 70px 0;
  color: #ffffff;
  background: radial-gradient(circle at 80% 10%, rgba(251, 191, 36, 0.45), transparent 34%), linear-gradient(120deg, #7c2d12, #c2410c 48%, #431407);
}

.page-hero h1,
.page-hero p {
  color: #ffffff;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid rgba(251, 146, 60, 0.24);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.filter-input {
  flex: 1 1 280px;
  border: 1px solid #fed7aa;
}

.filter-select {
  min-width: 180px;
  border: 1px solid #fed7aa;
}

.no-results {
  display: none;
  padding: 36px;
  text-align: center;
  color: var(--muted);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 70px 170px 1fr;
  align-items: center;
  gap: 20px;
  padding: 16px;
  border: 1px solid rgba(251, 146, 60, 0.24);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: 0.25s ease;
}

.rank-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #f97316, #dc2626);
}

.rank-poster {
  height: 96px;
  border-radius: 16px;
}

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

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

.rank-info div {
  display: flex;
  gap: 14px;
  color: var(--primary);
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px 0;
  color: var(--muted);
  font-weight: 700;
}

.detail-hero {
  padding: 34px 0 64px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 34px;
  align-items: stretch;
}

.detail-poster {
  min-height: 480px;
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.detail-main {
  padding: 36px;
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 8px 13px;
  border-radius: 999px;
  color: #7c2d12;
  background: #ffedd5;
  font-weight: 800;
}

.player-section {
  padding: 0 0 72px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #111827;
  box-shadow: 0 34px 70px rgba(17, 24, 39, 0.32);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #111827;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  border: 0;
  background: linear-gradient(120deg, rgba(67, 20, 7, 0.74), rgba(17, 24, 39, 0.55));
  z-index: 3;
}

.player-overlay[hidden] {
  display: none;
}

.player-button-core {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  border-radius: 999px;
  background: #ffffff;
  color: #9a3412;
  font-weight: 900;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.22);
}

.content-panel {
  display: grid;
  gap: 24px;
  padding: 0 0 72px;
}

.content-card {
  padding: 30px;
  border: 1px solid rgba(251, 146, 60, 0.22);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

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

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

.compact-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid rgba(251, 146, 60, 0.22);
  background: #fffaf5;
  transition: 0.25s ease;
}

.compact-card:hover {
  transform: translateY(-4px);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.compact-cover {
  height: 74px;
  border-radius: 15px;
}

.compact-info strong {
  display: block;
  margin-bottom: 4px;
  line-height: 1.35;
}

.compact-info em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 32px;
  padding: 50px 0 34px;
}

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

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

.site-footer p {
  color: #9ca3af;
}

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

.footer-links a {
  color: #d1d5db;
}

.footer-links a:hover {
  color: #fbbf24;
}

.footer-bottom {
  padding: 18px;
  text-align: center;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@keyframes floatGlow {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-34px, -34px, 0); }
}

@media (max-width: 1024px) {
  .search-form {
    display: none;
  }

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

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

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

  .hero-media,
  .detail-poster {
    min-height: 360px;
  }

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

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

  .main-nav {
    display: none;
  }

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

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

  .mobile-nav .nav-link {
    display: block;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
  }

  .mobile-search {
    align-items: stretch;
  }

  .mobile-search input {
    min-width: 0;
    flex: 1;
  }

  .hero {
    min-height: auto;
  }

  .hero-slide {
    min-height: auto;
    padding: 48px 0 88px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn,
  .btn-ghost {
    text-align: center;
  }

  .section {
    padding: 48px 0;
  }

  .section-head {
    display: block;
  }

  .section-head .btn {
    display: inline-block;
    margin-top: 16px;
  }

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

  .rank-item {
    grid-template-columns: 48px 100px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .rank-number {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 17px;
  }

  .rank-poster {
    height: 72px;
  }

  .rank-info h2 {
    font-size: 17px;
  }

  .rank-info p {
    display: none;
  }

  .detail-main,
  .content-card {
    padding: 22px;
    border-radius: 22px;
  }

  .detail-poster {
    min-height: 300px;
  }

  .compact-card {
    grid-template-columns: 92px 1fr;
  }

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