:root {
  --page-bg: #f8fafc;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --amber: #d97706;
  --amber-dark: #92400e;
  --amber-soft: #fef3c7;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--page-bg);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1280px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.26);
}

.logo-text {
  font-size: 20px;
  letter-spacing: -0.02em;
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 10px 15px;
  color: #4b5563;
  font-weight: 650;
  transition:
    color 0.2s ease,
    background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--amber-dark);
  background: #fff7ed;
}

.header-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.header-search input {
  width: 220px;
  padding: 10px 14px;
  outline: none;
  color: var(--ink);
}

.header-search button,
.hero-search button {
  padding: 10px 16px;
  color: #fff;
  background: var(--amber);
  font-weight: 700;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
}

.menu-button span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: var(--ink);
}

.mobile-nav {
  display: none;
  padding: 0 24px 18px;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-carousel {
  position: relative;
  height: min(76vh, 680px);
  min-height: 560px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.02);
  transition:
    opacity 0.65s ease,
    transform 0.65s ease;
}

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

.hero-overlay,
.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(17, 24, 39, 0.92),
      rgba(17, 24, 39, 0.58) 48%,
      rgba(17, 24, 39, 0.22)
    ),
    radial-gradient(circle at 72% 18%, rgba(245, 158, 11, 0.3), transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  padding-right: 24px;
  color: #fff;
}

