* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #f5f5f4;
  background: #0c0a09;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

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

.brand-mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  color: #fff7ed;
  background: linear-gradient(135deg, #d97706, #ea580c);
  box-shadow: 0 0 34px rgba(217, 119, 6, 0.35);
}

.brand-text {
  white-space: nowrap;
  font-size: 20px;
  color: #fafaf9;
}

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

.nav-link,
.mobile-link {
  color: #d6d3d1;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-controls input,
.filter-controls select,
.search-hero-form input {
  border: 1px solid #44403c;
  outline: none;
  color: #fafaf9;
  background: #1c1917;
}

.header-search input {
  width: 210px;
  padding: 10px 12px;
  border-radius: 12px;
}

.header-search button,
.mobile-search button,
.search-hero-form button,
.primary-button,
.secondary-button,
.text-button,
.filter-reset {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.header-search button,
.mobile-search button,
.search-hero-form button,
.primary-button {
  color: #ffffff;
  background: #d97706;
}

.header-search button {
  padding: 10px 14px;
}

.header-search button:hover,
.mobile-search button:hover,
.search-hero-form button:hover,
.primary-button:hover {
  background: #b45309;
  transform: translateY(-1px);
}

.secondary-button,
.text-button,
.filter-reset {
  color: #fafaf9;
  border: 1px solid #57534e;
  background: rgba(41, 37, 36, 0.86);
}

.secondary-button:hover,
.text-button:hover,
.filter-reset:hover {
  border-color: #d97706;
  background: rgba(68, 64, 60, 0.92);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 8px;
  border: 1px solid #44403c;
  border-radius: 12px;
  color: #fafaf9;
  background: #1c1917;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 6px 0;
  border-radius: 99px;
  background: #fafaf9;
}

.mobile-panel {
  display: none;
  border-top: 1px solid #292524;
  background: rgba(12, 10, 9, 0.96);
}

.mobile-panel.is-open {
  display: block;
}

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

.mobile-nav {
  display: grid;
  gap: 12px;
  padding: 16px 0;
}

.mobile-link {
  padding: 10px 0;
  border-bottom: 1px solid rgba(68, 64, 60, 0.45);
}

.mobile-search {
  padding: 0 0 18px;
}

.mobile-search input {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
}

.mobile-search button {
  padding: 12px 16px;
}

.hero-carousel {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(217, 119, 6, 0.3), transparent 32%), #0c0a09;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.06);
  opacity: 0.33;
  filter: blur(4px) saturate(1.1);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 10, 9, 0.96), rgba(12, 10, 9, 0.78), rgba(12, 10, 9, 0.45));
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.55fr;
  align-items: center;
  gap: 46px;
  padding: 120px 0 88px;
}

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

.eyebrow,
.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(120, 53, 15, 0.24);
  font-size: 14px;
}

.hero-copy h1 {
  margin: 22px 0 16px;
  color: #fafaf9;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 26px;
  color: #d6d3d1;
  font-size: clamp(17px, 2.2vw, 22px);
}

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

.hero-meta span,
.meta-pills span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #e7e5e4;
  background: rgba(68, 64, 60, 0.78);
  font-size: 13px;
}

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

.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  font-weight: 700;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 28px;
  background: #1c1917;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.48);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-thumbs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(214, 211, 209, 0.35);
}

.hero-dot.is-active {
  background: #f59e0b;
}

.section {
  padding: 72px 0;
}

.section.alt-section {
  background: rgba(28, 25, 23, 0.58);
}

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

.section-title h2,
.page-title h1 {
  margin: 0;
  color: #fafaf9;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-title p,
.page-title p {
  margin: 8px 0 0;
  color: #a8a29e;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(68, 64, 60, 0.86);
  border-radius: 18px;
  background: rgba(28, 25, 23, 0.86);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

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

.movie-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #292524;
}

.movie-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.poster-shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 46%;
  background: linear-gradient(transparent, rgba(12, 10, 9, 0.85));
}

.quality-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff7ed;
  font-size: 12px;
  font-weight: 800;
  background: #d97706;
}

.quality-badge {
  right: 10px;
  top: 10px;
}

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

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

.movie-card h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 6px;
  overflow: hidden;
  color: #fafaf9;
  font-size: 16px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card h3 a:hover {
  color: #f59e0b;
}

.movie-meta {
  margin: 0 0 8px;
  color: #a8a29e;
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #d6d3d1;
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 188px;
  padding: 24px;
  border: 1px solid rgba(68, 64, 60, 0.8);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(41, 37, 36, 0.98), rgba(120, 53, 15, 0.22));
  transition: transform 0.24s ease, border-color 0.24s ease;
}

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

.category-tile h3 {
  margin: 0 0 10px;
  color: #fafaf9;
  font-size: 24px;
}

