* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #d97706, #ea580c);
  box-shadow: 0 12px 28px rgba(124, 45, 18, 0.22);
}

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

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

.brand {
  font-size: 20px;
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff7ed;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 600;
}

.main-nav a,
.mobile-nav a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

.main-nav a:hover,
.mobile-nav a:hover {
  color: #ffedd5;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
}

.mobile-nav {
  display: none;
  padding: 12px 16px 18px;
  background: #b45309;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.mobile-nav a {
  display: block;
  padding: 10px 0;
  font-weight: 700;
}

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

.hero-carousel {
  position: relative;
  height: 540px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.38) 52%, rgba(0, 0, 0, 0.15));
}

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

.hero-tag,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 6px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: #d97706;
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 14px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.hero-content p {
  max-width: 700px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 20px);
}

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  min-height: 46px;
  padding: 0 24px;
  color: #ffffff;
  background: #d97706;
  box-shadow: 0 12px 24px rgba(217, 119, 6, 0.28);
}

.primary-button:hover {
  background: #b45309;
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(217, 119, 6, 0.36);
}

.ghost-button {
  min-height: 46px;
  padding: 0 22px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  cursor: pointer;
  font-size: 34px;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-control--prev {
  left: 20px;
}

.hero-control--next {
  right: 20px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: #d97706;
}

.home-search {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 430px);
  align-items: center;
  gap: 24px;
  margin-top: 34px;
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.home-search h2 {
  margin: 0 0 6px;
  font-size: 26px;
}

.home-search p {
  margin: 0;
  color: #6b7280;
}

.home-search-box {
  display: flex;
  gap: 12px;
}

.home-search-box input,
.filter-bar input,
.filter-bar select,
.search-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 0 14px;
  color: #111827;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.home-search-box input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-input:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.section-block {
  padding: 64px 0;
}

.section-band {
  background: #ffffff;
}

.section-heading {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 900;
}

.section-heading span {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d97706, rgba(217, 119, 6, 0));
}

.section-more {
  min-height: 38px;
  padding: 0 16px;
  color: #92400e;
  background: #ffedd5;
}

.section-more:hover {
  color: #ffffff;
  background: #d97706;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.14);
}

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

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

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

.play-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 42px;
  background: rgba(0, 0, 0, 0.34);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .play-mark {
  opacity: 1;
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #d97706, #ea580c);
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.movie-info {
  padding: 16px;
}

.movie-title {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover {
  color: #d97706;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.movie-meta span,
.detail-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #92400e;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 800;
}

.movie-info p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0;
  overflow: hidden;
  color: #6b7280;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.wide-list .movie-card {
  display: grid;
  grid-template-columns: 180px 1fr;
}

.wide-list .movie-poster {
  aspect-ratio: auto;
  height: 100%;
}

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

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 22px;
  color: #ffffff;
  background: #111827;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.category-card:hover img {
  opacity: 0.78;
  transform: scale(1.08);
}

.category-card div {
  position: absolute;
  inset: auto 0 0;
  padding: 22px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0));
}

.category-card span {
  font-size: 12px;
  font-weight: 900;
  color: #fbbf24;
}

.category-card h3 {
  margin: 8px 0 6px;
  font-size: 24px;
}

.category-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #e5e7eb;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-shell {
  padding-bottom: 40px;
}

