:root {
  --bg-deep: #0c0a09;
  --bg-panel: #1c1917;
  --bg-soft: #292524;
  --line: #44403c;
  --text-main: #f5f5f4;
  --text-muted: #a8a29e;
  --text-dim: #78716c;
  --amber: #d97706;
  --amber-light: #f59e0b;
  --amber-dark: #92400e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: var(--bg-deep);
  color: var(--text-main);
  line-height: 1.7;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 10, 9, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(68, 64, 60, 0.75);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 0.03em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber), var(--amber-dark));
  box-shadow: 0 10px 30px rgba(217, 119, 6, 0.35);
  color: white;
  font-size: 14px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #d6d3d1;
  font-size: 15px;
}

.desktop-nav a,
.mobile-nav a,
.nav-search {
  border: 0;
  background: transparent;
  color: #d6d3d1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.desktop-nav a.active,
.mobile-nav a.active,
.nav-search:hover {
  color: var(--amber-light);
}

.mobile-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--text-main);
  font-size: 26px;
  cursor: pointer;
}

.search-panel,
.mobile-nav {
  display: none;
  border-top: 1px solid rgba(68, 64, 60, 0.75);
}

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

.top-search-form,
.mobile-search-form {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
  display: flex;
  gap: 10px;
}

.top-search-form input,
.mobile-search-form input,
.home-search-form input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(120, 113, 108, 0.4);
  border-radius: 14px;
  background: rgba(41, 37, 36, 0.92);
  color: var(--text-main);
  outline: none;
  padding: 12px 14px;
}

.top-search-form input:focus,
.mobile-search-form input:focus,
.home-search-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.16);
}

.top-search-form button,
.mobile-search-form button,
.home-search-form button {
  border: 0;
  border-radius: 14px;
  background: var(--amber);
  color: white;
  padding: 0 24px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.top-search-form button:hover,
.mobile-search-form button:hover,
.home-search-form button:hover,
.primary-btn:hover {
  background: var(--amber-dark);
  transform: translateY(-1px);
}

.mobile-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 18px;
}

.mobile-nav a {
  display: block;
  padding: 9px 0;
}

.hero-section {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.24), transparent 32%), linear-gradient(135deg, #0c0a09 0%, #1c1917 45%, #78350f 100%);
}

.hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
}

.hero-glow-one {
  width: 340px;
  height: 340px;
  left: 5%;
  top: 16%;
  background: var(--amber);
}

.hero-glow-two {
  width: 460px;
  height: 460px;
  right: -4%;
  bottom: 6%;
  background: #ea580c;
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.hero-slide {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 52px;
  animation: fadeIn 0.45s ease both;
}

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

.hero-copy {
  max-width: 680px;
}

.eyebrow,
.section-heading span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber-light);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 13px;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 14px 0 16px;
  color: var(--text-main);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy h1 {
  font-size: clamp(42px, 7vw, 78px);
}

.hero-copy p,
.page-hero p,
.detail-one-line {
  color: #d6d3d1;
  font-size: clamp(18px, 2vw, 24px);
  margin: 0 0 24px;
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  border-radius: 999px;
  background: rgba(68, 64, 60, 0.82);
  color: #d6d3d1;
  padding: 6px 11px;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  background: var(--amber);
  color: white;
  box-shadow: 0 16px 40px rgba(217, 119, 6, 0.28);
}

.ghost-btn {
  border: 1px solid rgba(168, 162, 158, 0.35);
  background: rgba(41, 37, 36, 0.72);
  color: var(--text-main);
}

.ghost-btn:hover {
  border-color: var(--amber);
  transform: translateY(-1px);
}

.hero-poster {
  position: relative;
  width: min(34vw, 350px);
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(245, 158, 11, 0.25);
  flex: 0 0 auto;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.58), transparent 48%);
}

.hero-poster span,
.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(217, 119, 6, 0.92);
  color: white;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.hero-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
}

.hero-controls button {
  border: 0;
  color: white;
  background: rgba(41, 37, 36, 0.74);
  border-radius: 999px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(214, 211, 209, 0.45);
}

.hero-dots button.active {
  width: 24px;
  background: var(--amber-light);
}

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

.quick-search-wrap {
  padding: 34px 0 18px;
}

.home-search-form {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(28, 25, 23, 0.8);
  border: 1px solid rgba(68, 64, 60, 0.65);
  box-shadow: var(--shadow);
}

.home-search-form button {
  min-width: 130px;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 6px 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
}

.section-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--text-muted);
}

.row-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.row-heading a {
  color: var(--amber-light);
  font-weight: 800;
}

.wide-section {
  background: rgba(28, 25, 23, 0.55);
  border-top: 1px solid rgba(68, 64, 60, 0.45);
  border-bottom: 1px solid rgba(68, 64, 60, 0.45);
}

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

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

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

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

.movie-card {
  background: rgba(28, 25, 23, 0.92);
  border: 1px solid rgba(68, 64, 60, 0.7);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.34);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  background: var(--bg-soft);
  overflow: hidden;
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 52%);
  opacity: 0.72;
}

.play-mark {
  width: 46px;
  height: 46px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.05);
}

.year-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: var(--amber-light);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--text-main);
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--amber-light);
}

