:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --accent-400: #fbbf24;
  --accent-500: #d97706;
  --secondary-50: #f8fafc;
  --secondary-100: #f1f5f9;
  --secondary-200: #e2e8f0;
  --secondary-300: #cbd5e1;
  --secondary-500: #64748b;
  --secondary-600: #475569;
  --secondary-700: #334155;
  --secondary-800: #1e293b;
  --secondary-900: #0f172a;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.05);
  --shadow-md: 0 10px 15px -3px rgb(15 23 42 / 0.10), 0 4px 6px -4px rgb(15 23 42 / 0.10);
  --shadow-lg: 0 20px 25px -5px rgb(15 23 42 / 0.16), 0 8px 10px -6px rgb(15 23 42 / 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 0.95);
  border-bottom: 1px solid var(--secondary-200);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
  color: var(--secondary-900);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-600), #38bdf8);
  box-shadow: var(--shadow-sm);
}

.brand-mark span {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid var(--white);
}

.brand-text {
  font-size: 20px;
  letter-spacing: -0.02em;
}

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

.nav-link {
  color: var(--secondary-700);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary-600);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header-search input {
  width: 220px;
  height: 40px;
  border: 1px solid var(--secondary-200);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--secondary-700);
  background: var(--white);
  outline: none;
}

.header-search input:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgb(2 132 199 / 0.12);
}

.header-search button,
.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  padding: 10px 22px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button,
.primary-button {
  color: var(--white);
  background: var(--primary-600);
  box-shadow: var(--shadow-sm);
}

.header-search button:hover,
.primary-button:hover {
  background: var(--primary-700);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.secondary-button {
  color: var(--secondary-900);
  background: rgb(255 255 255 / 0.88);
}

.secondary-button:hover {
  background: var(--white);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: var(--secondary-100);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--secondary-700);
}

.mobile-nav {
  display: none;
  padding: 0 16px 18px;
  background: var(--white);
  border-bottom: 1px solid var(--secondary-200);
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-nav-link {
  padding: 10px 2px;
  color: var(--secondary-700);
  font-weight: 700;
}

.mobile-nav-link.muted {
  color: var(--secondary-500);
  font-size: 14px;
}

.hero-slider {
  position: relative;
  height: 560px;
  overflow: hidden;
  background: var(--secondary-900);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: fadeIn 0.55s ease;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(0 0 0 / 0.84), rgb(0 0 0 / 0.55), rgb(0 0 0 / 0.25));
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  height: 100%;
}

.hero-copy {
  max-width: 720px;
  color: var(--white);
  animation: slideUp 0.55s ease;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: rgb(255 255 255 / 0.86);
  font-size: 14px;
}

.hero-kicker strong {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 14px;
  color: var(--white);
  background: var(--primary-600);
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgb(255 255 255 / 0.90);
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.hero-rating {
  color: rgb(255 255 255 / 0.80);
  font-weight: 700;
}

.hero-rating span {
  color: var(--accent-400);
  font-size: 20px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgb(0 0 0 / 0.32);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgb(0 0 0 / 0.54);
}

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

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

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

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

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

main {
  min-height: 60vh;
}

.section {
  padding: 42px 0;
}

.section-soft {
  padding: 52px 0;
  background: linear-gradient(135deg, var(--primary-50), #fff7ed);
}

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

.section-heading h2 {
  margin: 0;
  color: var(--secondary-900);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--secondary-600);
}

.section-heading a {
  flex: 0 0 auto;
  color: var(--primary-600);
  font-weight: 800;
}

.card,
.movie-card,
.category-card,
.info-card,
.filter-panel {
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.movie-card {
  display: block;
  overflow: hidden;
  min-width: 0;
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--secondary-200);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgb(0 0 0 / 0.40);
  transition: opacity 0.25s ease;
}

.poster-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  color: var(--white);
  font-size: 42px;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .poster-play {
  opacity: 1;
}

.rating-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 8px;
  padding: 4px 8px;
  color: var(--white);
  background: rgb(0 0 0 / 0.70);
  font-size: 12px;
  font-weight: 800;
}