.page-hero {
  margin-top: 34px;
  padding: 42px;
  border-radius: 28px;
  background: linear-gradient(135deg, #111827, #7c2d12 58%, #d97706);
  color: #ffffff;
  box-shadow: 0 20px 50px rgba(124, 45, 18, 0.18);
}

.page-hero h1 {
  max-width: 820px;
  margin: 18px 0 12px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 860px;
  margin: 0;
  color: #ffedd5;
  font-size: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.detail-page {
  background: #f7f7f6;
}

.detail-hero {
  padding: 48px 0;
  color: #ffffff;
  background: radial-gradient(circle at 22% 0%, rgba(251, 191, 36, 0.34), transparent 32%), linear-gradient(135deg, #0f172a, #7c2d12 62%, #111827);
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: minmax(220px, 310px) 1fr;
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: #fed7aa;
  font-weight: 700;
}

.breadcrumbs a:hover {
  color: #ffffff;
}

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

.detail-one-line {
  max-width: 860px;
  margin: 0 0 20px;
  color: #e5e7eb;
  font-size: 18px;
}

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

.tag-list span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

.detail-actions {
  margin-top: 24px;
}

.player-section {
  padding: 44px 0 12px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.2);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.18));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover span {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: #d97706;
  font-size: 38px;
  box-shadow: 0 18px 42px rgba(217, 119, 6, 0.32);
}

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

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 32px 0 18px;
}

.detail-content article {
  padding: 26px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.detail-content h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-content p {
  margin: 0;
  color: #4b5563;
}

.search-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: start center;
  padding: 90px 18px 32px;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(8px);
}

.search-panel[hidden] {
  display: none;
}

.search-shell {
  position: relative;
  width: min(760px, 100%);
  max-height: min(720px, calc(100vh - 130px));
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  padding: 26px;
}

.search-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  cursor: pointer;
  font-size: 24px;
}

.search-label {
  display: block;
  margin-bottom: 12px;
  font-size: 24px;
  font-weight: 900;
}

.search-results {
  display: grid;
  gap: 12px;
  max-height: 520px;
  margin-top: 18px;
  overflow: auto;
}

.search-result-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f9fafb;
  transition: background 0.2s ease;
}

.search-result-item:hover {
  background: #ffedd5;
}

.search-result-item img {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
}

.search-result-item strong {
  display: block;
  margin-bottom: 5px;
}

.search-result-item span {
  color: #6b7280;
  font-size: 14px;
}

.empty-tip {
  padding: 20px;
  border-radius: 14px;
  color: #6b7280;
  background: #f9fafb;
  text-align: center;
}

.site-footer {
  margin-top: 42px;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 46px 0;
}

.footer-grid p {
  max-width: 520px;
  color: #9ca3af;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
  color: #9ca3af;
}

.footer-grid a:hover {
  color: #fbbf24;
}

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

@media (max-width: 1024px) {
  .main-nav {
    gap: 16px;
    font-size: 14px;
  }

  .movie-grid,
  .movie-grid--small,
  .movie-grid--ranking,
  .movie-grid--listing {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

  .menu-toggle {
    display: inline-grid;
  }

  .brand {
    font-size: 17px;
  }

  .hero-carousel {
    height: 520px;
  }

  .hero-content {
    bottom: 70px;
  }

  .hero-control {
    display: none;
  }

  .home-search,
  .detail-hero-inner,
  .detail-content,
  .filter-bar,
  .wide-list .movie-card {
    grid-template-columns: 1fr;
  }

  .home-search-box {
    flex-direction: column;
  }

  .section-heading {
    grid-template-columns: 1fr auto;
  }

  .section-heading span {
    display: none;
  }

  .movie-grid,
  .movie-grid--small,
  .movie-grid--ranking,
  .movie-grid--listing,
  .wide-list,
  .category-grid,
  .category-grid--full {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-title {
    min-height: 44px;
    font-size: 15px;
  }

  .movie-info p {
    display: none;
  }

  .page-hero {
    padding: 28px;
  }

  .detail-hero {
    padding: 32px 0;
  }

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

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

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

  .hero-content h1 {
    font-size: 34px;
  }

  .movie-grid,
  .movie-grid--small,
  .movie-grid--ranking,
  .movie-grid--listing,
  .category-grid,
  .category-grid--full {
    grid-template-columns: 1fr;
  }

  .player-cover span {
    width: 64px;
    height: 64px;
    font-size: 30px;
  }
}