.category-tile p {
  margin: 0;
  color: #d6d3d1;
}

.category-count {
  display: inline-flex;
  margin-top: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fbbf24;
  background: rgba(120, 53, 15, 0.34);
}

.page-hero {
  padding: 80px 0 50px;
  border-bottom: 1px solid rgba(68, 64, 60, 0.7);
  background: radial-gradient(circle at 18% 0%, rgba(217, 119, 6, 0.22), transparent 34%), linear-gradient(135deg, #0c0a09, #1c1917 52%, #1f1308);
}

.page-title {
  max-width: 850px;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid rgba(68, 64, 60, 0.86);
  border-radius: 18px;
  background: rgba(28, 25, 23, 0.82);
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
}

.filter-reset {
  padding: 0 16px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 72px 122px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(68, 64, 60, 0.82);
  border-radius: 18px;
  background: rgba(28, 25, 23, 0.82);
}

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

.ranking-cover img {
  width: 122px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: #292524;
}

.ranking-info h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.ranking-info p {
  margin: 0;
  color: #a8a29e;
}

.search-hero-form {
  display: flex;
  width: min(680px, 100%);
  gap: 10px;
  margin-top: 26px;
}

.search-hero-form input {
  flex: 1;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
}

.search-hero-form button {
  min-width: 110px;
  padding: 0 18px;
}

.empty-state {
  padding: 42px;
  border: 1px dashed #57534e;
  border-radius: 20px;
  color: #a8a29e;
  text-align: center;
  background: rgba(28, 25, 23, 0.7);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0;
  color: #a8a29e;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #f59e0b;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 36px;
  align-items: end;
  padding: 38px;
  border: 1px solid rgba(68, 64, 60, 0.86);
  border-radius: 28px;
  background: radial-gradient(circle at top right, rgba(217, 119, 6, 0.18), transparent 34%), rgba(28, 25, 23, 0.88);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  background: #292524;
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.34);
}

.detail-copy h1 {
  margin: 14px 0 14px;
  color: #fafaf9;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.detail-copy .lead {
  max-width: 860px;
  margin: 0 0 22px;
  color: #d6d3d1;
  font-size: 18px;
}

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

.player-section,
.content-section,
.related-section {
  margin-top: 52px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.38);
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(rgba(12, 10, 9, 0.18), rgba(12, 10, 9, 0.74));
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 32px;
  background: #d97706;
  box-shadow: 0 0 42px rgba(217, 119, 6, 0.6);
}

.player-overlay strong {
  font-size: 18px;
}

.content-card {
  padding: 30px;
  border: 1px solid rgba(68, 64, 60, 0.82);
  border-radius: 24px;
  background: rgba(28, 25, 23, 0.84);
}

.content-card h2 {
  margin: 0 0 16px;
  color: #fafaf9;
  font-size: 28px;
}

.content-card p {
  margin: 0 0 18px;
  color: #d6d3d1;
  font-size: 16px;
}

.content-card p:last-child {
  margin-bottom: 0;
}

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

.mini-card {
  overflow: hidden;
  border: 1px solid rgba(68, 64, 60, 0.82);
  border-radius: 16px;
  background: rgba(28, 25, 23, 0.82);
}

.mini-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #292524;
}

.mini-card span {
  display: -webkit-box;
  padding: 10px;
  overflow: hidden;
  color: #f5f5f4;
  font-size: 13px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.site-footer {
  margin-top: 76px;
  border-top: 1px solid rgba(68, 64, 60, 0.88);
  background: #090706;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-brand p,
.footer-links a {
  color: #a8a29e;
}

.footer-brand p {
  max-width: 540px;
  margin: 16px 0 0;
}

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

.footer-links {
  display: grid;
  gap: 8px;
}

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

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

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

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

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

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

  .nav-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 760px;
  }

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

  .hero-poster {
    max-width: 320px;
    margin: 0 auto;
  }

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

  .filter-controls {
    grid-template-columns: 1fr 1fr;
  }

  .ranking-item {
    grid-template-columns: 52px 92px 1fr;
  }

  .ranking-cover img {
    width: 92px;
  }

  .ranking-item .text-button {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

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

  .header-inner {
    min-height: 64px;
  }

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

  .hero-carousel {
    min-height: 760px;
  }

  .hero-content {
    gap: 28px;
    padding-top: 86px;
  }

  .hero-actions,
  .section-head,
  .search-hero-form {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .section {
    padding: 52px 0;
  }

  .page-hero {
    padding: 54px 0 38px;
  }

  .detail-hero {
    padding: 20px;
  }

  .content-card {
    padding: 22px;
  }

  .ranking-item {
    grid-template-columns: 44px 78px 1fr;
    gap: 12px;
  }

  .ranking-number {
    width: 42px;
    height: 42px;
  }

  .ranking-cover img {
    width: 78px;
  }
}
