@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;700;900&display=swap");

:root {
  --primary-50: #f0f4f8;
  --primary-100: #d9e2ec;
  --primary-200: #bcccdc;
  --primary-500: #627d98;
  --primary-600: #486581;
  --primary-700: #334e68;
  --primary-800: #243b53;
  --primary-900: #102a43;
  --accent-300: #ffd54f;
  --accent-400: #ffca28;
  --accent-500: #ffc107;
  --accent-600: #ffb300;
  --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;
  --white: #ffffff;
  --shadow-soft: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.08);
  --shadow-medium: 0 12px 24px -12px rgba(15, 23, 42, 0.35);
  --shadow-hard: 0 24px 60px -24px rgba(15, 23, 42, 0.55);
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-2xl: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-800);
  background: linear-gradient(180deg, var(--slate-50), var(--white));
  font-family: Inter, "Noto Sans SC", 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%;
}

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--slate-200);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 24px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.brand-copy {
  display: grid;
  gap: 0;
}

.brand-name {
  color: var(--slate-900);
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.brand-subtitle {
  margin-top: -1px;
  color: var(--slate-500);
  font-size: 12px;
  font-weight: 600;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 9px 14px;
  color: var(--slate-600);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.search-hero-form input,
.filter-panel input,
.filter-panel select {
  border: 1px solid var(--slate-300);
  border-radius: 12px;
  background: var(--white);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  width: 210px;
  padding: 9px 12px;
  font-size: 14px;
}

.top-search input:focus,
.search-hero-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(98, 125, 152, 0.16);
}

.top-search button,
.search-hero-form button {
  border: 0;
  color: var(--white);
  background: var(--primary-700);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

.top-search button {
  padding: 9px 13px;
}

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

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), var(--primary-900) 56%, var(--slate-800));
}

.hero-slider {
  position: relative;
  height: 600px;
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  transform: scale(1.04);
}

.hero-overlay,
.detail-bg-mask {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 193, 7, 0.16), transparent 28%), linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(16, 42, 67, 0.72) 42%, rgba(15, 23, 42, 0.34));
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  color: var(--accent-300);
  background: rgba(255, 193, 7, 0.16);
  border: 1px solid rgba(255, 193, 7, 0.2);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  max-width: 860px;
  margin: 24px 0 20px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 30px;
  color: rgba(241, 245, 249, 0.92);
  font-size: clamp(18px, 2.2vw, 23px);
}

.hero-actions,
.detail-meta,
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

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

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

.btn-accent {
  color: var(--slate-900);
  background: var(--accent-500);
  box-shadow: var(--shadow-hard);
}

.btn-accent:hover {
  background: var(--accent-600);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-meta {
  margin-top: 24px;
}

.hero-meta span,
.detail-meta span {
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--accent-500);
}

.hero-panel {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 18px;
  margin-top: -56px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-hard);
  backdrop-filter: blur(16px);
}

.hero-panel-title {
  display: grid;
  align-content: center;
  gap: 5px;
}

.hero-panel-title strong {
  font-size: 22px;
}

.hero-panel-title span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.hero-panel-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.34);
  border-radius: 16px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.horizontal-card:hover {
  transform: translateY(-3px);
  background: rgba(15, 23, 42, 0.5);
}

.horizontal-card img {
  width: 92px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.horizontal-card strong,
.horizontal-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.horizontal-card strong {
  font-size: 14px;
}

.horizontal-card small {
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
}

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

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

.section-head h2 {
  margin: 0 0 6px;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 0;
  color: var(--slate-600);
}

.section-link {
  flex: 0 0 auto;
  padding: 10px 14px;
  color: var(--primary-800);
  background: var(--primary-100);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(226, 232, 240, 0.72);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  border-color: rgba(98, 125, 152, 0.28);
  box-shadow: var(--shadow-medium);
  transform: translateY(-5px);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--slate-200);
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.76));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  color: var(--slate-900);
  background: var(--accent-500);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  color: var(--slate-900);
  background: var(--accent-500);
  border-radius: 999px;
  font-weight: 900;
  box-shadow: var(--shadow-medium);
}

.card-content {
  padding: 16px;
}

.card-meta {
  margin-bottom: 8px;
  color: var(--primary-600);
  font-size: 12px;
  font-weight: 800;
}

.card-content h3 {
  margin: 0 0 8px;
  color: var(--slate-900);
  font-size: 19px;
  line-height: 1.28;
  letter-spacing: -0.025em;
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span {
  padding: 5px 9px;
  color: var(--primary-700);
  background: var(--primary-50);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.category-band {
  padding: 70px 0;
  background: linear-gradient(135deg, var(--primary-50), var(--white));
}

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

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-soft);
  isolation: isolate;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

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

.category-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.86));
}