.movie-card-body {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.movie-card-body strong {
  overflow: hidden;
  display: -webkit-box;
  color: var(--secondary-900);
  font-size: 16px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover strong {
  color: var(--primary-600);
}

.movie-meta,
.movie-line {
  overflow: hidden;
  display: -webkit-box;
  color: var(--secondary-500);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-type {
  justify-self: start;
  border-radius: 999px;
  padding: 3px 9px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 12px;
  font-weight: 800;
}

.scroller-wrap {
  position: relative;
}

.horizontal-scroller {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 2px 18px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.horizontal-scroller::-webkit-scrollbar {
  display: none;
}

.scroller-actions {
  display: flex;
  gap: 8px;
}

.scroller-actions button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--secondary-700);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.wide-card {
  display: flex;
  flex: 0 0 260px;
  gap: 14px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

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

.wide-poster {
  position: relative;
  flex: 0 0 104px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.wide-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wide-poster span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgb(0 0 0 / 0.32);
}

.wide-body {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  padding-right: 12px;
}

.wide-body strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.wide-body em {
  color: var(--secondary-500);
  font-size: 13px;
  font-style: normal;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  padding: 22px;
  border: 1px solid transparent;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

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

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

.category-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -24px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-100), transparent);
}

.page-hero {
  padding: 64px 0 42px;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 20%, rgb(14 165 233 / 0.35), transparent 30%),
    linear-gradient(135deg, var(--secondary-900), #082f49 70%, #0c4a6e);
}

.page-hero h1 {
  max-width: 920px;
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgb(255 255 255 / 0.84);
  font-size: 18px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px auto 0;
  color: var(--secondary-500);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--primary-600);
  font-weight: 700;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--secondary-200);
  border-radius: 10px;
  padding: 0 14px;
  background: var(--white);
  color: var(--secondary-700);
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgb(2 132 199 / 0.10);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 92px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border-radius: 14px;
  padding: 12px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.rank-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 900;
}

.rank-item img {
  width: 92px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
}

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

.rank-item em {
  color: var(--secondary-500);
  font-size: 13px;
  font-style: normal;
}

.rank-item small {
  color: var(--secondary-600);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
  padding: 28px 0 48px;
}

.player-card {
  overflow: hidden;
  border-radius: 16px;
  background: #000000;
  box-shadow: var(--shadow-lg);
}

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

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgb(0 0 0 / 0.55), rgb(0 0 0 / 0.18));
  cursor: pointer;
}

.player-overlay[hidden] {
  display: none;
}

.play-ring {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.18);
  box-shadow: 0 0 0 10px rgb(255 255 255 / 0.08);
  backdrop-filter: blur(8px);
}

.play-ring span {
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 26px solid var(--white);
}

.detail-info {
  margin-top: 24px;
  padding: 28px;
}

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

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--secondary-600);
}

.detail-meta span {
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--secondary-100);
  font-size: 14px;
  font-weight: 700;
}

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

.detail-info p {
  margin: 0;
  color: var(--secondary-700);
}

.one-line {
  border-left: 4px solid var(--primary-600);
  border-radius: 10px;
  padding: 16px 18px;
  background: var(--primary-50);
  color: var(--primary-700) !important;
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tag-list span {
  border-radius: 999px;
  padding: 6px 11px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 13px;
  font-weight: 800;
}

.side-card {
  padding: 20px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.side-card + .side-card {
  margin-top: 22px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.side-movie {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.side-movie img {
  width: 96px;
  height: 62px;
  border-radius: 10px;
  object-fit: cover;
}

.side-movie strong,
.side-movie span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.side-movie strong {
  color: var(--secondary-900);
  line-height: 1.35;
  -webkit-line-clamp: 2;
}

.side-movie span {
  color: var(--secondary-500);
  font-size: 13px;
  -webkit-line-clamp: 1;
}

.search-empty {
  display: none;
  padding: 24px;
  border-radius: 14px;
  color: var(--secondary-600);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.search-empty.is-visible {
  display: block;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--primary-600);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.back-top.is-visible {
  display: grid;
  place-items: center;
}

.site-footer {
  margin-top: 56px;
  color: var(--secondary-300);
  background: var(--secondary-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 36px;
  padding: 44px 0;
}

.footer-brand {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
}

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

.site-footer p {
  margin: 0;
  color: var(--secondary-300);
}

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

.site-footer a:hover {
  color: var(--accent-400);
}

.footer-bottom {
  padding: 20px 0 28px;
  border-top: 1px solid var(--secondary-800);
  text-align: center;
}

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

  .hero-slider {
    height: 500px;
  }

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

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

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

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1280px);
  }

  .hero-slider {
    height: 520px;
  }

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

  .hero-arrow {
    display: none;
  }

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

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

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

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

  .rank-item {
    grid-template-columns: 42px 74px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-item img {
    width: 74px;
    height: 54px;
  }

  .detail-info {
    padding: 20px;
  }

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