.card-body p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 46px;
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: 14px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-dim);
  font-size: 12px;
}

.card-tags {
  margin-top: 12px;
}

.card-tags span {
  padding: 4px 8px;
  font-size: 12px;
}

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

.category-tile,
.category-overview-card {
  display: block;
  min-height: 168px;
  border: 1px solid rgba(68, 64, 60, 0.7);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(41, 37, 36, 0.96), rgba(28, 25, 23, 0.9));
  padding: 22px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.62);
}

.category-tile span,
.category-overview-main span {
  color: var(--amber-light);
  font-weight: 900;
}

.category-tile strong,
.category-overview-main h2 {
  display: block;
  margin: 8px 0;
  font-size: 22px;
}

.category-tile em,
.category-overview-main p {
  color: var(--text-muted);
  font-style: normal;
  font-size: 14px;
}

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

.category-samples {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.category-samples a {
  color: #d6d3d1;
  background: rgba(68, 64, 60, 0.45);
  border-radius: 12px;
  padding: 9px 10px;
  font-size: 14px;
}

.category-samples a:hover {
  color: var(--amber-light);
}

.page-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 15% 15%, rgba(217, 119, 6, 0.25), transparent 34%), linear-gradient(135deg, #0c0a09, #1c1917 48%, #451a03);
  border-bottom: 1px solid rgba(68, 64, 60, 0.55);
}

.page-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0;
}

.slim-hero > div {
  padding: 78px 0;
}

.page-hero h1 {
  max-width: 900px;
  font-size: clamp(38px, 5vw, 64px);
}

.page-hero p {
  max-width: 780px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  margin-bottom: 28px;
}

.rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

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

.rank-row a {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(68, 64, 60, 0.62);
  border-radius: 14px;
  background: rgba(28, 25, 23, 0.84);
  padding: 12px 14px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-row a:hover {
  border-color: rgba(245, 158, 11, 0.72);
  transform: translateX(3px);
}

.rank-num {
  color: var(--amber-light);
  font-weight: 900;
  font-size: 18px;
}

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

.rank-info {
  color: var(--text-muted);
  font-size: 13px;
}

.ranking-blocks {
  display: grid;
  gap: 24px;
}

.ranking-block {
  border: 1px solid rgba(68, 64, 60, 0.62);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, 0.7);
  padding: 18px;
}

.ranking-block h2 {
  margin: 0 0 14px;
  color: var(--amber-light);
  font-size: 20px;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 28px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  border: 1px solid rgba(245, 158, 11, 0.22);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 16px;
}

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

.detail-info h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0;
}

.detail-meta div {
  border: 1px solid rgba(68, 64, 60, 0.62);
  border-radius: 16px;
  background: rgba(28, 25, 23, 0.8);
  padding: 12px;
}

.detail-meta dt {
  color: var(--text-dim);
  font-size: 12px;
}

.detail-meta dd {
  margin: 4px 0 0;
  color: var(--text-main);
  font-weight: 800;
}

.player-section {
  padding-top: 36px;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  background: black;
  border: 1px solid rgba(68, 64, 60, 0.68);
  box-shadow: var(--shadow);
}

.player-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.22));
  cursor: pointer;
}

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

.player-circle {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--amber);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.42);
  font-size: 24px;
}

.detail-content {
  padding-top: 26px;
}

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

.detail-text-card {
  border: 1px solid rgba(68, 64, 60, 0.68);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, 0.8);
  padding: 24px;
}

.detail-text-card h2 {
  margin: 0 0 12px;
  color: var(--amber-light);
}

.detail-text-card p {
  margin: 0;
  color: #d6d3d1;
}

.site-footer {
  margin-top: auto;
  background: #070605;
  border-top: 1px solid rgba(68, 64, 60, 0.7);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 38px;
}

.footer-grid p,
.footer-grid a,
.footer-grid li {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-grid a:hover {
  color: var(--amber-light);
}

.footer-grid h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(68, 64, 60, 0.55);
  padding: 18px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

.search-page-form {
  max-width: 820px;
  margin-top: 26px;
}

.empty-result {
  grid-column: 1 / -1;
  border: 1px solid rgba(68, 64, 60, 0.68);
  border-radius: var(--radius);
  background: rgba(28, 25, 23, 0.8);
  padding: 32px;
  color: var(--text-muted);
  text-align: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

  .hero-inner,
  .hero-section {
    min-height: auto;
  }

  .hero-inner {
    padding: 56px 0 100px;
  }

  .hero-slide.active {
    display: grid;
    gap: 28px;
  }

  .hero-poster {
    width: min(76vw, 320px);
    margin: 0 auto;
  }

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

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

  .detail-meta,
  .detail-text-grid,
  .footer-grid,
  .category-overview-grid,
  .preview-list {
    grid-template-columns: 1fr;
  }

  .row-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .movie-grid,
  .four-grid,
  .catalogue-grid,
  .six-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .home-search-form,
  .top-search-form,
  .mobile-search-form,
  .filter-bar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .home-search-form button,
  .top-search-form button,
  .mobile-search-form button {
    min-height: 44px;
  }

  .section-wrap {
    padding: 52px 0;
  }

  .page-hero > div {
    padding: 62px 0;
  }

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

  .rank-info {
    grid-column: 2;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 15px;
  }
}
