:root {
  --brand-red: #ef4444;
  --brand-orange: #f97316;
  --brand-green: #16a34a;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, #fff7ed 0%, #f8fafc 34%, #ecfdf5 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand-red), var(--brand-orange));
  box-shadow: 0 14px 26px rgba(239, 68, 68, 0.28);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-4deg);
}

.brand-title {
  display: block;
  font-size: 23px;
  font-weight: 900;
  line-height: 1.1;
  background: linear-gradient(90deg, #dc2626, #ea580c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-subtitle {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

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

.nav-links a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease;
}

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

.header-search {
  min-width: 260px;
  position: relative;
}

.header-search input,
.search-panel input,
.filter-input,
.sort-select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  padding: 12px 18px;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input:focus,
.search-panel input:focus,
.filter-input:focus,
.sort-select:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f3f4f6;
  font-size: 20px;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px 18px;
  gap: 10px;
  flex-direction: column;
}

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

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #ef4444 0%, #f97316 45%, #db2777 100%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(42px);
  opacity: 0.38;
  pointer-events: none;
}

.hero::before {
  width: 310px;
  height: 310px;
  top: 90px;
  left: 8%;
  background: #fde68a;
}

.hero::after {
  width: 430px;
  height: 430px;
  right: 8%;
  bottom: 55px;
  background: #fb7185;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.84), rgba(17, 24, 39, 0.40), rgba(17, 24, 39, 0.82)), var(--hero-image);
  background-position: center;
  background-size: cover;
  opacity: 0.72;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 620px;
  margin: 0 auto;
  padding: 70px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  align-items: center;
  gap: 42px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.hero h1 span {
  color: #fde68a;
}

.hero-desc {
  max-width: 760px;
  margin: 0 0 24px;
  font-size: 20px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.92);
}

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

.pill,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.pill {
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(10px);
}

.tag {
  padding: 7px 12px;
  background: #f3f4f6;
  color: #4b5563;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 13px 22px;
  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 {
  background: #fff;
  color: #dc2626;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.25);
}

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

.btn-red {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  box-shadow: 0 15px 30px rgba(239, 68, 68, 0.25);
}

.hero-poster {
  justify-self: end;
  width: min(360px, 100%);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(12px);
}

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

.hero-poster-caption {
  padding: 18px;
  color: #fff;
}

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

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

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

.hero-arrow {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.section,
.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 22px;
}

.section-tight {
  padding-top: 36px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 950;
  color: #1f2937;
}

.section-title span {
  color: var(--brand-red);
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09);
  border: 1px solid rgba(229, 231, 235, 0.8);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

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

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

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

.poster-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.26);
}

.card-body {
  padding: 16px;
}

.card-title {
  margin: 0 0 9px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  color: #1f2937;
}

.card-desc {
  margin: 0 0 13px;
  min-height: 44px;
  color: var(--muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 26px;
  padding: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--cat-color), #111827);
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -70px;
  width: 190px;
  height: 190px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.category-card h2,
.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 950;
}

.category-card p,
.category-card a {
  position: relative;
  z-index: 1;
}

.category-card p {
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.88);
}

.category-card a {
  display: inline-flex;
  margin-top: 18px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 900;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 15px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e5e7eb;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 17px;
  color: #fff;
  font-size: 20px;
  font-weight: 950;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.rank-item h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 900;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #111827, #ef4444 48%, #f97316);
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 22px;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 950;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  margin-bottom: 28px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #111827, #7f1d1d 52%, #ea580c);
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.68)), var(--detail-image);
  background-size: cover;
  background-position: center;
  filter: blur(4px);
  transform: scale(1.03);
  opacity: 0.42;
}

.detail-hero-inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 22px 64px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

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

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

.detail-title {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  font-weight: 950;
}

.detail-desc {
  max-width: 860px;
  margin: 0 0 24px;
  font-size: 19px;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.92);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.info-box {
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
}

.info-box strong {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}

.player-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 54px 22px 26px;
}

.player-section h2 {
  margin: 0 0 18px;
  font-size: 32px;
  font-weight: 950;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, rgba(17, 24, 39, 0.48), rgba(127, 29, 29, 0.40));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 6px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  font-size: 38px;
  box-shadow: 0 20px 42px rgba(239, 68, 68, 0.38);
}

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

.detail-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 22px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
}

.content-card {
  border-radius: 26px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
}

.content-card h2,
.content-card h3 {
  margin: 0 0 16px;
  font-weight: 950;
  color: #1f2937;
}

.content-card h2 {
  font-size: 30px;
}

.content-card h3 {
  font-size: 24px;
}

.content-card p {
  margin: 0 0 18px;
  color: #4b5563;
  line-height: 1.95;
}

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

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

.side-item img {
  width: 68px;
  height: 92px;
  object-fit: cover;
  border-radius: 14px;
  background: #fee2e2;
}

.side-item strong {
  display: block;
  font-weight: 900;
  color: #1f2937;
  line-height: 1.35;
}

.side-item span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.search-panel {
  border-radius: 28px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.empty-state {
  text-align: center;
  padding: 54px 20px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--muted);
}

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

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

.footer-inner h3,
.footer-inner h4 {
  color: #fff;
  margin: 0 0 14px;
}

.footer-inner p,
.footer-inner li {
  color: #9ca3af;
  line-height: 1.8;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 22px 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
}

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

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

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

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

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

  .hero-poster {
    justify-self: start;
    max-width: 260px;
  }

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

  .filter-bar,
  .info-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-item .btn {
    grid-column: 1 / -1;
  }
}

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

  .brand-subtitle {
    display: none;
  }

  .hero,
  .hero-content {
    min-height: 700px;
  }

  .hero-content {
    padding-top: 44px;
  }

  .hero-desc,
  .detail-desc {
    font-size: 16px;
  }

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

  .section,
  .page-wrap {
    padding: 44px 16px;
  }

  .detail-hero-inner,
  .player-section,
  .detail-content {
    padding-left: 16px;
    padding-right: 16px;
  }

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