:root {
  --primary-50: #f0f9f4;
  --primary-100: #dcf0e3;
  --primary-200: #bce0ca;
  --primary-600: #2a724c;
  --primary-700: #225b3e;
  --primary-800: #1d4933;
  --accent-50: #f5f8fa;
  --accent-600: #6083b5;
  --accent-800: #475d88;
  --secondary-50: #fdf8f3;
  --secondary-100: #f9ede0;
  --secondary-600: #c96c3a;
  --night-50: #f4f6f8;
  --night-100: #e3e8ed;
  --night-300: #a5b5c5;
  --night-400: #7991a8;
  --night-700: #3b4c61;
  --night-900: #2e3946;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --shadow: 0 20px 45px rgba(17, 24, 39, 0.12);
  --soft-shadow: 0 10px 30px rgba(42, 114, 76, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--primary-50), #ffffff 34rem);
}

img {
  display: block;
  max-width: 100%;
  background: var(--night-100);
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(229, 231, 235, 0.92);
  box-shadow: 0 8px 30px rgba(17, 24, 39, 0.07);
  backdrop-filter: blur(14px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-600);
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  color: #374151;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.nav-search,
.mobile-search {
  display: flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search:focus-within,
.mobile-search:focus-within {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(188, 224, 202, 0.55);
}

.nav-search input,
.mobile-search input {
  width: 220px;
  padding: 10px 12px 10px 18px;
  border: 0;
  outline: 0;
  background: transparent;
}

.nav-search button,
.mobile-search button {
  border: 0;
  background: var(--primary-600);
  color: #fff;
  min-height: 38px;
  padding: 0 15px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary-700);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

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

.mobile-link {
  display: block;
  padding: 12px 4px;
  color: #374151;
  font-weight: 700;
}

.mobile-search {
  margin-bottom: 10px;
}

.mobile-search input {
  width: 100%;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--night-900);
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.36) 45%, rgba(0, 0, 0, 0.12));
}

.hero-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  padding-bottom: clamp(64px, 9vw, 110px);
}

.hero-copy {
  max-width: 780px;
  color: #fff;
}

.hero-pill,
.page-hero-inner span,
.category-tile-copy span,
.overview-copy span {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary-600);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 18px 0 12px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: -0.055em;
}

.hero-copy h2 + p,
.hero-copy p {
  max-width: 720px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions,
.detail-tags,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

.btn-primary {
  background: var(--primary-600);
  color: #fff;
  box-shadow: 0 12px 30px rgba(42, 114, 76, 0.28);
}

.btn-primary:hover {
  background: var(--primary-700);
}

.btn-glass,
.btn-ghost-light {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.content-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.soft-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: linear-gradient(135deg, var(--primary-50), var(--accent-50), var(--secondary-50));
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-head p {
  max-width: 660px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  background: var(--night-100);
}

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

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

.movie-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.62), transparent 58%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.card-category,
.card-duration {
  position: absolute;
  z-index: 2;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-category {
  top: 10px;
  left: 10px;
  padding: 5px 8px;
  background: var(--primary-600);
}

.card-duration {
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.78);
}

.movie-card-body {
  padding: 16px;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

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

.movie-card p {
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--night-400);
  font-size: 12px;
  font-weight: 700;
}

.meta-row span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--night-50);
}

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

.category-tile,
.overview-card {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 20px;
  align-items: center;
  border-radius: 24px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--soft-shadow);
}

.category-tile-copy h3,
.overview-copy h2 {
  margin: 14px 0 10px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.category-tile-copy p,
.overview-copy p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.75;
}

.category-tile-copy a {
  color: var(--primary-600);
  font-weight: 800;
}

.category-mini-list,
.overview-posters,
.side-grid {
  display: grid;
  gap: 12px;
}

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

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

.compact-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
  background: var(--night-100);
}

