* {
  box-sizing: border-box;
}

:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --stone-950: #0c0a09;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-300: #fcd34d;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --amber-900: #78350f;
  --shadow-soft: 0 12px 35px rgba(41, 37, 36, 0.12);
  --shadow-hover: 0 20px 45px rgba(41, 37, 36, 0.22);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--stone-800);
  background: linear-gradient(180deg, var(--stone-50), rgba(254, 243, 199, 0.35));
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.86), rgba(120, 53, 15, 0));
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-solid {
  background: rgba(120, 53, 15, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(12, 10, 9, 0.22);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--amber-50);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--stone-950);
  background: linear-gradient(135deg, var(--amber-200), var(--amber-600));
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.42);
}

.brand-text {
  font-size: clamp(18px, 2vw, 24px);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--amber-100);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--amber-300);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--amber-50);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
}

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: var(--stone-950);
}

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

.hero-slide {
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 24%, rgba(245, 158, 11, 0.25), transparent 28%),
    linear-gradient(90deg, rgba(12, 10, 9, 0.92), rgba(28, 25, 23, 0.58), rgba(28, 25, 23, 0.1)),
    linear-gradient(0deg, rgba(12, 10, 9, 0.92), rgba(12, 10, 9, 0.05) 45%, rgba(12, 10, 9, 0.45));
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  right: 32px;
  bottom: 13vh;
  max-width: 760px;
  color: white;
  z-index: 3;
}

.hero-channel,
.page-hero span {
  display: inline-block;
  padding: 6px 14px;
  color: white;
  background: rgba(217, 119, 6, 0.92);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
}

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

.hero p {
  max-width: 720px;
  margin: 0 0 22px;
  color: var(--stone-200);
  font-size: clamp(16px, 2vw, 21px);
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 10px;
  color: var(--amber-900);
  background: var(--amber-100);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  min-height: 48px;
  padding: 0 26px;
  color: white;
  background: var(--amber-600);
  box-shadow: 0 12px 26px rgba(217, 119, 6, 0.36);
}

.primary-button:hover {
  background: var(--amber-700);
  transform: translateY(-2px) scale(1.02);
}

.ghost-button {
  min-height: 48px;
  padding: 0 22px;
  color: var(--amber-50);
  border: 1px solid rgba(253, 230, 138, 0.38);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}

.ghost-button:hover {
  color: white;
  background: rgba(217, 119, 6, 0.34);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(0, 0, 0, 0.34);
  font-size: 34px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.58);
  transform: translateY(-50%) scale(1.06);
}

.hero-prev {
  left: 22px;
  transform: translateY(-50%);
}

.hero-next {
  right: 22px;
  transform: translateY(-50%);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 28px;
  background: var(--amber-300);
}

.hero-search-form {
  position: absolute;
  right: max(32px, calc((100vw - 1180px) / 2));
  bottom: 90px;
  z-index: 5;
  display: flex;
  width: min(420px, calc(100% - 64px));
  padding: 8px;
  border: 1px solid rgba(253, 230, 138, 0.35);
  border-radius: 18px;
  background: rgba(12, 10, 9, 0.58);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
}

.hero-search-form input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  border: 0;
  outline: 0;
}

.hero-search-form input {
  flex: 1;
  color: white;
  background: transparent;
  padding: 0 12px;
}

.hero-search-form input::placeholder {
  color: rgba(245, 245, 244, 0.72);
}

.hero-search-form button {
  border: 0;
  border-radius: 12px;
  color: white;
  background: var(--amber-600);
  padding: 10px 18px;
  font-weight: 800;
}

.page-shell,
.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.home-shell {
  padding: 64px 0 80px;
}

.top-page {
  padding: 116px 0 80px;
}

.content-section {
  margin-bottom: 70px;
}

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

.section-heading h2,
.category-overview-head h2,
.detail-text h2 {
  margin: 0 0 6px;
  color: var(--stone-800);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.section-heading p,
.category-overview-head p {
  margin: 0;
  color: var(--stone-600);
}

.section-more {
  min-height: 40px;
  padding: 0 16px;
  color: var(--amber-800);
  background: var(--amber-100);
}

.section-more:hover {
  color: white;
  background: var(--amber-600);
  transform: translateY(-2px);
}

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

.catalog-grid {
  align-items: start;
}

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

.movie-card {
  min-width: 0;
}

.movie-link {
  display: block;
  height: 100%;
  border-radius: 16px;
  background: white;
  box-shadow: 0 8px 22px rgba(41, 37, 36, 0.08);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--stone-900);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(12, 10, 9, 0.78));
}

.type-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  z-index: 2;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.type-badge {
  right: 10px;
  padding: 4px 9px;
  background: rgba(217, 119, 6, 0.92);
}

.rank-badge {
  left: 10px;
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: rgba(12, 10, 9, 0.76);
}

.movie-info {
  padding: 14px;
}

