:root {
  color-scheme: light;
  --bg: #fff8ed;
  --bg-strong: #fffbf4;
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(146, 64, 14, 0.14);
  --brand: #d97706;
  --brand-deep: #9a3412;
  --brand-soft: #fff1d6;
  --panel: rgba(255, 255, 255, 0.86);
  --shadow: 0 24px 70px rgba(146, 64, 14, 0.16);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 4%, rgba(245, 158, 11, 0.18), transparent 26rem),
    radial-gradient(circle at 88% 8%, rgba(234, 88, 12, 0.13), transparent 30rem),
    linear-gradient(180deg, #fff7ed 0%, #ffffff 42%, #fff7ed 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 251, 244, 0.86);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 28px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c 52%, #7c2d12);
  box-shadow: 0 12px 30px rgba(234, 88, 12, 0.32);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  color: #4b5563;
  font-weight: 700;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: var(--brand);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-nav input,
.library-search input,
.inline-filter input {
  width: 250px;
  border: 2px solid rgba(245, 158, 11, 0.28);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  color: #374151;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-nav input:focus,
.library-search input:focus,
.inline-filter input:focus {
  border-color: rgba(245, 158, 11, 0.75);
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.12);
}

.top-search button,
.mobile-nav button,
.primary-button,
.secondary-button,
.hero-control,
.hero-dot,
.filter-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.top-search button,
.mobile-nav button,
.primary-button {
  color: #ffffff;
  border-radius: 999px;
  padding: 11px 20px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 14px 32px rgba(234, 88, 12, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button:hover,
.mobile-nav button:hover,
.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(234, 88, 12, 0.32);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 11px 20px;
  color: #9a3412;
  background: rgba(255, 247, 237, 0.92);
  border: 1px solid rgba(251, 146, 60, 0.3);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 24px;
}

.mobile-nav {
  display: none;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.mobile-nav.is-open {
  display: grid;
  gap: 14px;
}

.mobile-nav form {
  display: flex;
  gap: 8px;
}

.mobile-nav input {
  width: 100%;
}

.page-main,
.hero-shell,
.footer-shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.page-main {
  padding: 32px 0 84px;
}

.home-hero {
  position: relative;
  width: min(1320px, calc(100% - 32px));
  margin: 26px auto 42px;
  border-radius: 36px;
  min-height: 590px;
  overflow: hidden;
  background: #1f1307;
  box-shadow: 0 34px 90px rgba(124, 45, 18, 0.28);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.62s ease, transform 0.62s ease;
  transform: scale(1.015);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-bg {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.02);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.92) 0%, rgba(31, 41, 55, 0.72) 46%, rgba(17, 24, 39, 0.1) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.82) 0%, transparent 42%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(660px, calc(100% - 40px));
  min-height: 590px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 58px 0 74px 58px;
  color: #ffffff;
}

.eyebrow {
  margin-bottom: 12px;
  color: #d97706;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-content .eyebrow {
  color: #fbbf24;
}

.hero-content h1,
.hero-content h2 {
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.08em;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}

.hero-content p {
  margin-top: 18px;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-meta,
.card-meta,
.detail-meta,
.category-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-meta span,
.card-meta span,
.detail-meta span,
.category-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(255, 247, 237, 0.82);
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
}

.hero-meta span {
  background: rgba(255, 255, 255, 0.16);
  color: #fff7ed;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-nav {
  position: absolute;
  left: 58px;
  right: 58px;
  bottom: 30px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-arrows {
  display: flex;
  gap: 10px;
}

.hero-control {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

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

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

.hero-dot.is-active {
  width: 36px;
  background: #fbbf24;
}

.content-section {
  margin-top: 44px;
}

.section-head,
.page-title-block {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2,
.page-title-block h1 {
  color: #1f2937;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.section-head p,
.page-title-block p {
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card,
.category-card,
.panel-card,
.detail-info,
.player-panel,
.related-panel,
.library-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 54px rgba(146, 64, 14, 0.11);
}

.movie-card {
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(245, 158, 11, 0.38);
  box-shadow: 0 28px 70px rgba(146, 64, 14, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.18;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
  overflow: hidden;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.48) 0%, transparent 46%);
}

.card-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
}

.card-year {
  right: 12px;
  top: 12px;
  padding: 6px 10px;
  color: #9a3412;
  background: rgba(255, 255, 255, 0.88);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  box-shadow: 0 10px 28px rgba(220, 38, 38, 0.32);
}

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

.card-meta {
  margin-bottom: 10px;
}

.movie-card h3 {
  min-height: 56px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: -0.02em;
}

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

.movie-card p {
  min-height: 62px;
  margin-top: 8px;
  color: #6b7280;
  line-height: 1.62;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  min-height: 230px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 70px rgba(146, 64, 14, 0.18);
}

.category-card h2,
.category-card h3 {
  color: #1f2937;
  font-size: 25px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.category-card p {
  color: #6b7280;
  line-height: 1.8;
}

.category-samples {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.category-samples a {
  display: block;
  color: #9a3412;
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 24px;
  color: #9a3412;
  font-weight: 800;
}

.breadcrumb span {
  color: #d97706;
}

.inline-filter,
.library-search {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-button {
  border-radius: 999px;
  padding: 10px 16px;
  color: #92400e;
  background: rgba(255, 237, 213, 0.92);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.filter-button:hover,
.filter-button.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  transform: translateY(-1px);
}

.no-results {
  display: none;
  padding: 24px;
  color: #9a3412;
  font-weight: 900;
  border-radius: 20px;
  background: #ffedd5;
}

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

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

.player-panel {
  padding: 14px;
  background: #111827;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  border: 0;
  cursor: pointer;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 18px 50px rgba(234, 88, 12, 0.38);
  font-size: 36px;
}

.detail-info {
  margin-top: 22px;
  padding: 28px;
}

.detail-info h1 {
  color: #111827;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.detail-meta {
  margin: 16px 0 12px;
}

.detail-info h2,
.related-panel h2,
.panel-card h2 {
  margin: 28px 0 12px;
  color: #1f2937;
  font-size: 24px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-info p {
  color: #4b5563;
  font-size: 16px;
  line-height: 1.9;
}

.detail-poster {
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 22px 60px rgba(146, 64, 14, 0.18);
}

.related-panel {
  padding: 20px;
  position: sticky;
  top: 96px;
}

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

.related-mini {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  padding: 9px;
  border-radius: 16px;
  background: rgba(255, 247, 237, 0.8);
  transition: background 0.2s ease, transform 0.2s ease;
}

.related-mini:hover {
  background: #ffedd5;
  transform: translateX(4px);
}

.related-mini img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
}

.related-mini strong {
  display: block;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.35;
}

.related-mini em {
  display: block;
  margin-top: 6px;
  color: #9a3412;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.panel-card,
.library-panel {
  padding: 24px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 60px 110px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.ranking-row:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(146, 64, 14, 0.12);
}

.ranking-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  font-weight: 950;
}

.ranking-row img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
}

.ranking-row h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 20px;
  font-weight: 950;
}

.ranking-row p {
  color: #6b7280;
  line-height: 1.6;
}

.site-footer {
  margin-top: 34px;
  color: #fffbeb;
  background: linear-gradient(135deg, #7c2d12, #92400e 55%, #431407);
}

.footer-shell {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 44px 0;
}

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

.site-footer p {
  max-width: 680px;
  margin-top: 12px;
  color: #fed7aa;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: #ffedd5;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .desktop-nav,
  .top-search {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

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

  .hero-content {
    padding-left: 32px;
  }

  .hero-nav {
    left: 32px;
    right: 32px;
  }

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

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

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

  .related-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-shell,
  .page-main,
  .hero-shell,
  .footer-shell,
  .mobile-nav {
    width: min(100% - 24px, 1220px);
  }

  .home-hero {
    width: min(100% - 24px, 1320px);
    min-height: 590px;
    border-radius: 26px;
  }

  .hero-content {
    width: 100%;
    min-height: 590px;
    padding: 34px 22px 88px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-nav {
    left: 22px;
    right: 22px;
    bottom: 22px;
  }

  .section-head,
  .page-title-block,
  .footer-shell {
    display: grid;
  }

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

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

  .movie-card h3 {
    min-height: auto;
    font-size: 16px;
  }

  .movie-card p {
    min-height: auto;
    font-size: 13px;
  }

  .ranking-row {
    grid-template-columns: 42px 78px 1fr;
  }

  .ranking-row .primary-button {
    grid-column: 2 / 4;
    text-align: center;
  }

  .detail-info,
  .panel-card,
  .library-panel,
  .related-panel {
    padding: 18px;
    border-radius: 20px;
  }

  .play-icon {
    width: 66px;
    height: 66px;
    font-size: 30px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .mobile-nav form {
    display: grid;
  }

  .ranking-row {
    grid-template-columns: 42px 1fr;
  }

  .ranking-row img {
    display: none;
  }

  .ranking-row .primary-button {
    grid-column: 1 / 3;
  }
}
