:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --cyan: #06b6d4;
  --ink: #111827;
  --muted: #6b7280;
  --line: rgba(17, 24, 39, .10);
  --card: rgba(255, 255, 255, .88);
  --shadow: 0 22px 70px rgba(15, 23, 42, .14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(135deg, #fff7ed 0%, #ffffff 46%, #ecfeff 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid rgba(255, 255, 255, .58);
  box-shadow: 0 8px 32px rgba(15, 23, 42, .08);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -.04em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--cyan));
  box-shadow: 0 12px 30px rgba(249, 115, 22, .35);
}

.brand-text {
  font-size: clamp(20px, 2vw, 28px);
  background: linear-gradient(90deg, var(--orange), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: #374151;
  font-weight: 700;
  transition: color .2s ease;
}

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

.header-search {
  width: min(280px, 24vw);
}

.search-input {
  width: 100%;
  height: 42px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 0 18px;
  color: #111827;
  background: rgba(255, 255, 255, .88);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.search-input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, .16);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #f3f4f6;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #111827;
}

.mobile-panel {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 20px;
  border-top: 1px solid #edf2f7;
}

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

.mobile-search {
  margin-top: 8px;
}

.hero-slider {
  position: relative;
  height: 600px;
  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 .8s ease, transform 1.2s ease;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .84), rgba(0, 0, 0, .52), rgba(0, 0, 0, .08));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  color: #ffffff;
  max-width: 760px;
  animation: fadeUp .75s ease both;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 12px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--orange), var(--cyan));
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
}

.hero-content h1,
.page-hero h1,
.detail-intro h1 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: .96;
  letter-spacing: -.06em;
}

.hero-content p,
.page-hero p,
.detail-intro p {
  max-width: 720px;
  color: rgba(255, 255, 255, .84);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-meta,
.movie-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin: 22px 0 12px;
  color: rgba(255, 255, 255, .88);
  font-weight: 700;
}

.hero-meta span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-meta span + span::before,
.movie-meta span + span::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  opacity: .45;
}

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

.hero-tags span,
.tag-row span {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #7c2d12;
  background: rgba(255, 237, 213, .96);
}

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

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(90deg, var(--orange), var(--orange-dark));
  box-shadow: 0 16px 34px rgba(249, 115, 22, .32);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .24);
  backdrop-filter: blur(10px);
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .58);
  transition: width .2s ease, background .2s ease;
}

.hero-dot.is-active {
  width: 36px;
  background: var(--orange);
}

.category-strip,
.content-section,
.detail-layout,
.page-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

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

.category-card {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  border-radius: 28px;
  padding: 22px;
  color: #ffffff;
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .24s ease, box-shadow .24s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 90px rgba(15, 23, 42, .22);
}

.category-card strong {
  font-size: 24px;
  letter-spacing: -.03em;
}

.category-card small {
  color: rgba(255, 255, 255, .78);
  line-height: 1.6;
}

.category-index {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff7ed;
  background: rgba(255, 255, 255, .16);
  font-weight: 900;
}

.content-section {
  padding: 56px 0 10px;
}

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

.section-heading.slim {
  align-items: center;
}

.section-heading h2 {
  margin: 10px 0 8px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -.05em;
  background: linear-gradient(90deg, var(--orange), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-heading p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  color: var(--orange-dark);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  white-space: nowrap;
}

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

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: 28px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .82);
  box-shadow: 0 16px 45px rgba(15, 23, 42, .10);
  transition: transform .24s ease, box-shadow .24s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .18);
}

.poster-link,
.rank-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.poster-link {
  aspect-ratio: 3 / 4;
}

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

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

.play-badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 34px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--orange);
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(249, 115, 22, .34);
}

.movie-card-body {
  padding: 18px;
}

.movie-card-body h3 {
  margin: 8px 0 8px;
  color: #111827;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -.03em;
}

.movie-card-body h3 a:hover,
.rank-content h3 a:hover,
.side-card a:hover {
  color: var(--orange);
}

.movie-card-body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.72;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

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

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

