:root {
  --bg-start: #f8fafc;
  --bg-mid: #eff6ff;
  --bg-end: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #06b6d4;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, var(--bg-start), var(--bg-mid) 45%, var(--bg-end));
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.brand-text strong {
  display: block;
  font-size: 22px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 10px 14px;
  color: #334155;
  border-radius: 12px;
  transition: 0.2s ease;
}

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

.header-search {
  position: relative;
  width: min(280px, 24vw);
}

.header-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  color: #334155;
  background: #ffffff;
  outline: none;
  transition: 0.2s ease;
}

.header-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.28);
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 90vw);
  max-height: 440px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-result {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
}

.search-result:hover {
  background: #eff6ff;
}

.search-result strong {
  display: block;
  color: #0f172a;
}

.search-result span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f8fafc;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: #334155;
}

.mobile-menu {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border-top: 1px solid var(--line);
}

.mobile-menu a,
.mobile-category-link {
  display: block;
  padding: 12px;
  border-radius: 12px;
  color: #334155;
}

.mobile-menu a:hover {
  color: var(--blue);
  background: #eff6ff;
}

.hero-carousel {
  position: relative;
  height: min(620px, calc(100vh - 74px));
  min-height: 500px;
  overflow: hidden;
  background: #020617;
}

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

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.56) 48%, rgba(2, 6, 23, 0.16)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.85), transparent 55%);
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
  z-index: 2;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.24);
  border: 1px solid rgba(147, 197, 253, 0.28);
  backdrop-filter: blur(10px);
  font-size: 13px;
}

.hero-content h1 {
  max-width: 760px;
  margin: 20px 0 14px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 720px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.55);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  transition: 0.2s ease;
}

.hero-control:hover {
  background: rgba(15, 23, 42, 0.82);
}

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

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

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.55);
  transition: 0.2s ease;
}

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

.quick-panel,
.section-block,
.rank-layout,
.category-overview,
.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-panel {
  margin-top: -54px;
  position: relative;
  z-index: 8;
}

.quick-inner {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: 28px;
  padding: 26px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-inner h2,
.section-heading h2,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.quick-inner p,
.section-heading p,
.page-hero p {
  color: var(--muted);
  line-height: 1.8;
}

.quick-cats,
.side-cats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: var(--blue);
  background: #eff6ff;
  font-weight: 700;
}

.section-block,
.category-overview {
  margin-top: 56px;
}

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

.section-heading a {
  flex-shrink: 0;
  color: var(--blue);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #dbeafe, #ecfeff);
}

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

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

.poster-badge,
.poster-score {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(8px);
}

.poster-badge {
  left: 12px;
}

.poster-score {
  right: 12px;
  background: rgba(37, 99, 235, 0.82);
}

.card-body {
  padding: 14px;
}

.card-body h2 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h2 a:hover {
  color: var(--blue);
}

.card-meta,
.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.card-desc {
  margin-top: 8px;
  color: #475569;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
  gap: 24px;
  margin-top: 58px;
}

.rank-main,
.rank-side,
.category-strip,
.latest-block,
.category-card,
.detail-content,
.side-card {
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--soft-shadow);
}

.rank-main,
.rank-side,
.category-strip,
.latest-block {
  padding: 24px;
}

.rank-list,
.latest-list,
.side-rel-list {
  display: grid;
  gap: 12px;
}

.movie-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px;
  border-radius: 16px;
  transition: 0.2s ease;
}

.movie-row:hover {
  background: #f8fafc;
}

.movie-row img {
  width: 96px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
  background: #dbeafe;
}

.rank-num {
  width: 36px;
  flex-shrink: 0;
  color: var(--blue);
  font-weight: 900;
}

.row-info {
  min-width: 0;
}

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

.row-info strong {
  color: #0f172a;
}

.row-info em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

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

.compact-heading h2 {
  font-size: 28px;
}

.page-hero {
  min-height: 300px;
  display: flex;
  align-items: center;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.42), transparent 34%),
    linear-gradient(135deg, #0f172a, #1e3a8a 50%, #0891b2);
}

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

.page-hero p {
  max-width: 740px;
  color: #dbeafe;
}

.crumb {
  margin: 0 0 14px;
  font-size: 14px;
}

.crumb a {
  color: #bfdbfe;
}

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

.category-card {
  padding: 24px;
}

.category-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.category-card h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.03em;
}

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

.category-card p {
  color: var(--muted);
  line-height: 1.8;
}

.category-card li {
  margin-top: 8px;
  color: #334155;
}

.category-card li a:hover {
  color: var(--blue);
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 72px 170px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.ranking-number {
  color: var(--blue);
  font-size: 28px;
  font-weight: 900;
}

.ranking-cover img {
  width: 170px;
  height: 105px;
  object-fit: cover;
  border-radius: 16px;
  background: #dbeafe;
}

.ranking-info h2 {
  margin: 0 0 8px;
}

.ranking-info p {
  margin: 0;
  color: #475569;
  line-height: 1.7;
}

.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ranking-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #1e3a8a;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 700;
}

.detail-shell {
  margin-top: 28px;
}

.detail-shell .crumb {
  color: var(--muted);
}

.detail-shell .crumb a {
  color: var(--blue);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
  gap: 24px;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.58));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.36);
  font-size: 34px;
  padding-left: 4px;
}

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

.detail-content {
  margin-top: 22px;
  padding: 28px;
}

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

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: #1e3a8a;
  background: #eff6ff;
  font-size: 13px;
  font-weight: 800;
}

.detail-content section {
  margin-top: 24px;
}

.detail-content h2,
.side-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.detail-content p,
.side-card p {
  color: #475569;
  line-height: 1.9;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 20px;
}

.side-card {
  padding: 20px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
  background: #dbeafe;
}

.poster-card .btn {
  width: 100%;
  margin-top: 12px;
}

.related-block {
  margin-top: 36px;
}

.site-footer {
  margin-top: 72px;
  color: #e2e8f0;
  background: linear-gradient(135deg, #0f172a, #111827);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 0.7fr;
  gap: 28px;
  padding: 44px 0;
}

.footer-about p,
.site-footer li,
.footer-bottom {
  color: #cbd5e1;
}

.site-footer h2,
.site-footer h3 {
  color: #ffffff;
}

.site-footer li {
  margin-top: 8px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 26px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  text-align: center;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

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

  .header-search {
    width: min(240px, 28vw);
  }
}

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

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

  .hero-carousel {
    min-height: 540px;
  }

  .hero-content h1 {
    font-size: 46px;
  }

  .quick-inner,
  .category-card-grid,
  .filter-bar,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .ranking-item {
    grid-template-columns: 52px 112px minmax(0, 1fr);
  }

  .ranking-cover img {
    width: 112px;
    height: 78px;
  }
}

@media (max-width: 620px) {
  .header-inner {
    width: min(100% - 20px, 1180px);
  }

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

  .brand-text small {
    display: none;
  }

  .hero-content {
    width: min(100% - 28px, 1180px);
  }

  .hero-content p {
    font-size: 15px;
  }

  .hero-control {
    display: none;
  }

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

  .quick-panel,
  .section-block,
  .rank-layout,
  .category-overview,
  .detail-shell,
  .category-strip {
    width: min(100% - 24px, 1180px);
  }

  .rank-main,
  .rank-side,
  .category-strip,
  .latest-block,
  .detail-content,
  .side-card {
    padding: 18px;
    border-radius: 20px;
  }

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

  .ranking-item {
    grid-template-columns: 1fr;
  }

  .ranking-cover img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .movie-row img {
    width: 82px;
    height: 54px;
  }

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