:root {
  --bg: #f7f7fb;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #667085;
  --line: #eceff3;
  --brand: #f97316;
  --brand-dark: #dc2626;
  --brand-soft: #fff4ed;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.35);
}

.logo-text {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ea580c, #dc2626);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.desktop-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: #374151;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ea580c;
  background: #fff7ed;
}

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

.header-search input,
.mobile-search input,
.local-filter input,
.search-panel input {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  outline: none;
  padding: 11px 15px;
  background: #ffffff;
  color: #111827;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.local-filter input:focus,
.search-panel input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.header-search button,
.mobile-search button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  cursor: pointer;
  white-space: nowrap;
}

.header-search {
  width: min(320px, 27vw);
}

.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff7ed;
  color: #ea580c;
  font-size: 24px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid #f1f5f9;
  padding: 14px 22px 18px;
  background: #ffffff;
}

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

.mobile-panel nav {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-panel nav a {
  border-radius: 14px;
  background: #f8fafc;
  padding: 12px 14px;
  color: #334155;
  font-weight: 700;
}

.main-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: #0f172a;
  color: #ffffff;
}

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

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

.hero-slide img.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 13, 26, 0.92) 0%, rgba(8, 13, 26, 0.76) 42%, rgba(8, 13, 26, 0.28) 100%);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, rgba(247, 247, 251, 1));
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 98px 22px 120px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.52fr);
  gap: 42px;
  align-items: center;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  color: #fed7aa;
  font-weight: 800;
}

.hero-title {
  margin: 22px 0 14px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.hero-movie-title {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
  font-weight: 900;
}

.hero-desc {
  max-width: 760px;
  font-size: 18px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.84);
}

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

.btn-primary,
.btn-secondary,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.34);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-light:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

.btn-light {
  background: #ffffff;
  color: #ea580c;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.hero-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(1.5deg);
}

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

.hero-poster-label {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-radius: 18px;
  padding: 14px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(14px);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

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

.section {
  padding: 58px 0;
}

.section.alt {
  background: #ffffff;
}

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

.section-head h2,
.page-hero h1,
.detail-title {
  margin: 0;
  color: #111827;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.section-head p,
.page-hero p,
.detail-lead {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.text-link {
  color: #ea580c;
  font-weight: 900;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  border-radius: 24px;
  background: #111827;
  color: #ffffff;
  box-shadow: var(--shadow);
}

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

.category-tile:hover img {
  transform: scale(1.08);
}

.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.84));
}

.category-content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px;
}

.category-content strong {
  display: block;
  font-size: 24px;
  font-weight: 950;
}

.category-content em {
  display: block;
  margin-top: 8px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.movie-card:not(.movie-card-list) .movie-thumb {
  aspect-ratio: 3 / 4;
}

.movie-card-list {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
}

.movie-card-list .movie-thumb {
  aspect-ratio: 4 / 3;
  height: 100%;
}

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

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

.play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(249, 115, 22, 0.92);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.corner-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.movie-info {
  padding: 16px;
}

.movie-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 3em;
  overflow: hidden;
  font-weight: 950;
  line-height: 1.5;
  color: #111827;
}

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

.movie-info p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 9px 0 12px;
  color: var(--muted);
  line-height: 1.65;
}

.movie-meta,
.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.movie-meta span,
.detail-badges span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 800;
}

.page-hero {
  margin: 32px auto 0;
  border-radius: 32px;
  padding: 48px;
  color: #ffffff;
  background: radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.26), transparent 28%), linear-gradient(135deg, #f97316, #dc2626 55%, #be123c);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  color: #ffffff;
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.86);
}

.local-filter,
.search-panel {
  margin: 28px 0;
  border-radius: 24px;
  padding: 20px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.search-panel form {
  display: flex;
  gap: 12px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 62px 150px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-radius: 22px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 950;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.rank-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

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

.rank-info h2,
.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 950;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.detail-hero {
  background: #0f172a;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.26;
  filter: blur(3px);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.48));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 22px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

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

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

.breadcrumb a:hover {
  color: #fed7aa;
}

.detail-title {
  color: #ffffff;
  font-size: clamp(34px, 5vw, 62px);
}

.detail-lead {
  max-width: 860px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.detail-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 22px 70px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.content-panel,
.side-panel {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.content-panel {
  overflow: hidden;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

.play-mask strong {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  box-shadow: 0 20px 42px rgba(249, 115, 22, 0.42);
  font-size: 30px;
}

.play-mask span {
  font-size: 18px;
  font-weight: 900;
}

.player-shell.is-playing .play-mask {
  display: none;
}

.detail-body {
  padding: 28px;
}

.detail-body h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 950;
}

.detail-body p {
  margin: 0 0 18px;
  color: #374151;
  line-height: 1.9;
}

.tag-list {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.side-panel {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 20px;
}

.related-list {
  display: grid;
  gap: 14px;
}

.related-item {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 116px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 14px;
}

.related-item strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
}

.related-item span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

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

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

.footer-brand p {
  margin: 16px 0 0;
  color: #9ca3af;
  line-height: 1.75;
}

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

.footer-links {
  display: grid;
  gap: 9px;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 22px;
  text-align: center;
  color: #9ca3af;
}

.empty-state {
  border-radius: 24px;
  padding: 52px 22px;
  text-align: center;
  background: #ffffff;
  color: var(--muted);
}

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

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

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

  .side-panel {
    position: static;
  }
}

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

  .mobile-menu-btn {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

  .hero-inner,
  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

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

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

  .movie-card-list {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 48px 112px minmax(0, 1fr);
  }

  .rank-item .btn-light,
  .rank-item .btn-primary {
    grid-column: 2 / 4;
  }

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

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

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

  .main-wrap {
    padding: 0 16px;
  }

  .hero-inner {
    padding: 76px 16px 110px;
  }

  .hero-title {
    font-size: 40px;
  }

  .page-hero {
    margin-top: 20px;
    padding: 30px 22px;
    border-radius: 24px;
  }

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

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

  .search-panel form {
    flex-direction: column;
  }

  .detail-hero-inner {
    padding: 32px 16px;
  }

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

  .detail-main {
    padding: 24px 16px 50px;
  }

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

  .rank-cover {
    display: none;
  }

  .rank-item .btn-light,
  .rank-item .btn-primary {
    grid-column: 1 / 3;
  }
}