.rank-item {
  position: relative;
  display: grid;
  grid-template-columns: 96px 66px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-poster {
  width: 96px;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--cyan));
  font-size: 22px;
  font-weight: 1000;
}

.rank-content h3 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -.03em;
}

.rank-content p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.7;
}

.page-hero {
  margin-top: 38px;
  min-height: 330px;
  display: flex;
  align-items: center;
  border-radius: 34px;
  padding: clamp(28px, 5vw, 64px);
  color: #ffffff;
  background: linear-gradient(135deg, #111827, #1f2937 58%, #164e63);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.compact-hero p {
  max-width: 780px;
}

.page-categories {
  padding-top: 30px;
}

.detail-hero {
  min-height: 560px;
  display: flex;
  align-items: center;
  color: #ffffff;
  background-position: center;
  background-size: cover;
}

.detail-hero-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: clamp(28px, 5vw, 58px);
  align-items: center;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  overflow: hidden;
  background: #111827;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .36);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, .72);
  font-weight: 800;
  margin-bottom: 14px;
}

.breadcrumbs a:hover {
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding: 54px 0 0;
}

.detail-main,
.detail-side {
  min-width: 0;
}

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #020617;
  box-shadow: 0 26px 80px rgba(15, 23, 42, .22);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(249, 115, 22, .34), rgba(2, 6, 23, .76));
  transition: opacity .2s ease, visibility .2s ease;
}

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

.player-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orange), var(--cyan));
  box-shadow: 0 18px 48px rgba(249, 115, 22, .38);
  font-size: 30px;
}

.player-overlay strong {
  font-size: 22px;
}

.text-panel,
.side-card {
  margin-top: 24px;
  border-radius: 28px;
  padding: 28px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, .84);
  box-shadow: 0 18px 60px rgba(15, 23, 42, .10);
}

.text-panel h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
  letter-spacing: -.04em;
}

.text-panel p {
  margin: 0;
  color: #374151;
  line-height: 2;
  font-size: 17px;
}

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

.movie-card.compact .movie-card-body h3 {
  font-size: 18px;
}

.detail-side {
  position: sticky;
  top: 96px;
  height: fit-content;
}

.side-card:first-child {
  margin-top: 0;
}

.side-card dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.side-card dl div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: start;
}

.side-card dt {
  color: #94a3b8;
  font-weight: 900;
}

.side-card dd {
  margin: 0;
  color: #111827;
  font-weight: 800;
  line-height: 1.6;
}

.side-card a {
  display: block;
  padding: 10px 0;
  color: #374151;
  font-weight: 800;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
}

.empty-state {
  margin-bottom: 20px;
  border-radius: 20px;
  padding: 22px;
  color: #7c2d12;
  background: #ffedd5;
  font-weight: 900;
}

.site-footer {
  margin-top: 70px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}

.footer-brand {
  color: #ffffff;
  font-size: 24px;
}

.footer-inner p {
  max-width: 520px;
  color: #9ca3af;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-weight: 800;
}

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

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .detail-side {
    position: static;
  }
}

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

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

  .header-inner {
    height: 64px;
  }

  .hero-slider {
    height: 620px;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-intro h1 {
    font-size: clamp(36px, 12vw, 58px);
  }

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

  .section-heading,
  .footer-inner {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .detail-hero-inner {
    grid-template-columns: 1fr;
    padding: 36px 0;
  }

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

  .rank-item {
    grid-template-columns: 76px 48px 1fr;
  }

  .rank-poster {
    width: 76px;
  }

  .rank-number {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 18px;
  }
}

@media (max-width: 560px) {
  .category-strip,
  .movie-grid,
  .all-grid,
  .rank-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .primary-btn,
  .ghost-btn,
  .section-more {
    width: 100%;
  }

  .rank-item {
    grid-template-columns: 72px 1fr;
  }

  .rank-number {
    position: absolute;
    left: 14px;
    top: 14px;
    width: 38px;
    height: 38px;
  }

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

  .page-hero,
  .text-panel,
  .side-card {
    border-radius: 22px;
    padding: 22px;
  }
}
