:root {
  --site-amber: #f59e0b;
  --site-orange: #f97316;
  --site-red: #ef4444;
  --site-bg: #fff7ed;
  --site-text: #1f2937;
  --site-muted: #6b7280;
  --site-card: #ffffff;
  --site-dark: #111827;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--site-text);
  background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 46%, #fffbeb 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

img {
  max-width: 100%;
}

.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));
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 28px rgba(180, 83, 9, 0.12);
}

.nav-wrap {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  color: #111827;
  white-space: nowrap;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--site-amber), var(--site-orange));
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.32);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 700;
  color: #4b5563;
}

.nav-links a:hover {
  color: var(--site-orange);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.header-search input,
.filter-input,
.filter-select {
  border: 2px solid #fde68a;
  background: #fff;
  color: #111827;
  border-radius: 999px;
  padding: 10px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: var(--site-amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.search-button,
.mobile-toggle,
.carousel-button,
.back-top {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--site-amber), var(--site-orange));
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-button {
  padding: 10px 16px;
  font-weight: 800;
}

.search-button:hover,
.mobile-toggle:hover,
.carousel-button:hover,
.back-top:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.36);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  font-size: 22px;
  line-height: 1;
}

.mobile-panel {
  display: none;
  padding: 0 24px 18px;
  border-top: 1px solid rgba(245, 158, 11, 0.18);
}

.mobile-panel a {
  display: block;
  padding: 12px 0;
  font-weight: 800;
  color: #374151;
}

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

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

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

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

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.eyebrow,
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--site-amber);
  font-size: 13px;
  font-weight: 900;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 18px 0 18px;
  color: #fff;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 620px;
  margin: 0 0 30px;
  color: #e5e7eb;
  font-size: 20px;
  line-height: 1.8;
}

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

.primary-button,
.secondary-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  padding: 13px 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--site-amber), var(--site-orange));
  box-shadow: 0 16px 32px rgba(245, 158, 11, 0.32);
}

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

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

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--site-amber);
}

.section,
.page-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px;
}

.section-wide {
  padding: 64px 0;
  background: linear-gradient(90deg, #fef3c7, #ffedd5);
}

.section-wide-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

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

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

.section-desc,
.page-intro {
  margin-top: 10px;
  color: #6b7280;
  font-size: 16px;
  line-height: 1.8;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: var(--site-card);
  box-shadow: 0 12px 28px rgba(146, 64, 14, 0.12);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(146, 64, 14, 0.18);
}

.card-cover {
  position: relative;
  height: 230px;
  overflow: hidden;
  background: #111827;
}

.movie-card.large .card-cover {
  height: 330px;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.08);
}

.card-badge,
.rank-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--site-amber);
  font-size: 12px;
  font-weight: 900;
}

.card-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 70%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-gradient {
  opacity: 1;
}

.card-body {
  padding: 18px;
}

.card-title {
  margin: 0 0 8px;
  color: #111827;
  font-size: 19px;
  font-weight: 950;
  line-height: 1.34;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-meta,
.detail-meta,
.ranking-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.card-meta span,
.detail-meta span,
.ranking-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(146, 64, 14, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.horizontal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(146, 64, 14, 0.18);
}

.horizontal-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.horizontal-content {
  padding: 18px 18px 18px 0;
}

.horizontal-content h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 950;
}

.horizontal-content p {
  margin: 0 0 14px;
  color: #6b7280;
  line-height: 1.7;
}

.carousel-shell {
  position: relative;
}

.carousel-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 4px 54px 16px;
  scrollbar-width: none;
}

.carousel-row::-webkit-scrollbar {
  display: none;
}

.carousel-row .movie-card {
  min-width: 310px;
}

.carousel-button {
  position: absolute;
  top: 44%;
  z-index: 3;
  width: 42px;
  height: 42px;
  font-size: 26px;
}

.carousel-button.prev {
  left: 0;
}

