:root {
  --color-blue: #2563eb;
  --color-blue-dark: #1d4ed8;
  --color-cyan: #06b6d4;
  --color-green: #16a34a;
  --color-orange: #f97316;
  --color-red: #dc2626;
  --color-gray-50: #f9fafb;
  --color-gray-100: #f3f4f6;
  --color-gray-200: #e5e7eb;
  --color-gray-500: #6b7280;
  --color-gray-600: #4b5563;
  --color-gray-700: #374151;
  --color-gray-900: #111827;
  --shadow-card: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-card-hover: 0 25px 50px rgba(15, 23, 42, 0.18);
  --radius-xl: 18px;
  --radius-2xl: 24px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-gray-900);
  background: linear-gradient(180deg, var(--color-gray-50) 0%, #ffffff 45%, #ffffff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(16px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
  color: var(--color-gray-900);
  white-space: nowrap;
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-blue), var(--color-cyan));
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--color-gray-700);
  font-weight: 600;
}

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

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
  padding: 6px;
  border: 1px solid var(--color-gray-200);
  border-radius: 999px;
  background: #ffffff;
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 8px 12px;
  color: var(--color-gray-900);
  background: transparent;
}

.header-search button,
.primary-button,
.secondary-button {
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
  padding: 8px 14px;
  color: #ffffff;
  background: var(--color-blue);
}

.header-search button:hover,
.primary-button:hover {
  background: var(--color-blue-dark);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: var(--color-gray-900);
  background: transparent;
}

.menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-nav {
  display: none;
  padding: 12px 24px 24px;
  border-top: 1px solid var(--color-gray-200);
  background: #ffffff;
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--color-gray-700);
  font-weight: 700;
}

.mobile-nav a:hover {
  color: var(--color-blue);
  background: var(--color-gray-50);
}

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 0;
}

.hero {
  position: relative;
  height: 500px;
  margin-bottom: 48px;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: #111827;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.24);
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42) 50%, rgba(0, 0, 0, 0.04));
}

.hero-content {
  width: min(100%, 720px);
  padding: 0 64px;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 5px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--color-blue);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 18px;
  max-width: 680px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  color: #ffffff;
  font-weight: 700;
}

.hero-actions,
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
}

.primary-button {
  color: #ffffff;
  background: var(--color-blue);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.secondary-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.34);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.45);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

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

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

.hero-search {
  display: flex;
  gap: 8px;
  width: min(100%, 520px);
  margin-top: 22px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  border-radius: 12px;
  padding: 12px 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.hero-search button {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  color: #ffffff;
  font-weight: 800;
  background: var(--color-blue);
}

.section {
  margin-bottom: 64px;
}

.section-card {
  padding: 32px;
  border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

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

.title-line {
  flex: 1;
  min-width: 80px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-blue), rgba(37, 99, 235, 0));
}

.title-line.cyan {
  background: linear-gradient(90deg, var(--color-cyan), rgba(6, 182, 212, 0));
}

.title-line.green {
  background: linear-gradient(90deg, var(--color-green), rgba(22, 163, 74, 0));
}

.title-line.orange {
  background: linear-gradient(90deg, var(--color-orange), rgba(249, 115, 22, 0));
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-cover {
  position: relative;
  height: 210px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

.large-grid .movie-cover,
.movie-card.is-large .movie-cover {
  height: 320px;
}

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

.movie-card:hover .movie-cover img {
  transform: scale(1.1);
}

.movie-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.16), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .movie-overlay {
  opacity: 1;
}

.movie-overlay p {
  margin: 0;
  font-size: 14px;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.play-circle {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: var(--color-blue);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 10px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  margin: 0 0 10px;
  color: var(--color-gray-900);
  font-size: 16px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

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

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--color-gray-500);
  font-size: 14px;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.movie-tags span {
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--color-blue-dark);
  background: #dbeafe;
  font-size: 12px;
  font-weight: 700;
}

.page-title {
  margin-bottom: 32px;
  padding: 34px;
  border-radius: var(--radius-2xl);
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  box-shadow: var(--shadow-card);
}

.page-title p {
  max-width: 880px;
  margin: 12px 0 0;
  color: var(--color-gray-600);
  font-size: 17px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, 180px));
  gap: 12px;
  margin: 24px 0 0;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--color-gray-200);
  border-radius: 14px;
  padding: 12px 14px;
  outline: 0;
  color: var(--color-gray-900);
  background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

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

