* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #111827;
  background: #f9fafb;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #92400e;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(180, 83, 9, 0.22);
}

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

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

.nav-link,
.mobile-nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: #4b5563;
  font-weight: 650;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #92400e;
  background: #fef3c7;
}

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

.header-search input,
.mobile-search input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
  border: 1px solid #d1d5db;
  background: #ffffff;
  border-radius: 999px;
  color: #111827;
  outline: none;
  transition: border 0.25s ease, box-shadow 0.25s ease;
}

.header-search input {
  width: 238px;
  padding: 9px 14px;
}

.header-search button,
.mobile-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: #d97706;
  padding: 9px 16px;
  font-weight: 700;
}

.header-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  padding: 8px 12px;
  color: #111827;
  font-size: 24px;
}

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

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-search input {
  width: 100%;
  padding: 10px 14px;
}

.mobile-menu nav {
  display: grid;
  gap: 8px;
}

.hero-carousel,
.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: #111827;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

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

.hero-image,
.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade,
.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.72) 42%, rgba(17, 24, 39, 0.22)), linear-gradient(0deg, rgba(17, 24, 39, 0.9), transparent 55%);
}

.hero-content,
.page-hero > div,
.detail-hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-content {
  min-height: 680px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1180px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 12px;
  color: #f59e0b;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-summary,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  margin: 22px 0 0;
  color: #f3f4f6;
  font-size: 18px;
}

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

.hero-tags,
.detail-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-tags a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 750;
}

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

.primary-button,
.secondary-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 16px 34px rgba(180, 83, 9, 0.28);
}