.hero-kicker {
  margin-bottom: 14px;
  color: #fbbf24;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.detail-hero h1,
.page-hero h1 {
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-content p,
.detail-hero p,
.page-hero p {
  max-width: 720px;
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #fde68a;
  border: 1px solid rgba(253, 230, 138, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.tag-row span {
  color: var(--amber-dark);
  background: #fff7ed;
}

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

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

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  box-shadow: 0 16px 36px rgba(217, 119, 6, 0.28);
}

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

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.primary-button.wide {
  width: 100%;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition:
    width 0.2s ease,
    background 0.2s ease;
}

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

.hero-search {
  position: absolute;
  z-index: 4;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 28px;
  display: flex;
  overflow: hidden;
  width: min(420px, calc(100vw - 48px));
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  color: #fff;
  outline: none;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

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

.tinted-section {
  max-width: none;
  padding-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  padding-right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  background: linear-gradient(180deg, #fff7ed, #fff);
}

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

.section-heading h2,
.detail-article h2,
.info-card h2,
.topic-panel h2 {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading p,
.topic-panel p,
.info-card,
.detail-article p {
  color: var(--muted);
  line-height: 1.8;
}

.section-more,
.text-button {
  color: var(--amber-dark);
  background: #fff7ed;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  display: block;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(17, 24, 39, 0.82)),
    #1f2937;
  background-position: center;
  background-size: cover;
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 34%, rgba(0, 0, 0, 0.68));
}

.poster-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(217, 119, 6, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.movie-card:hover .poster-play,
.category-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  z-index: 3;
  left: 12px;
  top: 12px;
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta {
  min-height: 20px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
}

.card-body h3 {
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.card-body p {
  min-height: 44px;
  margin: 10px 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: var(--radius-xl);
  padding: 24px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(146, 64, 14, 0.82), rgba(17, 24, 39, 0.78)),
    #111827;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.68));
}

.category-card span,
.category-card small {
  position: relative;
  z-index: 1;
}

.category-card span {
  font-size: 24px;
  font-weight: 900;
}

.category-card small {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
}

.two-column,
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.topic-panel,
.info-card,
.detail-article,
.filter-panel {
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.topic-panel,
.info-card,
.detail-article {
  padding: 28px;
}

.topic-links,
.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.topic-links a,
.mini-links a {
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--amber-dark);
  background: #fff7ed;
  font-weight: 750;
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 16px;
  padding: 14px 16px;
  background: #fff;
  transition:
    transform 0.2s ease,
    border 0.2s ease;
}

.rank-row:hover {
  border-color: rgba(217, 119, 6, 0.5);
  transform: translateX(4px);
}

.rank-index {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #111827;
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-info {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #111827, #78350f 65%, #f59e0b);
}

.small-hero {
  padding: 86px 24px;
}

.small-hero > div {
  max-width: 1280px;
  margin: 0 auto;
}

.category-overview-grid {
  display: grid;
  gap: 22px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.category-cover {
  min-height: 180px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(217, 119, 6, 0.42), rgba(17, 24, 39, 0.78)),
    #111827;
  background-position: center;
  background-size: cover;
}

.category-overview-card h2 {
  margin: 4px 0 12px;
  font-size: 28px;
  font-weight: 900;
}

.category-overview-card p {
  color: var(--muted);
  line-height: 1.8;
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding: 18px;
}

.filter-label {
  color: var(--amber-dark);
  font-weight: 900;
}

.filter-control {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.filter-control input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  outline: none;
}

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

.filter-control span {
  color: var(--muted);
  white-space: nowrap;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
}

.pagination a {
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

.pagination a.active,
.pagination a:hover {
  color: #fff;
  border-color: var(--amber);
  background: var(--amber);
}

.detail-hero {
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  background-position: center;
  background-size: cover;
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 110px 24px 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.76);
}

.player-shell {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000;
  box-shadow: var(--shadow);
}

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

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

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(217, 119, 6, 0.94);
  box-shadow: 0 18px 44px rgba(217, 119, 6, 0.42);
  transform: translate(-50%, -50%);
}

.player-start span {
  margin-left: 5px;
  font-size: 34px;
}

.video-player.is-playing .player-start {
  display: none;
}

.detail-article {
  margin-top: 28px;
}

.detail-article h2 + p {
  margin-top: 12px;
}

.detail-article p + h2 {
  margin-top: 28px;
}

.info-card {
  position: sticky;
  top: 98px;
}

.info-card dl {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 22px 0;
}

.info-card dt {
  color: var(--muted);
  font-weight: 700;
}

.info-card dd {
  font-weight: 800;
}

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

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px;
  display: flex;
  justify-content: space-between;
  gap: 26px;
}

.footer-logo {
  color: #fff;
  font-size: 22px;
}

.footer-inner p {
  margin-top: 12px;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  max-width: 620px;
}

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

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 44px;
  height: 44px;
  display: none;
  border-radius: 50%;
  color: #fff;
  background: var(--amber);
  box-shadow: var(--shadow);
}

.back-top.visible {
  display: grid;
  place-items: center;
}

[hidden] {
  display: none !important;
}

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

  .header-search {
    display: none;
  }
}

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

  .menu-button {
    display: flex;
    margin-left: auto;
  }

  .mobile-nav.open {
    display: flex;
  }

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

  .hero-search {
    left: 24px;
    right: 24px;
    bottom: 82px;
    width: auto;
  }

  .hero-dots {
    bottom: 34px;
  }

  .movie-grid,
  .category-grid,
  .two-column,
  .detail-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-column,
  .detail-layout,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .info-card {
    position: static;
  }

  .footer-inner {
    flex-direction: column;
  }

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

@media (max-width: 620px) {
  .header-inner {
    min-height: 64px;
    padding: 0 16px;
  }

  .logo-text {
    font-size: 17px;
  }

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

  .hero-content {
    margin-left: 18px;
    padding-right: 18px;
  }

  .hero-content p,
  .detail-hero p,
  .page-hero p {
    font-size: 16px;
  }

  .content-section,
  .tinted-section {
    padding: 48px 16px;
  }

  .small-hero {
    padding: 64px 16px;
  }

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

  .rank-row {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .rank-info {
    grid-column: 2;
  }

  .filter-panel,
  .filter-control {
    align-items: stretch;
    flex-direction: column;
  }

  .player-start {
    width: 68px;
    height: 68px;
  }
}
