* {
  box-sizing: border-box;
}

:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --red: #ef4444;
  --pink: #ec4899;
  --purple: #8b5cf6;
  --blue: #2563eb;
  --green: #10b981;
  --yellow: #f59e0b;
  --black: #050505;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 25px 70px rgba(15, 23, 42, 0.18);
  --radius-xl: 20px;
  --radius-2xl: 28px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--gray-50);
  color: var(--gray-900);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--orange), var(--red), var(--pink));
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.28);
}

.header-inner {
  max-width: 1240px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.brand-text {
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.desktop-nav a,
.mobile-panel a {
  font-weight: 600;
  opacity: 0.94;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  opacity: 1;
  transform: translateY(-1px);
}

.header-search {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: background 0.2s ease;
}

.header-search:focus-within {
  background: rgba(255, 255, 255, 0.28);
}

.header-search input {
  width: 210px;
  border: 0;
  outline: 0;
  padding: 10px 14px 10px 18px;
  color: var(--white);
  background: transparent;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 237, 213, 0.95);
}

.header-search button,
.mobile-search button {
  border: 0;
  cursor: pointer;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  padding: 10px 15px;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px 18px;
}

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

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.mobile-search {
  margin-top: 12px;
  display: flex;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.2);
}

.mobile-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  padding: 11px 16px;
}

.main-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 42px 20px 0;
}

.hero {
  position: relative;
  height: 560px;
  color: var(--white);
  background: var(--black);
  overflow: hidden;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.85s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.58) 46%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 44px 20px;
}

.hero-panel {
  width: min(880px, 100%);
  margin-top: 30px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--orange);
  font-weight: 800;
  box-shadow: 0 18px 35px rgba(249, 115, 22, 0.36);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 760px;
  margin: 0 auto 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2.4vw, 22px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0 0 30px;
}

.hero-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.96);
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-plain {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.btn-primary {
  color: var(--white);
  background: var(--orange);
  padding: 13px 28px;
  box-shadow: 0 15px 35px rgba(249, 115, 22, 0.4);
}

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

.btn-secondary {
  color: var(--white);
  padding: 13px 24px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.btn-plain {
  color: var(--orange-dark);
  background: var(--white);
  padding: 11px 20px;
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.12);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
  width: 32px;
  background: var(--white);
}

.section {
  margin-bottom: 60px;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title i {
  width: 6px;
  height: 34px;
  border-radius: 99px;
  background: var(--orange);
}

.section h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-subtitle,
.page-hero p,
.detail-title p {
  color: var(--gray-500);
  margin: 10px 0 0;
}

.movie-row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 4px 0 22px;
  scroll-snap-type: x proximity;
}

.movie-row .movie-card {
  min-width: 310px;
  max-width: 310px;
  scroll-snap-align: start;
}

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

.movie-grid.compact-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111;
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.05) 62%);
}

.score-badge,
.type-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.score-badge {
  left: 12px;
  background: rgba(245, 158, 11, 0.9);
}

.type-badge {
  right: 12px;
  background: rgba(0, 0, 0, 0.5);
}

.play-hover {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.84);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--orange-dark);
}

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

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--gray-500);
  font-size: 13px;
}

.meta-row span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--gray-100);
}

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

.tag-row span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-size: 12px;
  font-weight: 700;
}

