* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #292524;
  background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 48%, #fafaf9 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.tape-shadow {
  box-shadow: 0 4px 6px -1px rgba(120, 53, 15, 0.2), 0 2px 4px -1px rgba(120, 53, 15, 0.1);
}

.tape-shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(120, 53, 15, 0.3), 0 4px 6px -2px rgba(120, 53, 15, 0.15);
}

.vintage-texture {
  background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.03) 2px, rgba(0, 0, 0, 0.03) 4px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #78350f, #9a3412, #78350f);
  border-bottom: 4px solid #c2410c;
  box-shadow: 0 12px 32px rgba(67, 20, 7, 0.25);
}

.nav-shell {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fef3c7;
}

.brand-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #78350f;
  background: #fde68a;
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.35);
  transition: transform 0.2s ease;
}

.brand:hover .brand-icon {
  transform: rotate(12deg) scale(1.04);
}

.brand-copy {
  display: grid;
  line-height: 1.1;
}

.brand-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-subtitle {
  margin-top: 3px;
  font-size: 11px;
  color: #fcd34d;
  letter-spacing: 0.12em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link,
.mobile-link {
  color: #fef3c7;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fde68a;
}

.menu-button {
  display: none;
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(254, 243, 199, 0.3);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  border-top: 1px solid rgba(194, 65, 12, 0.8);
}

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

.mobile-link {
  padding: 8px 0;
}

.page-intro {
  padding: 42px 0 16px;
}

.home-intro h1,
.page-title-block h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 900;
  line-height: 1.1;
  color: transparent;
  background: linear-gradient(90deg, #b45309, #ea580c);
  -webkit-background-clip: text;
  background-clip: text;
}

.home-intro p,
.page-title-block p {
  max-width: 760px;
  margin: 14px 0 0;
  color: #57534e;
  font-size: 17px;
  line-height: 1.8;
}

.eyebrow {
  margin: 0 0 10px;
  color: #b45309;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-search {
  margin-top: 24px;
  display: flex;
  max-width: 680px;
  gap: 10px;
}

.home-search input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #292524;
  outline: none;
  box-shadow: 0 4px 14px rgba(120, 53, 15, 0.08);
}

.home-search input {
  padding: 14px 18px;
}

.home-search button,
.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.home-search button,
.primary-button {
  color: #ffffff;
  background: linear-gradient(90deg, #d97706, #ea580c);
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.25);
}

.ghost-button {
  color: #fef3c7;
  border: 1px solid rgba(254, 243, 199, 0.42);
  background: rgba(0, 0, 0, 0.3);
}

.hero-carousel {
  margin-top: 28px;
  margin-bottom: 64px;
}

.hero-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #1c1917;
}

.hero-slide {
  display: none;
  min-height: 460px;
  grid-template-columns: 1.02fr 0.98fr;
  position: relative;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 18%, rgba(251, 191, 36, 0.22), transparent 34%), linear-gradient(90deg, rgba(28, 25, 23, 0.96) 0%, rgba(67, 20, 7, 0.8) 46%, rgba(28, 25, 23, 0.15) 100%);
  z-index: 1;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: clamp(32px, 6vw, 70px);
  color: #ffffff;
  align-self: center;
}

.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-summary {
  max-width: 610px;
  margin: 0;
  color: #fde68a;
  font-size: 17px;
  line-height: 1.8;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

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

.hero-media {
  position: relative;
  z-index: 0;
  min-height: 460px;
}

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

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.hero-arrow.prev {
  left: 18px;
}

.hero-arrow.next {
  right: 18px;
}

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

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

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

.content-section {
  margin: 0 auto 64px;
}

.section-heading {
  display: flex;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  color: #1c1917;
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 900;
}

.section-heading p {
  margin: 6px 0 0;
  color: #78716c;
}

.section-heading span {
  height: 4px;
  flex: 1;
  min-width: 80px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d97706, transparent);
}

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

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

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

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

.movie-card {
  display: grid;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(120, 53, 15, 0.2), 0 2px 4px -1px rgba(120, 53, 15, 0.1);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 15px -3px rgba(120, 53, 15, 0.3), 0 4px 6px -2px rgba(120, 53, 15, 0.15);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #292524, #78350f);
}

.movie-card.compact {
  grid-template-columns: 108px 1fr;
  min-height: 142px;
}

.movie-card.compact .poster-wrap {
  aspect-ratio: auto;
  height: 100%;
}

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

.movie-card:hover img {
  transform: scale(1.06);
}

.score-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 28px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, #d97706, #ea580c);
  font-weight: 800;
  font-size: 13px;
}

.score-pill {
  right: 10px;
  top: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
}

.movie-card-body {
  display: grid;
  gap: 8px;
  padding: 14px;
  background: #ffffff;
}

.movie-card-body strong {
  color: #1c1917;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card:hover .movie-card-body strong {
  color: #c2410c;
}

.movie-desc {
  color: #78716c;
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #57534e;
  font-size: 12px;
}

.movie-meta span:first-child {
  color: #b45309;
  font-weight: 800;
}

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

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

.category-tile,
.category-card {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 22px;
  border-radius: 22px;
  color: #292524;
  background: linear-gradient(135deg, #ffffff, #ffedd5);
  box-shadow: 0 4px 6px -1px rgba(120, 53, 15, 0.2), 0 2px 4px -1px rgba(120, 53, 15, 0.1);
  transition: transform 0.22s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
}

.category-tile strong,
.category-card strong {
  color: #9a3412;
  font-size: 22px;
}

.category-tile span,
.category-card em {
  color: #78716c;
  font-style: normal;
  line-height: 1.65;
}

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

.category-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  background: #292524;
}

