:root {
  color-scheme: light;
  --bg: #f9fafb;
  --panel: #ffffff;
  --panel-soft: #fff7ed;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #ef4444;
  --brand-dark: #dc2626;
  --accent: #f97316;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.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);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.navbar {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #111827;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 25px rgba(239, 68, 68, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #374151;
  font-weight: 700;
}

.nav-links a {
  position: relative;
  padding: 24px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--brand);
}

.nav-links a.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.nav-search {
  display: flex;
  align-items: center;
  min-width: 240px;
  max-width: 320px;
  flex: 1;
}

.nav-search input {
  width: 100%;
  height: 42px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 0 16px;
  background: #f9fafb;
  outline: 0;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-search input:focus {
  background: #fff;
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: #111827;
}

.mobile-panel {
  display: none;
  border-top: 1px solid #e5e7eb;
  padding: 12px 0 18px;
}

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

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

.mobile-panel .nav-search {
  display: flex;
  max-width: none;
  margin-top: 10px;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.hero-slides {
  position: relative;
  min-height: 610px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(17, 24, 39, 0.66), rgba(17, 24, 39, 0.26)), var(--hero-image);
  background-position: center;
  background-size: cover;
  filter: saturate(1.1);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(0deg, var(--bg), rgba(249, 250, 251, 0));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 370px;
  align-items: center;
  gap: 52px;
  padding: 92px 0 118px;
  color: #fff;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 800;
}

.hero-title {
  margin: 0;
  max-width: 760px;
  font-size: clamp(40px, 6vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.hero-movie-title {
  display: block;
  margin-top: 12px;
  color: #fed7aa;
}

.hero-text {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-size: 13px;
  font-weight: 800;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 18px 30px rgba(239, 68, 68, 0.28);
}

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

.hero-poster-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.35);
  transform: rotate(2deg);
}

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

.hero-poster-info {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(17, 24, 39, 0.72);
  color: #fff;
  backdrop-filter: blur(16px);
}

.hero-poster-info strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

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

.hero-dot {
  width: 42px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  transition: background 0.2s ease, width 0.2s ease;
}

.hero-dot.is-active {
  width: 64px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.section {
  padding: 62px 0;
}

.section-compact {
  padding: 42px 0;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--brand);
  font-weight: 900;
  letter-spacing: 0.05em;
}

.section-title {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 950;
}

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

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff, #fff7ed);
  box-shadow: var(--shadow);
  border: 1px solid rgba(249, 115, 22, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -38px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
}

.category-tile span {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--brand);
  background: rgba(239, 68, 68, 0.08);
  font-size: 13px;
  font-weight: 900;
}

.category-tile h2,
.category-tile h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 950;
}

.category-tile p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.82);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(239, 68, 68, 0.3);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.12);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #374151);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.06);
}

.poster-meta {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 8px;
}

.poster-meta span,
.score-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(17, 24, 39, 0.76);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.score-pill {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

.movie-card-body {
  display: flex;
  min-height: 190px;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 950;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--brand);
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.card-tags span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
}

.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 700;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 74px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(229, 231, 235, 0.82);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 38px rgba(15, 23, 42, 0.1);
}

.rank-num {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  font-size: 18px;
  font-weight: 950;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 12px;
  background: #111827;
}

.rank-thumb img {
  width: 74px;
  height: 92px;
  object-fit: cover;
}

.rank-title {
  margin: 0 0 7px;
  font-size: 16px;
  font-weight: 950;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.page-hero {
  padding: 74px 0 58px;
  color: #fff;
  background: radial-gradient(circle at 20% 0%, rgba(249, 115, 22, 0.42), transparent 28%), linear-gradient(135deg, #111827, #1f2937 54%, #7f1d1d);
}

.page-hero h1 {
  margin: 0;
  max-width: 920px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.page-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.85;
  font-size: 18px;
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  align-items: start;
}

.detail-panel,
.sidebar-panel,
.search-panel {
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.82);
  box-shadow: var(--shadow);
}

.detail-panel {
  overflow: hidden;
}

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

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.26), rgba(0, 0, 0, 0.68));
  z-index: 3;
}

.play-layer.is-hidden {
  display: none;
}

.play-layer-inner {
  display: grid;
  place-items: center;
  gap: 14px;
}

.play-icon {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 24px 44px rgba(239, 68, 68, 0.32);
  font-size: 34px;
  line-height: 1;
}

.play-label {
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.62);
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.detail-body {
  padding: 28px;
}

.detail-title {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: -0.05em;
  font-weight: 950;
}

.detail-subtitle {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.85;
  font-size: 17px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 26px;
}

.detail-meta span,
.tag-pill {
  display: inline-flex;
  padding: 7px 11px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 13px;
  font-weight: 850;
}

.detail-body h2 {
  margin: 30px 0 12px;
  font-size: 24px;
  font-weight: 950;
}

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

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.sidebar-panel {
  padding: 18px;
}

.sidebar-panel h2,
.sidebar-panel h3 {
  margin: 0 0 16px;
  font-size: 21px;
  font-weight: 950;
}

.side-cover {
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: 18px;
  background: #111827;
}

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

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

.related-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 70px;
  height: 92px;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.related-item strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.35;
}

.related-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.search-panel {
  padding: 24px;
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px 160px;
  gap: 12px;
}

.search-controls input,
.search-controls select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 0 14px;
  background: #fff;
  outline: 0;
}

.search-controls input:focus,
.search-controls select:focus {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

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

.pagination a,
.pagination span {
  min-width: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  text-align: center;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #374151;
  font-weight: 850;
}

.pagination .is-current,
.pagination a:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}

.static-content {
  padding: 34px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.82);
  box-shadow: var(--shadow);
}

.static-content h2 {
  margin: 0 0 14px;
  font-size: 28px;
  font-weight: 950;
}

.static-content h3 {
  margin: 28px 0 12px;
  font-size: 22px;
  font-weight: 950;
}

.static-content p,
.static-content li {
  color: #374151;
  line-height: 1.9;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-title {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
}

.footer-grid p,
.footer-grid li {
  color: #cbd5e1;
  line-height: 1.8;
}

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

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
}

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.line-clamp-1 {
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

@media (max-width: 1024px) {
  .nav-links,
  .navbar > .nav-search {
    display: none;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 74px 0 110px;
  }

  .hero-poster-card {
    max-width: 360px;
    transform: none;
  }

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

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

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

@media (max-width: 720px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .navbar {
    height: 64px;
  }

  .logo {
    font-size: 19px;
  }

  .hero-slides {
    min-height: 720px;
  }

  .hero-content {
    padding: 54px 0 100px;
  }

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

  .hero-text {
    font-size: 16px;
  }

  .section {
    padding: 42px 0;
  }

  .section-head {
    display: block;
  }

  .section-actions {
    margin-top: 16px;
  }

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

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

  .rank-score {
    display: none;
  }

  .rank-thumb img {
    width: 64px;
    height: 82px;
  }

  .search-controls {
    grid-template-columns: 1fr;
  }

  .detail-body,
  .static-content,
  .search-panel {
    padding: 20px;
  }

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