:root {
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a8a;
  --amber-500: #f59e0b;
  --green-100: #dcfce7;
  --green-800: #166534;
  --radius: 18px;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-800);
  background: var(--slate-50);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

.container-custom {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(203, 213, 225, 0.8);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--slate-900);
  font-size: 20px;
  font-weight: 800;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.nav-link {
  padding: 9px 14px;
  color: var(--slate-600);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue-700);
  background: #eff6ff;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(120deg, var(--blue-900), var(--blue-700));
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(245, 158, 11, 0.24), transparent 32%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(30, 58, 138, 0.76), rgba(29, 78, 216, 0.48));
}

.hero-bg-img,
.detail-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.hero-content {
  position: relative;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 360px;
  align-items: center;
  gap: 54px;
  padding-top: 54px;
  padding-bottom: 54px;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 12px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-subtitle,
.detail-one-line,
.page-hero p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(18px, 2.4vw, 24px);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-size: 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue-800), var(--blue-700));
  box-shadow: 0 14px 26px rgba(30, 64, 175, 0.28);
}

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

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-primary.full {
  width: 100%;
  margin-top: 18px;
}

.hero-poster,
.detail-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.42);
}

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

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

.hero-dots button {
  width: 38px;
  height: 8px;
  padding: 0;
  overflow: hidden;
  color: transparent;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dots button.active {
  background: #ffffff;
}

.quick-search {
  margin-top: -38px;
  position: relative;
  z-index: 6;
}

.quick-search-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  align-items: center;
  gap: 18px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--slate-200);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.quick-search strong {
  display: block;
  color: var(--slate-900);
  font-size: 20px;
}

.quick-search span,
.result-info {
  color: var(--slate-500);
}

.input {
  width: 100%;
  min-height: 46px;
  padding: 0 15px;
  color: var(--slate-800);
  background: #ffffff;
  border: 1px solid var(--slate-300);
  border-radius: 12px;
  outline: none;
}

.input:focus {
  border-color: var(--blue-700);
  box-shadow: 0 0 0 4px rgba(29, 78, 216, 0.12);
}

.layout-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding-top: 56px;
  padding-bottom: 60px;
}

.content-section {
  margin-bottom: 54px;
}

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

.section-title {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 900;
}

.section-more {
  color: var(--blue-700);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

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

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(30, 64, 175, 0.88);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.2);
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  min-height: 48px;
  margin: 0 0 10px;
  color: var(--slate-900);
  font-size: 17px;
  line-height: 1.4;
  font-weight: 800;
}

.meta-row,
.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.badge-region,
.badge-year {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-region {
  color: var(--green-800);
  background: var(--green-100);
}

.badge-year {
  color: var(--blue-800);
  background: #dbeafe;
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 11px 0;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-foot {
  justify-content: space-between;
  color: var(--slate-500);
  font-size: 13px;
}

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

.category-tile,
.category-card-large a {
  display: block;
  min-height: 150px;
  padding: 20px;
  color: #ffffff;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
  box-shadow: 0 12px 26px rgba(30, 64, 175, 0.22);
}

.category-tile strong,
.category-card-large h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 22px;
}

.category-tile span,
.category-card-large p,
.category-card-large small {
  display: block;
  color: rgba(255, 255, 255, 0.86);
}

.category-tile em,
.category-count {
  display: inline-flex;
  margin-top: 16px;
  color: #dbeafe;
  font-style: normal;
  font-weight: 800;
}

.hot-panel {
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.panel-title {
  color: var(--slate-900);
  font-size: 24px;
  font-weight: 900;
}

.hot-panel p {
  color: var(--slate-500);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 36px 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: var(--slate-50);
}

.rank-num {
  color: var(--amber-500);
  font-weight: 900;
}

.rank-cover {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  background: #dbeafe;
}

.rank-main {
  min-width: 0;
}

.rank-main strong,
.rank-main em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-main em {
  color: var(--slate-500);
  font-size: 12px;
  font-style: normal;
}

.rank-score {
  color: var(--blue-700);
  font-weight: 900;
}

.page-main {
  min-height: 70vh;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
}

.gradient-hero {
  padding: 76px 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.18), transparent 28%),
    linear-gradient(120deg, var(--blue-900), var(--blue-700));
}

.filter-bar,
.search-box-large {
  max-width: 620px;
  margin-top: 26px;
}

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

.table-wrap {
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.ranking-table th,
.ranking-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--slate-200);
  text-align: left;
}

.ranking-table th {
  color: var(--slate-700);
  background: var(--slate-100);
}

.ranking-table a {
  color: var(--blue-700);
  font-weight: 800;
}

.detail-hero {
  min-height: 520px;
  background: var(--slate-900);
}

.detail-bg {
  position: absolute;
  inset: 0;
}

.detail-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  min-height: 520px;
  padding-top: 48px;
  padding-bottom: 48px;
}

.player-section {
  margin-top: -72px;
  position: relative;
  z-index: 4;
}

.player-card {
  overflow: hidden;
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.35);
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.site-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.video-start {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  color: #ffffff;
  background: rgba(29, 78, 216, 0.88);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  transform: translate(-50%, -50%);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

.video-start.hidden {
  display: none;
}

.source-line {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  color: #cbd5e1;
  background: #020617;
  font-size: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding-top: 42px;
  padding-bottom: 20px;
}

.detail-article,
.detail-side {
  padding: 26px;
  background: #ffffff;
  border: 1px solid var(--slate-200);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 16px;
  color: var(--slate-900);
  font-size: 24px;
}

.detail-article p {
  color: var(--slate-700);
  font-size: 17px;
}

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

.tag {
  display: inline-flex;
  padding: 5px 11px;
  color: var(--slate-700);
  background: var(--slate-100);
  border-radius: 999px;
  font-size: 14px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px 12px;
  margin: 0;
}

.detail-side dt {
  color: var(--slate-500);
}

.detail-side dd {
  margin: 0;
  color: var(--slate-800);
  font-weight: 700;
}

.detail-side a {
  color: var(--blue-700);
}

.prev-next {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.prev-next a,
.prev-next span {
  padding: 10px 12px;
  background: var(--slate-100);
  border-radius: 12px;
  color: var(--slate-700);
}

.site-footer {
  color: #cbd5e1;
  background: var(--slate-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  padding-top: 44px;
  padding-bottom: 44px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

.site-footer p {
  margin: 0;
  color: #94a3b8;
}

.site-footer a {
  display: block;
  margin: 7px 0;
  color: #cbd5e1;
}

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

.is-hidden {
  display: none !important;
}

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

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

  .hot-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 12px;
    padding-bottom: 12px;
  }

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

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

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

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

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

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

@media (max-width: 560px) {
  .container-custom {
    padding: 0 14px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    min-height: auto;
    font-size: 15px;
  }

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

  .source-line {
    flex-direction: column;
  }

  .video-start {
    width: 92px;
    height: 92px;
    font-size: 15px;
  }
}
