:root {
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-soft: #ffedd5;
  --accent-soft: #fdf8f6;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f9fafb;
  --card: #ffffff;
  --dark: #111827;
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-hover: 0 22px 40px rgba(15, 23, 42, 0.16);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.26);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  color: #374151;
  white-space: nowrap;
}

.site-nav a:hover,
.brand:hover {
  color: var(--primary-dark);
}

.menu-toggle {
  display: none;
  border: 0;
  background: #fff7ed;
  color: var(--primary-dark);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 20px;
}

.hero {
  max-width: 1280px;
  min-height: 540px;
  margin: 28px auto 0;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow-hover);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 600ms ease, transform 800ms ease;
}

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(249, 115, 22, 0.35), transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.62) 48%, rgba(0, 0, 0, 0.15) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent 55%);
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: clamp(24px, 6vw, 80px);
  bottom: clamp(34px, 8vw, 92px);
  max-width: 660px;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.18);
  border: 1px solid rgba(251, 146, 60, 0.38);
  border-radius: 999px;
  font-size: 14px;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

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

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 600;
}

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

.tag-row span {
  background: var(--primary-soft);
  color: #9a3412;
}

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

.primary-btn,
.ghost-btn,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.primary-btn {
  min-width: 126px;
  padding: 12px 22px;
  color: #fff;
  background: var(--primary);
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.35);
}

.primary-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.ghost-btn {
  padding: 11px 21px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-controls {
  position: absolute;
  z-index: 4;
  right: 28px;
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-controls button {
  border: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  border-radius: 999px;
  width: 42px;
  height: 42px;
  font-size: 28px;
  cursor: pointer;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px !important;
  height: 10px !important;
  padding: 0;
  opacity: 0.52;
}

.hero-dot.is-active {
  opacity: 1;
  background: var(--primary);
}

main {
  width: 100%;
}

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

.page-main {
  padding-top: 28px;
}

.soft-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(135deg, #fff7ed 0%, #fdf8f6 100%);
}

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

.section-head h2,
.page-hero h1,
.detail-card h1 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.04em;
}

.section-head h2 {
  font-size: clamp(26px, 3vw, 36px);
}

.section-head p,
.page-hero p {
  margin: 6px 0 0;
  color: var(--muted);
}

.section-head > a,
.text-btn {
  color: var(--primary-dark);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

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

.poster-link {
  display: block;
  position: relative;
  height: 260px;
  overflow: hidden;
  background: #111827;
}

.movie-card-featured .poster-link {
  height: 360px;
}

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

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

.card-type,
.rank-badge,
.play-float {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 999px;
}

.card-type {
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.66);
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  background: var(--primary);
  box-shadow: 0 10px 18px rgba(249, 115, 22, 0.3);
}

.play-float {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(249, 115, 22, 0.92);
  transition: opacity 180ms ease, transform 180ms ease;
}

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

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 8px;
  min-height: 48px;
  font-size: 17px;
  line-height: 1.35;
}

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

.card-body p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.meta-row {
  justify-content: space-between;
  margin-bottom: 12px;
}

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

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

.category-tile {
  display: block;
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.tile-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  height: 128px;
  margin-bottom: 16px;
}

.tile-posters img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.ranking-panel,
.side-card,
.detail-card,
.player-shell,
.ranking-item {
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.ranking-panel {
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 22px;
}

.ranking-panel h2,
.side-card h2 {
  margin: 0 0 16px;
}

.compact-link {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

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

.compact-link span {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--primary);
  font-weight: 900;
  font-size: 13px;
}

.compact-link strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-link em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  padding: 42px;
  border-radius: 26px;
  color: var(--text);
  background: linear-gradient(135deg, #fff7ed 0%, #fff 55%, #fdf8f6 100%);
  box-shadow: var(--shadow);
}

.compact-hero h1 {
  font-size: clamp(32px, 5vw, 54px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.sticky-toolbar {
  position: sticky;
  top: 76px;
  z-index: 20;
  padding: 14px;
  border-radius: 18px;
  background: rgba(249, 250, 251, 0.9);
  backdrop-filter: blur(10px);
}

.toolbar input,
.toolbar select {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 13px 14px;
  font-size: 15px;
  outline: none;
}

.toolbar input {
  flex: 1;
}

.toolbar input:focus,
.toolbar select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 92px 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
}

.ranking-cover {
  overflow: hidden;
  border-radius: 16px;
  height: 118px;
}

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

.ranking-number {
  color: var(--primary-dark);
  font-weight: 900;
  font-size: 34px;
  letter-spacing: -0.08em;
}

.ranking-info h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.ranking-info p {
  margin: 0 0 10px;
  color: var(--muted);
}

.detail-main {
  max-width: 1320px;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay-button {
  position: absolute;
  inset: 0;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.48));
  cursor: pointer;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.player-overlay-button span {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  color: #fff;
  background: var(--primary);
  font-size: 34px;
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.35);
}

.player-shell.is-started .player-overlay-button {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-state {
  position: absolute;
  left: 18px;
  bottom: 18px;
  color: #fff;
  background: rgba(0, 0, 0, 0.58);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  min-height: 28px;
  opacity: 0;
  transition: opacity 180ms ease;
}

.player-state.is-visible {
  opacity: 1;
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
}

.detail-card h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.lead-text {
  margin: 14px 0 22px;
  padding-left: 16px;
  border-left: 4px solid var(--primary);
  color: #4b5563;
  font-size: 19px;
  font-style: italic;
}

.detail-meta {
  margin-bottom: 20px;
}

.detail-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3f4f6;
}

.detail-tags {
  margin-bottom: 28px;
}

.detail-card h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-card p {
  color: #374151;
  font-size: 16px;
}

.detail-side {
  align-self: start;
  position: sticky;
  top: 88px;
}

.detail-side > img {
  width: 100%;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: var(--shadow-hover);
}

.side-card {
  margin-top: 18px;
  padding: 20px;
}

.related-section {
  padding: 32px 0 0;
}

.site-footer {
  margin-top: 56px;
  color: #d1d5db;
  background: var(--dark);
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 18px;
}

.site-footer p {
  margin: 0 0 8px;
  color: #d1d5db;
}

.site-footer a:hover {
  color: #fb923c;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 24px 28px;
  border-top: 1px solid #1f2937;
  color: #9ca3af;
  text-align: center;
  font-size: 14px;
}

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

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

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

  .ranking-panel,
  .detail-side {
    position: static;
  }
}

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

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

  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px 16px 18px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 4px;
    border-bottom: 1px solid #f3f4f6;
  }

  .hero {
    margin: 16px 16px 0;
    min-height: 560px;
    border-radius: 22px;
  }

  .hero-content {
    left: 22px;
    right: 22px;
    bottom: 76px;
  }

  .hero-controls {
    left: 22px;
    right: 22px;
    justify-content: space-between;
  }

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

  .section-head {
    display: block;
  }

  .section-head > a {
    display: inline-flex;
    margin-top: 10px;
  }

  .movie-grid,
  .full-grid,
  .featured-grid,
  .category-grid,
  .large-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .poster-link {
    height: 220px;
  }

  .movie-card-featured .poster-link {
    height: 260px;
  }

  .toolbar {
    flex-direction: column;
  }

  .ranking-item {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .ranking-number,
  .ranking-item .text-btn {
    display: none;
  }

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

@media (max-width: 520px) {
  .brand {
    font-size: 18px;
  }

  .hero {
    min-height: 520px;
  }

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

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

  .tile-posters {
    height: 110px;
  }

  .page-hero,
  .detail-card {
    padding: 22px;
  }
}
