:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-soft: #f0f9ff;
  --accent: #f97316;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --shadow: 0 14px 35px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.08);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(16px);
}

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

.brand,
.nav-links,
.mobile-menu,
.hero-actions,
.hero-labels,
.detail-meta,
.detail-tags,
.card-meta,
.mini-tags,
.pill-cloud,
.selects,
.prev-next {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  color: #111827;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
}

.brand-icon svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.nav-links {
  gap: 28px;
}

.nav-links a,
.mobile-menu a {
  color: #374151;
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease;
}

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

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  padding: 10px;
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #334155;
  border-radius: 2px;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 8px 24px 18px;
  border-top: 1px solid var(--line);
}

.mobile-menu a {
  padding: 10px 12px;
  border-radius: 10px;
}

.mobile-menu a:hover {
  background: var(--primary-soft);
}

.container,
.hero-wrap,
.page-hero,
.detail-hero {
  max-width: 1280px;
  margin: 0 auto;
}

.hero-wrap {
  padding: 32px 24px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

.hero-stage,
.feature-card,
.page-hero,
.category-hero,
.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-stage {
  height: min(70vh, 680px);
  min-height: 520px;
}

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

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

.hero-slide img,
.feature-card img,
.page-hero > img,
.category-card-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.feature-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.08));
}

.hero-content,
.feature-content,
.page-hero > div {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 720px;
  padding: 56px;
  color: #fff;
}

.hero-labels {
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.hero-labels span,
.detail-tags span,
.mini-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-labels span {
  padding: 5px 12px;
  color: #fff;
  background: rgba(2, 132, 199, 0.88);
  backdrop-filter: blur(10px);
}

.hero-content h1,
.hero-content h2,
.feature-content h2,
.page-hero h1,
.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 64px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p,
.feature-content p,
.page-hero p {
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

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

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

.btn-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 14px 28px rgba(2, 132, 199, 0.28);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.08);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 28px;
  z-index: 6;
  display: flex;
  gap: 8px;
}

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

.hero-dots button.is-active {
  width: 32px;
  background: #fff;
}

.hero-side {
  border-radius: 24px;
  padding: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  align-self: stretch;
}

.side-title {
  margin-bottom: 14px;
  font-size: 19px;
  font-weight: 900;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-no {
  color: var(--primary);
  font-size: 22px;
  font-weight: 900;
}

.rank-row img {
  width: 68px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
  background: #e2e8f0;
}

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

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  overflow: hidden;
  color: #111827;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.container {
  padding: 56px 24px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-head a {
  color: var(--primary);
  font-weight: 800;
  white-space: nowrap;
}

.feature-card {
  height: 500px;
}

.feature-card img {
  transition: transform 0.5s ease;
}

.feature-card:hover img {
  transform: scale(1.04);
}

.feature-overlay {
  background: linear-gradient(to right, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.04));
}

.feature-content {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

.category-grid,
.category-card-grid,
.movie-grid,
.rank-grid {
  display: grid;
  gap: 22px;
}

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

.category-tile {
  min-height: 130px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile span {
  display: block;
  margin-bottom: 10px;
  color: #111827;
  font-size: 20px;
  font-weight: 900;
}

.category-tile em,
.category-card-large em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.7;
}

.rank-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 8px 22px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.filter-panel {
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}

.search-box svg {
  width: 20px;
  height: 20px;
  fill: var(--muted);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.selects {
  gap: 10px;
  flex-wrap: wrap;
}

.selects select {
  height: 46px;
  min-width: 122px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: #f8fafc;
  color: #334155;
}

.empty-state {
  padding: 28px;
  border-radius: 20px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e2e8f0;
}

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

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

.card-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.68), transparent 62%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-poster::after {
  opacity: 1;
}

.rating,
.card-category,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.rating {
  top: 10px;
  right: 10px;
  gap: 4px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.rating svg {
  width: 13px;
  height: 13px;
  fill: #facc15;
}

.card-category {
  left: 10px;
  bottom: 10px;
  padding: 4px 8px;
  background: var(--primary);
}

.rank-badge {
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent);
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  min-height: 46px;
  margin: 0 0 8px;
  color: #111827;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.45;
}

.card-body h3 a:hover {
  color: var(--primary);
}

.card-body p {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  gap: 8px;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 12px;
}

.card-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #cbd5e1;
}