.movie-info h3 {
  min-height: 46px;
  margin: 0 0 8px;
  color: var(--stone-800);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 850;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.movie-line {
  margin: 0;
  color: var(--stone-600);
  font-size: 13px;
}

.movie-line {
  min-height: 42px;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-info .tag-row {
  margin-top: 12px;
}

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

.category-card,
.category-overview-card {
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.category-card {
  position: relative;
  min-height: 240px;
  display: flex;
  align-items: flex-end;
  padding: 22px;
  color: white;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 10, 9, 0.1), rgba(12, 10, 9, 0.86));
}

.category-card div {
  position: relative;
  z-index: 2;
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: var(--stone-200);
}

.rank-section {
  padding: 36px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.98), rgba(28, 25, 23, 0.98));
  color: white;
  box-shadow: var(--shadow-soft);
}

.rank-section .section-heading h2,
.rank-section .section-heading p {
  color: white;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateX(4px);
}

.rank-number {
  color: var(--amber-300);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-title {
  color: white;
  font-weight: 800;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-meta {
  color: var(--stone-300);
  font-size: 13px;
}

.page-hero {
  position: relative;
  padding: 44px;
  border-radius: 28px;
  color: white;
  background:
    radial-gradient(circle at 84% 10%, rgba(245, 158, 11, 0.26), transparent 24%),
    linear-gradient(135deg, var(--stone-950), var(--amber-900));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  margin-bottom: 40px;
}

.page-hero h1 {
  margin: 0 0 14px;
  max-width: 840px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--stone-200);
  font-size: 18px;
}

.filter-panel {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
  padding: 14px;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
  min-height: 48px;
  border-radius: 12px;
  background: var(--stone-100);
  color: var(--stone-800);
  padding: 0 14px;
}

.filter-panel input {
  flex: 1;
}

.filter-panel select {
  width: 190px;
}

.category-overview-card {
  padding: 26px;
  margin-bottom: 28px;
}

.detail-page {
  background: var(--stone-50);
}

.detail-hero {
  position: relative;
  min-height: 78vh;
  padding: 106px 0 70px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--stone-950);
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px) saturate(0.9);
  transform: scale(1.04);
}

.detail-cover {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.94), rgba(12, 10, 9, 0.62), rgba(12, 10, 9, 0.2)),
    linear-gradient(0deg, rgba(12, 10, 9, 0.98), rgba(12, 10, 9, 0.1));
}

.detail-shell {
  position: relative;
  z-index: 3;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--stone-200);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--amber-300);
}

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

.detail-poster img {
  width: 260px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

.detail-main {
  color: white;
}

.detail-main h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 18px;
  color: var(--stone-200);
  font-size: 20px;
}

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

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--amber-100);
  background: rgba(255, 255, 255, 0.1);
}

.detail-tags {
  margin-bottom: 28px;
}

.detail-content-shell {
  padding: 54px 0 80px;
}

.player-section {
  margin-bottom: 42px;
}

.player-panel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 26px;
  overflow: hidden;
  background: var(--stone-950);
  box-shadow: var(--shadow-hover);
}

.player-panel video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.3), rgba(12, 10, 9, 0.72));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-symbol {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  color: white;
  background: var(--amber-600);
  font-size: 38px;
  box-shadow: 0 16px 35px rgba(217, 119, 6, 0.38);
}

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

.detail-text {
  display: grid;
  gap: 18px;
  padding: 34px;
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow-soft);
  margin-bottom: 58px;
}

.detail-text p {
  margin: 0;
  color: var(--stone-700);
  font-size: 17px;
  line-height: 1.9;
}

.site-footer {
  color: var(--stone-300);
  background: linear-gradient(180deg, var(--stone-900), var(--stone-950));
  padding: 42px 0;
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.footer-brand {
  color: var(--amber-100);
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 8px;
}

.footer-shell p {
  margin: 0;
  max-width: 720px;
  color: var(--stone-400);
}

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

.footer-links a:hover {
  color: var(--amber-300);
}

.copyright {
  font-size: 13px;
}

.is-hidden {
  display: none !important;
}

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

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

  .rank-list {
    grid-template-columns: 1fr;
  }

  .channel-link {
    display: none;
  }
}

@media (max-width: 820px) {
  .nav-shell {
    height: 64px;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(120, 53, 15, 0.98);
    box-shadow: var(--shadow-hover);
  }

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

  .nav-link {
    padding: 10px 12px;
    border-radius: 10px;
  }

  .nav-link:hover,
  .nav-link.is-active {
    background: rgba(255, 255, 255, 0.08);
  }

  .hero {
    min-height: 86vh;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 150px;
  }

  .hero-search-form {
    left: 20px;
    right: 20px;
    bottom: 70px;
    width: auto;
  }

  .hero-arrow {
    display: none;
  }

  .page-hero {
    padding: 30px;
  }

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

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

  .section-heading,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-panel {
    flex-direction: column;
  }

  .filter-panel select {
    width: 100%;
  }

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

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

  .detail-main h1 {
    font-size: 40px;
  }

  .detail-one-line {
    font-size: 17px;
  }

  .rank-row {
    grid-template-columns: 36px 48px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }
}

@media (max-width: 520px) {
  .brand-text {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

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

  .hero-actions {
    gap: 10px;
  }

  .primary-button,
  .ghost-button {
    min-height: 44px;
    padding: 0 16px;
  }

  .movie-info h3 {
    font-size: 15px;
  }

  .movie-line {
    display: none;
  }

  .detail-text {
    padding: 24px;
  }

  .play-symbol {
    width: 68px;
    height: 68px;
    font-size: 30px;
  }
}