.category-card {
  min-height: 180px;
  padding: 24px;
  border: 1px solid rgba(37, 99, 235, 0.1);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: var(--shadow-card-hover);
}

.category-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.category-card p {
  margin: 0 0 22px;
  color: var(--color-gray-600);
}

.category-card span {
  color: var(--color-blue);
  font-weight: 800;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 110px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.rank-no {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--color-blue), var(--color-cyan));
}

.rank-thumb {
  height: 70px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

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

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.rank-info p {
  margin: 0;
  color: var(--color-gray-600);
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

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

.breadcrumb {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--color-gray-600);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--color-blue);
  font-weight: 700;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.26);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.38));
}

.player-cover.is-hidden {
  display: none;
}

.player-button {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--color-blue);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
  transition: transform 0.2s ease;
}

.player-cover:hover .player-button {
  transform: scale(1.06);
}

.detail-card,
.sidebar-card {
  margin-top: 24px;
  padding: 26px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.info-pills span,
.related-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--color-blue-dark);
  background: #dbeafe;
  font-size: 14px;
  font-weight: 700;
}

.detail-section {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--color-gray-200);
}

.detail-section h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.detail-section p {
  margin: 0;
  color: var(--color-gray-700);
}

.sidebar-card {
  position: sticky;
  top: 96px;
  margin-top: 0;
}

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

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

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

.related-thumb {
  height: 76px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

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

.related-item:hover img {
  transform: scale(1.08);
}

.related-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-item:hover h3 {
  color: var(--color-blue);
}

.related-item p {
  margin: 0;
  color: var(--color-gray-500);
  font-size: 13px;
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--color-gray-200);
  background: linear-gradient(180deg, var(--color-gray-50), var(--color-gray-100));
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 28px;
}

.footer-inner h2,
.footer-inner h3 {
  margin: 0 0 12px;
}

.footer-inner p,
.footer-inner a {
  color: var(--color-gray-600);
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 32px;
  border-top: 1px solid #d1d5db;
  color: var(--color-gray-500);
  text-align: center;
  font-size: 14px;
}

.hidden-by-filter {
  display: none !important;
}

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

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

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

  .sidebar-card {
    position: static;
  }
}

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

  .menu-button {
    display: inline-block;
  }

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

  .page {
    padding: 22px 16px 0;
  }

  .hero {
    height: 540px;
  }

  .hero-content {
    padding: 0 28px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.42));
  }

  .hero-control {
    top: auto;
    bottom: 20px;
    transform: none;
  }

  .hero-control.prev {
    left: 18px;
  }

  .hero-control.next {
    right: 18px;
  }

  .hero-search {
    display: grid;
  }

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

  .title-line {
    width: 100%;
  }

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

  .movie-cover,
  .large-grid .movie-cover,
  .movie-card.is-large .movie-cover {
    height: 220px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .rank-row {
    grid-template-columns: 46px 88px minmax(0, 1fr);
  }

  .rank-row .primary-button {
    grid-column: 2 / -1;
  }

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

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

  .logo {
    font-size: 17px;
  }

  .logo-mark {
    width: 36px;
    height: 36px;
  }

  .hero {
    height: 560px;
    border-radius: 18px;
  }

  .hero h1 {
    font-size: 32px;
  }

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

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

  .movie-cover,
  .large-grid .movie-cover,
  .movie-card.is-large .movie-cover {
    height: 260px;
  }

  .page-title,
  .section-card,
  .detail-card,
  .sidebar-card {
    padding: 22px;
  }

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