.category-content {
  position: absolute;
  inset: auto 20px 20px;
  z-index: 2;
  display: grid;
  gap: 8px;
  color: var(--white);
}

.category-content strong {
  font-size: 24px;
  line-height: 1;
}

.category-content em {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-style: normal;
}

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--slate-900), var(--primary-900));
}

.compact-hero {
  padding: 74px 0 66px;
}

.compact-hero h1 {
  max-width: 780px;
  margin: 18px 0 12px;
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.compact-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(241, 245, 249, 0.86);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--accent-300);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--slate-600);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 12px 13px;
  color: var(--slate-800);
}

.category-movie-grid,
.ranking-page-grid,
.search-results {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: blur(2px);
  transform: scale(1.02);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 56px 0 64px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-hard);
}

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

.detail-copy h1 {
  margin: 18px 0;
  font-size: clamp(36px, 5.4vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 20px;
  color: rgba(241, 245, 249, 0.9);
  font-size: 20px;
}

.detail-tags span {
  color: var(--accent-300);
  background: rgba(255, 193, 7, 0.14);
}

.player-section {
  margin-top: -42px;
  position: relative;
  z-index: 3;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-hard);
}

.movie-player,
.player-cover,
.player-cover img,
.player-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-player {
  z-index: 1;
  background: #000;
}

.player-cover {
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #000;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.player-cover img {
  object-fit: cover;
  opacity: 0.72;
}

.player-mask {
  background: radial-gradient(circle, rgba(255, 193, 7, 0.24), rgba(15, 23, 42, 0.74));
}

.player-button {
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  color: var(--slate-900);
  background: var(--accent-500);
  border-radius: 999px;
  box-shadow: var(--shadow-hard);
  font-size: 34px;
  text-indent: 5px;
}

.prose-card {
  padding: clamp(24px, 5vw, 44px);
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-soft);
}

.prose-card h2 {
  margin: 0 0 12px;
  color: var(--slate-900);
  font-size: 28px;
  letter-spacing: -0.035em;
}

.prose-card h2:not(:first-child) {
  margin-top: 32px;
}

.prose-card p {
  margin: 0;
  color: var(--slate-700);
  font-size: 17px;
}

.search-hero-form {
  display: flex;
  gap: 12px;
  max-width: 720px;
  margin-top: 28px;
}

.search-hero-form input {
  flex: 1;
  min-height: 52px;
  padding: 0 16px;
}

.search-hero-form button {
  padding: 0 24px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 38px;
  color: var(--slate-600);
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-xl);
  text-align: center;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 38px;
  padding: 48px 0;
}

.footer-logo {
  color: var(--white);
  font-size: 20px;
}

.footer-brand p {
  max-width: 520px;
  margin: 16px 0 0;
  color: var(--slate-400);
}

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

.footer-links {
  display: grid;
  gap: 9px;
}

.footer-links a {
  color: var(--slate-400);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  padding: 18px 0;
  color: var(--slate-500);
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1080px) {
  .movie-grid,
  .featured-grid,
  .ranking-grid,
  .category-movie-grid,
  .ranking-page-grid,
  .search-results,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 840px) {
  .navbar {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-panel {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 0 0 16px;
  }

  .nav-panel.is-open {
    display: flex;
  }

  .nav-links {
    display: grid;
    gap: 8px;
  }

  .top-search {
    display: grid;
    grid-template-columns: 1fr auto;
  }

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

  .hero,
  .hero-slider,
  .hero-inner {
    min-height: 620px;
  }

  .hero-dots {
    bottom: 140px;
  }

  .movie-grid,
  .featured-grid,
  .ranking-grid,
  .category-movie-grid,
  .ranking-page-grid,
  .search-results,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

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

  .brand-name {
    font-size: 18px;
  }

  .brand-subtitle {
    font-size: 11px;
  }

  .hero,
  .hero-slider,
  .hero-inner {
    min-height: 700px;
  }

  .hero-panel {
    margin-top: -36px;
  }

  .hero-panel-list,
  .movie-grid,
  .featured-grid,
  .ranking-grid,
  .category-movie-grid,
  .ranking-page-grid,
  .search-results,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .search-hero-form {
    flex-direction: column;
    align-items: stretch;
  }

  .section-head {
    display: grid;
  }

  .content-section,
  .category-band {
    padding: 48px 0;
  }

  .player-button {
    width: 70px;
    height: 70px;
    font-size: 28px;
  }
}