.mini-tags {
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.mini-tags span {
  padding: 3px 8px;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.page-hero {
  margin-top: 32px;
  min-height: 330px;
}

.small-hero {
  background: linear-gradient(135deg, #0369a1, #0f172a);
}

.small-hero > div {
  position: relative;
  max-width: 780px;
}

.category-hero {
  height: 430px;
}

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

.category-card-large {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border-radius: 22px;
  color: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card-large::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.1));
}

.category-card-large span,
.category-card-large em {
  position: absolute;
  left: 22px;
  right: 22px;
  z-index: 2;
}

.category-card-large span {
  bottom: 58px;
  font-size: 25px;
  font-weight: 900;
}

.category-card-large em {
  bottom: 22px;
  color: rgba(255, 255, 255, 0.86);
}

.pill-cloud {
  gap: 12px;
  flex-wrap: wrap;
}

.pill-link {
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-weight: 700;
}

.pill-link:hover {
  color: var(--primary);
  border-color: rgba(2, 132, 199, 0.35);
  background: var(--primary-soft);
}

.detail-hero {
  padding: 30px 24px 0;
}

.breadcrumb {
  margin: 0 0 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
}

.player-frame {
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow);
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.22), rgba(0, 0, 0, 0.35));
  color: #fff;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-symbol {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.94);
  box-shadow: 0 18px 35px rgba(2, 132, 199, 0.36);
  font-size: 34px;
  transform: translateX(2px);
}

.detail-info {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px;
  align-self: start;
  padding: 20px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-info img {
  width: 130px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  background: #e2e8f0;
}

.detail-info h1 {
  color: var(--text);
  font-size: 30px;
  letter-spacing: -0.03em;
}

.detail-one-line {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.detail-meta {
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.detail-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #0369a1;
  background: var(--primary-soft);
  font-size: 13px;
  font-weight: 800;
}

.detail-tags {
  gap: 8px;
  flex-wrap: wrap;
}

.detail-tags span {
  padding: 5px 10px;
  color: #334155;
  background: #f1f5f9;
}

.detail-body article {
  padding: 28px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-body h2 {
  margin: 0 0 12px;
  font-size: 25px;
  font-weight: 900;
}

.detail-body p {
  margin: 0 0 22px;
  color: #334155;
  line-height: 1.9;
}

.detail-body p:last-child {
  margin-bottom: 0;
}

.prev-next {
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.prev-next a {
  max-width: 48%;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.site-footer {
  margin-top: 72px;
  padding: 48px 24px 20px;
  background: #111827;
  color: #d1d5db;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 42px;
}

.footer-logo {
  margin-bottom: 12px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.footer-brand p,
.site-footer li,
.site-footer a {
  color: #9ca3af;
  font-size: 14px;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 16px;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  font-size: 13px;
}

@media (max-width: 1120px) {
  .hero-wrap,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .side-title {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .site-header.is-open .mobile-menu {
    display: flex;
  }

  .hero-wrap,
  .container,
  .detail-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-stage {
    min-height: 500px;
  }

  .hero-content,
  .feature-content,
  .page-hero > div {
    padding: 34px 24px;
  }

  .hero-side,
  .filter-panel,
  .footer-grid,
  .category-card-grid {
    grid-template-columns: 1fr;
  }

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

  .filter-panel {
    display: block;
  }

  .selects {
    margin-top: 12px;
  }

  .selects select {
    flex: 1 1 140px;
  }

  .detail-info {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .detail-info img {
    width: 96px;
  }

  .detail-info h1 {
    font-size: 24px;
  }

  .prev-next a {
    max-width: 100%;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .hero-wrap {
    padding-top: 18px;
  }

  .hero-stage {
    min-height: 460px;
    border-radius: 18px;
  }

  .hero-content h1,
  .hero-content h2,
  .feature-content h2,
  .page-hero h1 {
    font-size: 34px;
  }

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

  .hero-arrow {
    display: none;
  }

  .feature-card {
    height: 460px;
  }

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

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

.play-error {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(15, 23, 42, 0.86);
  color: #fff;
  font-size: 14px;
}