.category-panel {
  border-radius: var(--radius-2xl);
  padding: 30px;
  background: linear-gradient(135deg, #eff6ff, #faf5ff);
}

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

.category-card {
  position: relative;
  min-height: 160px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 24px;
  color: var(--white);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.category-card::before {
  content: "";
  position: absolute;
  right: -35px;
  bottom: -35px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.category-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  position: relative;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
}

.category-card span {
  position: relative;
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.from-orange-to-red {
  background: linear-gradient(135deg, #fb923c, #ef4444);
}

.from-red-to-pink {
  background: linear-gradient(135deg, #ef4444, #ec4899);
}

.from-pink-to-purple {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
}

.from-purple-to-indigo {
  background: linear-gradient(135deg, #8b5cf6, #4f46e5);
}

.from-indigo-to-blue {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
}

.from-blue-to-cyan {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.from-green-to-emerald {
  background: linear-gradient(135deg, #22c55e, #10b981);
}

.from-yellow-to-orange {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.ranking-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 26px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 58px 88px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.ranking-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.rank-no {
  font-size: 24px;
  font-weight: 900;
  color: var(--orange);
  text-align: center;
}

.ranking-item img {
  width: 88px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-text strong,
.ranking-text em {
  display: block;
}

.ranking-text strong {
  margin-bottom: 4px;
  font-size: 16px;
}

.ranking-text em {
  color: var(--gray-500);
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  border-radius: 0 0 32px 32px;
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), var(--red), var(--pink));
  box-shadow: 0 22px 55px rgba(239, 68, 68, 0.22);
}

.page-hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 20px;
}

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 0 0 26px;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.filter-bar input {
  min-width: 240px;
  flex: 1;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 12px 18px;
  outline: 0;
  background: var(--gray-50);
}

.filter-bar input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  color: var(--gray-500);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(290px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.detail-card,
.info-card {
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.detail-card {
  overflow: hidden;
}

.detail-content {
  padding: 26px;
}

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

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

.detail-meta span {
  padding: 8px 13px;
  border-radius: 999px;
  font-weight: 800;
  color: #9a3412;
  background: #ffedd5;
}

.content-block {
  border-top: 1px solid var(--gray-200);
  padding-top: 24px;
  margin-top: 24px;
}

.content-block h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-block p {
  margin: 0;
  color: var(--gray-700);
  font-size: 16px;
}

.info-card {
  position: sticky;
  top: 92px;
  padding: 22px;
}

.info-card h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

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

.info-list div {
  padding: 13px;
  border-radius: 14px;
  background: var(--gray-50);
}

.info-list small {
  display: block;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.info-list strong {
  display: block;
  word-break: break-word;
}

.rating-box {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--gray-200);
  text-align: center;
}

.rating-box strong {
  display: block;
  font-size: 36px;
  color: var(--orange);
  line-height: 1;
}

.rating-stars {
  color: var(--yellow);
  letter-spacing: 2px;
  margin: 8px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.72));
  transition: opacity 0.28s ease, transform 0.28s ease;
}

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

.play-icon {
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--orange);
  background: rgba(255, 255, 255, 0.94);
  font-size: 34px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.play-text {
  font-size: 20px;
  font-weight: 900;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.player-error {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 4;
  padding: 14px 16px;
  border-radius: 14px;
  color: var(--white);
  background: rgba(239, 68, 68, 0.92);
  text-align: center;
  font-weight: 800;
}

.related-section {
  margin-top: 42px;
}

.search-empty {
  display: none;
  padding: 54px 20px;
  text-align: center;
  color: var(--gray-500);
  border-radius: var(--radius-xl);
  background: var(--white);
}

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

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

.brand-footer .brand-mark {
  color: var(--white);
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.footer-brand p,
.keyword-line {
  color: #9ca3af;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 16px;
}

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

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

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

@media (max-width: 1180px) {
  .desktop-nav {
    gap: 14px;
  }

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

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

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

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

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

  .hero {
    height: 520px;
  }

  .hero-arrow {
    display: none;
  }

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

  .category-grid,
  .ranking-layout,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .info-card {
    position: static;
  }
}

@media (max-width: 620px) {
  .header-inner {
    height: 60px;
    padding: 0 14px;
  }

  .brand-text {
    font-size: 18px;
  }

  .hero {
    height: 500px;
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 78px;
  }

  .hero-meta {
    gap: 8px;
  }

  .hero-meta span {
    font-size: 13px;
  }

  .main-wrap {
    padding: 30px 14px 0;
  }

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

  .movie-grid,
  .movie-grid.compact-grid {
    grid-template-columns: 1fr;
  }

  .movie-row .movie-card {
    min-width: 260px;
    max-width: 260px;
  }

  .category-panel {
    padding: 20px;
  }

  .ranking-item {
    grid-template-columns: 42px 76px 1fr;
    gap: 10px;
  }

  .ranking-item img {
    width: 76px;
    height: 52px;
  }

  .detail-content,
  .info-card {
    padding: 20px;
  }

  .play-icon {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