.compact-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compact-card span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 72px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.rank-item img {
  width: 72px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-title {
  color: #111827;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  grid-column: 3 / 4;
  margin-top: -10px;
  color: var(--muted);
  font-size: 12px;
}

.page-hero {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  color: #fff;
  padding: 76px 0;
}

.page-hero-category {
  background: linear-gradient(135deg, var(--primary-600), var(--accent-800));
}

.page-hero-ranking {
  background: linear-gradient(135deg, var(--secondary-600), var(--primary-800));
}

.page-hero-search {
  background: linear-gradient(135deg, var(--accent-600), var(--primary-800));
}

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

.page-hero-inner span {
  background: rgba(255, 255, 255, 0.18);
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.breadcrumb a {
  color: inherit;
  font-weight: 800;
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.06);
}

.filter-title {
  color: #111827;
  font-size: 18px;
  font-weight: 900;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  height: 42px;
  min-width: 160px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(188, 224, 202, 0.55);
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.full-rank {
  gap: 14px;
}

.side-panel {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 20px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

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

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

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: var(--night-900);
}

.detail-bg {
  position: absolute;
  inset: 0;
  filter: blur(8px) saturate(1.05);
  transform: scale(1.05);
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52) 48%, rgba(0, 0, 0, 0.2)), linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent 45%);
}

.detail-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 40px;
  align-items: end;
  padding: 72px 0;
  color: #fff;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

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

.detail-copy h1 {
  margin: 20px 0 14px;
  font-size: clamp(36px, 5.5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 20px;
  line-height: 1.7;
}

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

.detail-meta span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

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

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card,
.text-card,
.side-info-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.08);
}

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

.movie-video,
.player-cover,
.player-cover img {
  width: 100%;
  height: 100%;
}

.movie-video {
  display: block;
  background: #000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  filter: brightness(0.54);
}

.play-trigger {
  position: relative;
  z-index: 4;
  width: 82px;
  height: 82px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--primary-600);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  font-size: 30px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.play-trigger:hover {
  transform: scale(1.08);
  background: var(--primary-700);
}

.text-card {
  padding: 28px;
}

.text-card h2,
.side-info-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.text-card p {
  margin: 0;
  color: #374151;
  font-size: 16px;
  line-height: 1.95;
}

.detail-side {
  position: sticky;
  top: 92px;
}

.side-info-card {
  padding: 24px;
}

.side-info-card dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.side-info-card dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.side-info-card dd {
  margin: -8px 0 0;
  color: #111827;
  font-weight: 800;
  line-height: 1.55;
}

.side-info-card a {
  color: var(--primary-600);
}

.site-footer {
  margin-top: 40px;
  color: #fff;
  background: var(--night-900);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 36px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.brand-footer .brand-text {
  color: #fff;
  background: none;
}

.footer-brand p {
  max-width: 460px;
  color: var(--night-300);
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 16px;
  font-size: 18px;
}

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

.site-footer a {
  color: var(--night-300);
  transition: color 0.2s ease;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 30px;
  border-top: 1px solid var(--night-700);
  color: var(--night-400);
  text-align: center;
  font-size: 14px;
}

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

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

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

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

  .side-panel,
  .detail-side {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 560px;
    height: 76vh;
  }

  .hero-arrow {
    display: none;
  }

  .hero-inner {
    padding-bottom: 84px;
  }

  .section-head,
  .filter-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-controls,
  .filter-controls input,
  .filter-controls select {
    width: 100%;
  }

  .category-grid,
  .overview-grid,
  .category-tile,
  .overview-card,
  .footer-grid,
  .detail-inner {
    grid-template-columns: 1fr;
  }

  .detail-inner {
    padding: 48px 0;
    align-items: center;
  }

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

@media (max-width: 640px) {
  .brand-text {
    font-size: 19px;
  }

  .movie-grid,
  .catalog-grid,
  .home-rank {
    grid-template-columns: 1fr;
  }

  .content-section {
    padding: 46px 0;
  }

  .rank-item {
    grid-template-columns: 38px 64px 1fr;
  }

  .rank-item img {
    width: 64px;
    height: 44px;
  }

  .detail-hero,
  .detail-inner {
    min-height: auto;
  }

  .detail-copy h1 {
    font-size: 34px;
  }

  .play-trigger {
    width: 68px;
    height: 68px;
  }
}