.carousel-button.next {
  right: 0;
}

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

.category-card {
  display: block;
  padding: 26px;
  min-height: 150px;
  color: #fff;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--site-amber), var(--site-orange));
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.24);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #fb923c, #ef4444);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #facc15, #f59e0b);
}

.category-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 22px 44px rgba(245, 158, 11, 0.34);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
  font-weight: 950;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
}

.dark-band {
  color: #fff;
  background: linear-gradient(135deg, #78350f, #9a3412);
}

.dark-band .section-title {
  color: #fff;
}

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

.recommend-card {
  padding: 30px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  transition: background 0.2s ease, transform 0.2s ease;
}

.recommend-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.2);
}

.recommend-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 950;
}

.recommend-card p {
  margin: 0 0 18px;
  color: #f3f4f6;
  line-height: 1.75;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 26px 0 30px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 28px rgba(146, 64, 14, 0.1);
}

.filter-input {
  min-width: 280px;
  flex: 1 1 280px;
}

.filter-select {
  min-width: 150px;
  border-radius: 14px;
}

.page-hero {
  background: linear-gradient(135deg, #78350f, #c2410c);
  color: #fff;
  padding: 72px 24px;
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 950;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

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

.breadcrumb a:hover {
  color: var(--site-orange);
}

.detail-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px 72px;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(320px, 0.72fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-card {
  overflow: hidden;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(146, 64, 14, 0.14);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0f172a;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0f172a;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.54), rgba(0, 0, 0, 0.22));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.play-button {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 34px;
  background: linear-gradient(135deg, var(--site-amber), var(--site-orange));
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.38);
  cursor: pointer;
}

.player-title {
  padding: 22px;
}

.player-title h1 {
  margin: 0 0 12px;
  color: #111827;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
  font-weight: 950;
}

.detail-card {
  padding: 24px;
}

.detail-card h2,
.related-section h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 26px;
  font-weight: 950;
}

.detail-card p {
  margin: 0 0 18px;
  color: #4b5563;
  line-height: 1.85;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span,
.tag-list a {
  padding: 7px 11px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-size: 13px;
  font-weight: 800;
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 72px 142px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(146, 64, 14, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(146, 64, 14, 0.17);
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--site-amber), var(--site-red));
  font-size: 22px;
  font-weight: 950;
}

.ranking-item img {
  width: 142px;
  height: 96px;
  object-fit: cover;
  border-radius: 16px;
}

.ranking-item h2,
.ranking-item h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 950;
}

.ranking-item p {
  margin: 0 0 12px;
  color: #6b7280;
  line-height: 1.7;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: #d1d5db;
  font-weight: 700;
}

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

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

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 46px;
  height: 46px;
  font-size: 22px;
}

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

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

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

@media (max-width: 820px) {
  .nav-links,
  .nav-actions {
    display: none;
  }

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

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

  .hero-slider {
    height: 560px;
  }

  .hero-copy p {
    font-size: 17px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid.compact,
  .recommend-grid,
  .category-grid {
    grid-template-columns: 1fr 1fr;
  }

  .horizontal-card,
  .ranking-item {
    grid-template-columns: 1fr;
  }

  .horizontal-card img,
  .ranking-item img {
    width: 100%;
    height: 210px;
  }

  .horizontal-content {
    padding: 0 18px 18px;
  }
}

@media (max-width: 560px) {
  .nav-wrap {
    padding: 0 16px;
  }

  .hero-slider {
    height: 520px;
  }

  .hero-inner,
  .section,
  .section-wide-inner,
  .page-section,
  .detail-wrap {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .movie-grid,
  .movie-grid.compact,
  .recommend-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .carousel-row {
    padding-left: 0;
    padding-right: 0;
  }

  .carousel-button {
    display: none;
  }

  .filter-input,
  .filter-select {
    width: 100%;
    min-width: 0;
  }
}