.secondary-button,
.section-link {
  color: #92400e;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.primary-button:hover,
.secondary-button:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-control-panel {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 36px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.hero-dot,
.hero-arrow {
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-dot {
  width: 34px;
  height: 6px;
  padding: 0;
  border-radius: 999px;
}

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

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

.section {
  padding: 72px 0;
}

.section > .section-heading,
.section > .movie-grid,
.section > .category-grid,
.section > .category-panel-grid,
.section > .ranking-grid,
.section > .ranking-list-large,
.section > .filter-bar,
.section > .player-card,
.section > .content-card,
.section > .related-section {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.section-light {
  background: #ffffff;
}

.section-soft {
  background: linear-gradient(135deg, #fffbeb, #f0f9ff);
}

.section-dark {
  color: #ffffff;
  background: #111827;
}

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

.section-heading h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.dark-heading h2 {
  color: #ffffff;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: #f59e0b;
  box-shadow: 0 22px 54px rgba(180, 83, 9, 0.18);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #92400e);
}

.movie-poster img,
.mini-card img,
.ranking-poster img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .movie-poster img,
.mini-card:hover img,
.ranking-item:hover .ranking-poster img {
  transform: scale(1.08);
}

.poster-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.76);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

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

.movie-card-title {
  display: block;
  color: #111827;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
}

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

.movie-card-text {
  min-height: 48px;
  margin: 10px 0 12px;
  color: #4b5563;
  font-size: 14px;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 12px;
}

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

.category-tile,
.category-panel {
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #fde68a;
  box-shadow: 0 18px 44px rgba(180, 83, 9, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 58px rgba(180, 83, 9, 0.18);
}

.category-tile span,
.category-panel-name {
  color: #92400e;
  font-size: 22px;
  font-weight: 900;
}

.category-tile small,
.category-panel-text {
  margin-top: 10px;
  color: #4b5563;
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 86px 54px 1fr;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(245, 158, 11, 0.28);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  padding: 14px;
}

.section-light .ranking-item {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 12px 36px rgba(17, 24, 39, 0.06);
}

.ranking-poster {
  width: 86px;
  height: 118px;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

.ranking-number {
  color: #f59e0b;
  font-size: 30px;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.ranking-title {
  color: inherit;
  font-size: 20px;
  font-weight: 850;
}

.ranking-content p:last-child {
  margin: 8px 0 0;
  color: #6b7280;
}

.section-dark .ranking-content p:last-child,
.section-dark .movie-meta {
  color: #d1d5db;
}

.page-hero {
  min-height: 320px;
  display: flex;
  align-items: center;
  color: #ffffff;
  background: radial-gradient(circle at 15% 15%, rgba(245, 158, 11, 0.42), transparent 34%), linear-gradient(135deg, #111827, #1f2937 52%, #78350f);
}

.compact-hero,
.category-hero,
.ranking-hero,
.search-hero {
  min-height: 360px;
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.filter-bar input {
  flex: 1;
  padding: 12px 16px;
}

.filter-bar select {
  min-width: 180px;
  padding: 12px 16px;
}

.search-page-form {
  max-width: 720px;
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.search-page-form input {
  flex: 1;
  padding: 14px 18px;
}

.detail-hero {
  min-height: 760px;
  color: #ffffff;
}

.detail-hero-inner {
  padding: 42px 0 76px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #f3f4f6;
  margin-bottom: 34px;
}

.breadcrumb a {
  color: #fbbf24;
}

.detail-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-cover {
  display: block;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.32);
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  background: #111827;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

.detail-info h1 {
  max-width: 880px;
}

.detail-meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.detail-meta-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.detail-meta-list span {
  color: #d1d5db;
}

.detail-meta-list strong {
  color: #ffffff;
  text-align: right;
}

.detail-main {
  margin-top: -54px;
  position: relative;
  z-index: 5;
  border-radius: 34px 34px 0 0;
}

.player-card,
.content-card {
  border: 1px solid #e5e7eb;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(17, 24, 39, 0.1);
}

.player-card {
  overflow: hidden;
}

.video-frame {
  position: relative;
  background: #000000;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
}

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

.player-play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #d97706;
  box-shadow: 0 18px 48px rgba(217, 119, 6, 0.38);
  font-size: 30px;
}

.player-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
}

.player-title-row h2,
.content-card h2 {
  margin: 0;
  color: #111827;
  font-size: 26px;
}

.player-title-row span {
  color: #6b7280;
}

.content-card {
  margin-top: 26px;
  padding: 30px;
}

.content-card p {
  margin: 12px 0 24px;
  color: #374151;
  font-size: 17px;
}

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

.mini-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 10;
  background: #111827;
}

.mini-card span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  color: #ffffff;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.48);
}

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

.site-footer {
  color: #d1d5db;
  background: #111827;
}

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

.footer-inner p {
  max-width: 660px;
  margin: 16px 0 0;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 8px 12px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  text-align: center;
  color: #9ca3af;
}

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

  .desktop-nav,
  .header-search {
    display: none;
  }

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

@media (max-width: 800px) {
  .hero-carousel,
  .hero-content {
    min-height: 620px;
  }

  .section {
    padding: 52px 0;
  }

  .section-heading,
  .player-title-row,
  .filter-bar,
  .search-page-form {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid-6,
  .movie-grid-5,
  .movie-grid-4,
  .category-grid,
  .category-panel-grid,
  .ranking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .ranking-poster {
    width: 70px;
    height: 98px;
  }

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

  .detail-cover {
    width: min(260px, 78vw);
  }

  .detail-meta-list,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 540px) {
  .header-inner {
    min-height: 64px;
  }

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

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .hero-summary,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .movie-grid-6,
  .movie-grid-5,
  .movie-grid-4,
  .category-grid,
  .category-panel-grid {
    grid-template-columns: 1fr;
  }

  .movie-card {
    display: grid;
    grid-template-columns: 118px 1fr;
  }

  .movie-poster {
    aspect-ratio: auto;
    height: 100%;
    min-height: 176px;
  }

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

  .ranking-number {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    font-size: 22px;
    background: rgba(245, 158, 11, 0.14);
    border-radius: 12px;
    text-align: center;
  }

  .ranking-poster {
    display: none;
  }

  .ranking-content {
    grid-column: 2;
  }
}
