:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --orange: #ea580c;
  --yellow: #facc15;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.14);
  --soft-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--gray-50);
  color: var(--gray-900);
  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: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

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

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
}

.brand-text {
  font-size: 24px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 700;
  color: var(--gray-700);
}

.nav-link {
  position: relative;
  padding: 20px 0;
  transition: color 0.2s ease;
}

.nav-link::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--orange));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
  content: "";
}

.nav-link:hover,
.nav-link.active {
  color: var(--red);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

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

.header-search input,
.mobile-search input,
.local-search {
  width: 250px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 10px 16px;
  outline: none;
  background: #fff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.local-search:focus,
.sort-select:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18);
}

.header-search button,
.mobile-search button,
.primary-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #fff;
  background: var(--red);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-btn:hover {
  transform: translateY(-1px) scale(1.02);
  background: var(--red-dark);
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.28);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 22px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--gray-200);
  padding: 16px 24px 22px;
  background: #fff;
}

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

.mobile-nav {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.mobile-link {
  padding: 12px 10px;
  border-radius: 12px;
  font-weight: 700;
  color: var(--gray-700);
}

.mobile-link.active,
.mobile-link:hover {
  color: var(--red);
  background: #fef2f2;
}

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(180deg, #111827, #1f2937);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transition: opacity 0.8s ease, transform 1s ease;
  transform: scale(1.03);
}

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

.hero-backdrop {
  position: absolute;
  inset: -24px;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.62), rgba(17, 24, 39, 0.28));
  backdrop-filter: blur(8px) brightness(0.75);
}

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 7px 13px;
  color: #fee2e2;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(44px, 7vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 20px;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
  color: #f3f4f6;
  font-weight: 800;
}

.hero-meta span:first-child,
.detail-meta span:first-child {
  color: var(--yellow);
}

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

.primary-btn,
.ghost-btn,
.section-link,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn {
  min-height: 48px;
  padding: 12px 24px;
}

.ghost-btn {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 11px 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 800;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ghost-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.22);
}

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

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

.hero-dot.active {
  width: 34px;
  background: #fff;
}

.category-strip {
  background: #fff;
  box-shadow: 0 1px 0 var(--gray-200);
}

.category-strip-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

.category-tile {
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile strong {
  display: block;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 20px;
}

.category-tile span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--gray-700);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.content-section,
.page-main,
.detail-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

.content-section.no-top {
  padding-top: 28px;
}

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

.section-heading h2,
.page-hero h1,
.player-section h2,
.story-card h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
}

.section-heading p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--gray-500);
  font-size: 17px;
}

.section-link,
.text-link {
  color: var(--red);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--gray-100);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.74));
}

.play-chip,
.rank-badge,
.mini-rank {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
}

.play-chip {
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.92);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: scale(1);
}

.rank-badge {
  left: 14px;
  top: 14px;
  min-width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.35);
}

.card-body {
  padding: 18px;
}

.card-meta,
.card-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 13px;
}

.card-meta span,
.tag-row span {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--gray-100);
}

.card-body h3 {
  margin: 10px 0 8px;
  font-size: 20px;
  line-height: 1.25;
}

.card-body h3 a:hover {
  color: var(--red);
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--gray-700);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.tag-row span {
  color: var(--red-dark);
  background: #fef2f2;
  font-size: 13px;
  font-weight: 700;
}

.card-foot {
  justify-content: space-between;
  margin-top: 14px;
  font-weight: 800;
}

.card-foot span:first-child {
  color: #ca8a04;
}

.page-hero {
  border-radius: 28px;
  padding: 46px;
  color: #fff;
  background: linear-gradient(135deg, #111827, #7f1d1d 58%, #ea580c);
  box-shadow: var(--shadow);
}

.small-hero,
.search-hero,
.rank-hero,
.category-hero {
  margin-bottom: 30px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.toolbar .local-search {
  width: min(100%, 430px);
}

.wide-toolbar .local-search {
  width: min(100%, 620px);
}

.sort-select {
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 10px 18px;
  background: #fff;
  color: var(--gray-900);
  outline: none;
}

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

.overview-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.overview-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  min-height: 230px;
  background: var(--gray-100);
}

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

.overview-body {
  padding: 26px;
}

.overview-body h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.overview-body p {
  margin: 0 0 18px;
  color: var(--gray-700);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--gray-500);
  font-size: 14px;
}

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

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

.detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #111827;
  box-shadow: var(--shadow);
}

.detail-bg {
  position: absolute;
  inset: -28px;
  opacity: 0.42;
  background-position: center;
  background-size: cover;
  filter: blur(18px) brightness(0.7);
}

.detail-panel {
  position: relative;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  padding: 38px;
  color: #fff;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.55));
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.32);
}

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

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

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

.detail-tags span {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.player-section {
  margin-top: 32px;
}

.player-section h2 {
  margin-bottom: 16px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #050505;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.26), rgba(0, 0, 0, 0.72));
  cursor: pointer;
}

.player-cover.hidden {
  display: none;
}

.big-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  padding-left: 6px;
  background: var(--red);
  font-size: 42px;
  box-shadow: 0 18px 42px rgba(220, 38, 38, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-cover:hover .big-play {
  transform: scale(1.08);
  background: var(--red-dark);
}

.player-cover strong {
  font-size: 24px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.story-card {
  border-radius: 24px;
  padding: 28px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.story-card p {
  margin: 14px 0 0;
  color: var(--gray-700);
  font-size: 17px;
}

.info-card {
  grid-column: 1 / -1;
}

.info-card dl {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px 18px;
  margin: 18px 0;
}

.info-card dt {
  color: var(--gray-500);
  font-weight: 800;
}

.info-card dd {
  margin: 0;
  color: var(--gray-900);
}

.related-section {
  padding-left: 0;
  padding-right: 0;
}

.top-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 28px;
}

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

.rank-row {
  position: relative;
  display: grid;
  grid-template-columns: 52px 72px 1fr;
  align-items: center;
  gap: 16px;
  border-radius: 18px;
  padding: 12px 18px 12px 12px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-row img {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
}

.mini-rank {
  position: static;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.rank-info {
  display: grid;
  gap: 5px;
}

.rank-info strong {
  font-size: 19px;
}

.rank-info em {
  color: var(--gray-500);
  font-style: normal;
}

.empty-state {
  display: none;
  border: 1px dashed var(--gray-200);
  border-radius: 20px;
  padding: 32px;
  color: var(--gray-500);
  background: #fff;
  text-align: center;
  font-weight: 800;
}

.empty-state.show {
  display: block;
}

.site-footer {
  background: var(--gray-900);
  color: #fff;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 30px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 34px;
}

.footer-inner h3 {
  margin: 0 0 14px;
}

.footer-inner p,
.footer-inner a,
.footer-bottom {
  color: #cbd5e1;
}

.footer-inner p {
  margin: 0;
}

.footer-inner ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-inner a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 24px;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1120px) {
  .header-search {
    display: none;
  }

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

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

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

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero-carousel {
    height: 560px;
  }

  .hero-content {
    margin-left: 24px;
  }

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

  .overview-card,
  .detail-panel,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

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

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-text {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero-carousel {
    height: 520px;
  }

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

  .hero-content p,
  .detail-one-line {
    font-size: 17px;
  }

  .hero-actions,
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-btn,
  .ghost-btn,
  .header-search button,
  .mobile-search button {
    width: 100%;
  }

  .category-strip-inner,
  .movie-grid,
  .top-three {
    grid-template-columns: 1fr;
  }

  .content-section,
  .page-main,
  .detail-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-hero,
  .detail-panel,
  .story-card {
    padding: 24px;
  }

  .rank-row {
    grid-template-columns: 42px 60px 1fr;
    gap: 12px;
  }

  .rank-row img {
    width: 60px;
    height: 82px;
  }
}