.ranking-panel,
.warm-section,
.filter-panel,
.info-card,
.text-card {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(120, 53, 15, 0.2), 0 2px 4px -1px rgba(120, 53, 15, 0.1);
}

.ranking-panel {
  padding: 22px;
  position: sticky;
  top: 92px;
}

.side-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.side-heading h2 {
  margin: 0;
  font-size: 26px;
}

.side-heading a {
  color: #b45309;
  font-weight: 800;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 34px 64px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #fff7ed;
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  background: #ffedd5;
  transform: translateX(3px);
}

.rank-row img {
  width: 64px;
  height: 82px;
  object-fit: cover;
  border-radius: 12px;
  background: #292524;
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #ffffff;
  background: #d97706;
  font-weight: 900;
}

.rank-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-info strong {
  overflow: hidden;
  color: #1c1917;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info em {
  overflow: hidden;
  color: #78716c;
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-score {
  color: #b45309;
  font-weight: 900;
}

.warm-section {
  padding: clamp(20px, 4vw, 34px);
  background-color: #fffbeb;
}

.page-main {
  padding: 36px 0 72px;
}

.page-title-block {
  margin-bottom: 34px;
}

.filter-panel {
  padding: 22px;
  margin-bottom: 36px;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-input,
.filter-select {
  height: 48px;
  padding: 0 16px;
}

.empty-state {
  padding: 36px;
  color: #78716c;
  text-align: center;
  border-radius: 18px;
  background: #fffbeb;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: #78716c;
  font-size: 14px;
}

.breadcrumb a {
  color: #b45309;
  font-weight: 700;
}

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

.detail-primary {
  min-width: 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 10px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.66));
  border: 0;
  cursor: pointer;
}

.player-shell.playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  display: inline-flex;
  width: 76px;
  height: 76px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #78350f;
  background: #fcd34d;
  box-shadow: 0 0 42px rgba(251, 191, 36, 0.45);
  font-size: 32px;
}

.player-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.04));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.player-shell:hover .player-bar,
.player-shell:focus-within .player-bar {
  opacity: 1;
}

.player-bar button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  padding: 7px 11px;
  cursor: pointer;
}

.player-bar input {
  width: 100%;
  accent-color: #f59e0b;
}

.detail-content h1 {
  margin: 28px 0 16px;
  color: #1c1917;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
}

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

.detail-meta span {
  display: inline-flex;
  border-radius: 999px;
  background: #ffffff;
  color: #57534e;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 6px -1px rgba(120, 53, 15, 0.12);
}

.text-card {
  padding: 24px;
  margin-top: 20px;
}

.text-card h2,
.info-card h2 {
  margin: 0 0 14px;
  color: #1c1917;
  font-size: 22px;
}

.text-card p {
  margin: 0;
  color: #57534e;
  line-height: 1.9;
  text-align: justify;
}

.intro-card p {
  color: #292524;
  font-weight: 700;
}

.amber-card {
  background-color: #fffbeb;
}

.detail-side {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 18px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  object-fit: cover;
  background: #292524;
}

.info-card {
  padding: 22px;
}

.info-card dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.info-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #e7e5e4;
}

.info-card dt {
  color: #78716c;
}

.info-card dd {
  margin: 0;
  color: #292524;
  font-weight: 800;
  text-align: right;
}

.info-card a {
  color: #b45309;
}

.related-section {
  margin-top: 58px;
}

.site-footer {
  margin-top: 28px;
  color: #fde68a;
  background: linear-gradient(90deg, #1c1917, #451a03, #1c1917);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 44px 0 30px;
}

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

.site-footer p,
.site-footer a,
.site-footer li {
  color: #fcd34d;
  line-height: 1.8;
  font-size: 14px;
}

.site-footer ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid rgba(120, 53, 15, 0.9);
  color: #fbbf24;
  font-size: 14px;
}

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

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

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

  .ranking-panel,
  .detail-side {
    position: static;
  }

  .detail-side {
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

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

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

  .home-search,
  .filter-controls,
  .player-bar {
    grid-template-columns: 1fr;
  }

  .home-search {
    display: grid;
  }

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

  .hero-slide,
  .hero-media {
    min-height: 540px;
  }

  .hero-media {
    position: absolute;
    inset: 0;
  }

  .hero-slide::before {
    background: linear-gradient(0deg, rgba(28, 25, 23, 0.95), rgba(67, 20, 7, 0.58), rgba(28, 25, 23, 0.32));
  }

  .hero-copy {
    min-height: 540px;
    display: grid;
    align-content: end;
  }

  .movie-grid,
  .catalog-grid,
  .category-grid,
  .category-overview-grid,
  .latest-grid,
  .rank-list.wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

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

  .page-intro {
    padding-top: 28px;
  }

  .hero-carousel {
    margin-bottom: 42px;
  }

  .hero-copy {
    padding: 26px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .catalog-grid,
  .related-grid,
  .category-grid,
  .category-overview-grid,
  .latest-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 30px 54px 1fr;
  }

  .rank-row img {
    width: 54px;
    height: 72px;
  }

  .rank-score {
    display: none;
  }

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