*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.96));
  border-bottom: 1px solid #fcd34d;
  box-shadow: 0 8px 24px rgba(120, 53, 15, 0.08);
  backdrop-filter: blur(16px);
}

.header-inner,
.footer-inner,
.container,
.hero-content {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #78350f;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 10px 20px rgba(234, 88, 12, 0.24);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.03em;
}

.brand-text small {
  color: #b45309;
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  color: #78350f;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

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

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

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid #f6c453;
  color: #78350f;
  background: rgba(255, 255, 255, 0.86);
  outline: none;
  border-radius: 999px;
  padding: 10px 14px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input {
  width: 240px;
}

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

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.filter-bar button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button,
.primary-button,
.filter-bar button {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.22);
}

.secondary-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.34);
  backdrop-filter: blur(8px);
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.filter-bar button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(234, 88, 12, 0.28);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(252, 211, 77, 0.24);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #78350f;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid #fcd34d;
  padding: 16px;
  background: rgba(255, 255, 255, 0.96);
}

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

.mobile-search {
  margin-bottom: 12px;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
}

.mobile-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
}

.mobile-link:hover {
  background: #fffbeb;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.48) 44%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 54px;
  z-index: 2;
  transform: translateX(-50%);
  color: #ffffff;
}

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

.hero-meta,
.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-meta span,
.movie-type,
.detail-pill,
.rank-badge,
.movie-links a,
.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-meta span,
.movie-type,
.detail-pill,
.tag-pill {
  padding: 5px 10px;
}

.hero-meta span:first-child,
.movie-type {
  color: #ffffff;
  background: rgba(245, 158, 11, 0.92);
  backdrop-filter: blur(8px);
}

.hero-meta span:not(:first-child) {
  background: rgba(255, 255, 255, 0.16);
}

.hero h1 {
  margin: 16px 0 18px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.36);
  transform: translateY(-1px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 28px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

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

.main-content {
  padding: 72px 0 0;
}

.section {
  margin-bottom: 80px;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
  color: #78350f;
  margin: 0;
  font-weight: 900;
  line-height: 1.15;
}

.section-heading h2 {
  font-size: 34px;
}

.section-heading p,
.page-title p,
.footer-brand p,
.movie-info p,
.category-card p,
.detail-lead,
.prose p {
  color: #6b7280;
}

.section-link {
  color: #d97706;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(120, 53, 15, 0.1);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 46px rgba(120, 53, 15, 0.16);
}

.movie-card.is-hidden {
  display: none;
}

.movie-thumb {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #111827;
}

.movie-card-wide .movie-thumb {
  aspect-ratio: 16 / 9;
}

.movie-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.72) 100%);
  opacity: 0.86;
}

.movie-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .movie-thumb img,
.compact-link:hover img,
.related-card:hover img {
  transform: scale(1.08);
}

.movie-type {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

.movie-info {
  padding: 18px;
}

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

.movie-info h3 {
  margin: 10px 0 8px;
  color: #78350f;
  font-size: 20px;
  line-height: 1.35;
}

.movie-info h3 a:hover {
  color: #d97706;
}

.movie-info p {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  margin: 0;
}

.movie-links {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
}

.movie-links a {
  color: #b45309;
  padding: 6px 10px;
  background: #fffbeb;
}

.movie-links a:last-child {
  color: #ffffff;
  background: #f59e0b;
}

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

.category-chip,
.category-card {
  display: block;
  border: 1px solid #fde68a;
  border-radius: 22px;
  padding: 22px;
  background: linear-gradient(135deg, #fffbeb, #fff7ed);
  box-shadow: 0 12px 26px rgba(120, 53, 15, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-chip:hover,
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(120, 53, 15, 0.13);
}

.category-chip strong,
.category-card h2 {
  display: block;
  color: #78350f;
  font-size: 20px;
  margin-bottom: 8px;
}

.category-chip span,
.category-card p {
  font-size: 14px;
}

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

.page-title h1 {
  font-size: clamp(36px, 5vw, 56px);
}

.page-title p {
  max-width: 760px;
  margin: 12px 0 0;
  font-size: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr) auto;
  gap: 12px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid #fde68a;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(120, 53, 15, 0.08);
  backdrop-filter: blur(12px);
}

.no-results {
  display: none;
  padding: 52px 20px;
  text-align: center;
  color: #6b7280;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(120, 53, 15, 0.08);
}

.no-results.is-visible {
  display: block;
}

.detail-main {
  padding-top: 32px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
  gap: 34px;
  align-items: start;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.28);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.44));
  cursor: pointer;
}

.play-overlay.is-hidden {
  display: none;
}

.play-button {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  font-size: 34px;
  transform: translateZ(0);
}

.detail-title {
  margin: 28px 0 22px;
}

.detail-title h1 {
  margin-bottom: 14px;
  font-size: clamp(32px, 5vw, 50px);
}

.detail-lead {
  color: #92400e;
  font-size: 19px;
  font-weight: 700;
}

.detail-pills,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 28px;
}

.detail-pill,
.tag-pill {
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.content-panel,
.sidebar-panel {
  border: 1px solid #fde68a;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(120, 53, 15, 0.08);
}

.content-panel {
  padding: 30px;
}

.prose h2 {
  margin: 0 0 14px;
  color: #78350f;
  font-size: 26px;
}

.prose p {
  margin: 0 0 22px;
  font-size: 16px;
}

.sidebar {
  position: sticky;
  top: 94px;
}

.sidebar-panel {
  padding: 22px;
}

.sidebar-panel h2 {
  margin: 0 0 18px;
  color: #78350f;
  font-size: 24px;
}

.compact-link {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #fde68a;
}

.compact-link:last-child {
  border-bottom: 0;
}

.compact-link img {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.3s ease;
}

.compact-link strong {
  display: block;
  color: #78350f;
  line-height: 1.35;
}

.compact-link small {
  display: block;
  color: #6b7280;
  margin-top: 4px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.related-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(120, 53, 15, 0.08);
}

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

.related-card strong {
  display: block;
  padding: 14px;
  color: #78350f;
  line-height: 1.35;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid #fde68a;
  background: linear-gradient(180deg, #fffbeb, #ffedd5);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) 0.7fr 1fr;
  gap: 36px;
  padding: 44px 0 32px;
}

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

.footer-links,
.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
}

.footer-links a,
.footer-tags a {
  color: #92400e;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.6);
}

.footer-bottom {
  padding: 18px;
  text-align: center;
  color: #b45309;
  border-top: 1px solid #fde68a;
}

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

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

  .header-search input {
    width: 180px;
  }
}

@media (max-width: 920px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    height: 66vh;
    min-height: 500px;
  }

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

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

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

  .filter-bar input {
    grid-column: 1 / -1;
  }

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

  .sidebar {
    position: static;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .footer-inner,
  .container,
  .hero-content {
    width: min(100% - 24px, 1280px);
  }

  .brand-text small {
    display: none;
  }

  .hero {
    height: 72vh;
    min-height: 520px;
  }

  .hero-content {
    bottom: 52px;
  }

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

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

  .hero-arrow {
    display: none;
  }

  .main-content {
    padding-top: 48px;
  }

  .section {
    margin-bottom: 56px;
  }

  .section-heading {
    display: block;
  }

  .section-heading h2 {
    font-size: 28px;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .content-panel,
  .sidebar-panel {
    padding: 20px;
  }

  .play-button {
    width: 74px;
    height: 74px;
    font-size: 28px;
  }
}
