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

:root {
  --primary-50: #fef8f2;
  --primary-100: #fdeee0;
  --primary-400: #f29d5b;
  --primary-500: #ee7f38;
  --primary-600: #e0642d;
  --primary-700: #ba4d27;
  --accent-50: #fefce8;
  --accent-100: #fef9c3;
  --accent-500: #eab308;
  --secondary-500: #78716c;
  --secondary-700: #57534e;
  --secondary-800: #433f3c;
  --warm-50: #fdf8f6;
  --warm-100: #f7efeb;
  --warm-200: #eaded7;
  --warm-300: #d8c7bd;
  --white: #ffffff;
  --shadow-md: 0 4px 10px rgba(67, 63, 60, 0.1);
  --shadow-lg: 0 14px 30px rgba(67, 63, 60, 0.14);
  --shadow-xl: 0 24px 48px rgba(67, 63, 60, 0.18);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --max-width: 1280px;
}

* {
  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(--secondary-800);
  background: var(--warm-50);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.page-bg {
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  max-width: var(--max-width);
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  color: var(--secondary-800);
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: 0 8px 18px rgba(238, 127, 56, 0.35);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--secondary-700);
}

.desktop-nav a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

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

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 310px;
}

.nav-search input,
.hero-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--warm-200);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  color: var(--secondary-800);
  background: rgba(255, 255, 255, 0.92);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus,
.hero-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 4px rgba(238, 127, 56, 0.14);
}

.nav-search button,
.hero-search button,
.primary-btn {
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  box-shadow: 0 9px 20px rgba(238, 127, 56, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.nav-search button:hover,
.hero-search button:hover,
.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(238, 127, 56, 0.32);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 11px;
  color: var(--secondary-800);
  background: var(--warm-100);
  cursor: pointer;
}

.mobile-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 22px 18px;
  border-top: 1px solid var(--warm-200);
  background: #fff;
}

.mobile-nav a {
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  font-weight: 700;
}

.mobile-nav a:hover {
  background: var(--warm-100);
}

.hero-section {
  padding: 68px 22px;
  color: #fff;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.28), transparent 32%),
    radial-gradient(circle at 80% 10%, rgba(255, 237, 172, 0.35), transparent 26%),
    linear-gradient(135deg, var(--primary-500), var(--primary-400) 48%, var(--accent-500));
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(480px, 1.35fr);
  gap: 32px;
  align-items: center;
}

.hero-copy {
  padding: 12px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-hero .eyebrow,
.small-hero .eyebrow {
  color: var(--primary-600);
}

.hero-copy h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p {
  max-width: 680px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
}

.hero-search {
  display: flex;
  gap: 10px;
  max-width: 620px;
  margin-top: 28px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.hero-search input {
  border: 0;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 13px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition: background 0.2s ease, transform 0.2s ease;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

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

.content-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 54px 22px;
}

.white-section {
  max-width: none;
  background: #fff;
}

.white-section > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  font-weight: 900;
  color: var(--secondary-800);
}

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

.heading-line {
  flex: 1;
  height: 4px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-500), transparent);
}

.section-more {
  margin-bottom: 3px;
  color: var(--primary-600);
  font-weight: 900;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
}

.poster-wide {
  aspect-ratio: 4 / 5;
}

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

.movie-card:hover .poster-frame img,
.movie-row:hover .row-cover img {
  transform: scale(1.06);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.76));
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(238, 127, 56, 0.9);
}

.poster-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: auto;
  border-radius: 999px;
  color: var(--primary-600);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: scale(1);
}

.large-card-text {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  color: #fff;
}

.large-card-text h3 {
  margin: 0 0 8px;
  font-size: 23px;
  line-height: 1.25;
  font-weight: 900;
}

.large-card-text p {
  display: -webkit-box;
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--secondary-800);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--secondary-500);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--secondary-500);
  font-size: 13px;
  font-weight: 700;
}

.card-meta span,
.detail-meta span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--warm-100);
}

.light-meta {
  color: rgba(255, 255, 255, 0.92);
}

.light-meta span {
  background: rgba(255, 255, 255, 0.18);
}

.tag-line {
  margin-top: 10px;
  color: var(--primary-600);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: start;
}

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

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: #fff;
  background: var(--secondary-800);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  opacity: 0.82;
  transition: transform 0.5s ease;
}

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

.category-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.82));
}

.category-content {
  position: absolute;
  inset: auto 18px 18px 18px;
  display: grid;
  gap: 5px;
}

.category-content strong {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 900;
}

.category-content em,
.category-content small {
  font-style: normal;
  color: rgba(255, 255, 255, 0.84);
}

.ranking-panel,
.sidebar-card,
.info-card,
.player-card {
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.ranking-panel {
  padding: 20px;
  position: sticky;
  top: 88px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.panel-title h2,
.sidebar-card h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}

.panel-title a {
  color: var(--primary-600);
  font-weight: 900;
}

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

.movie-row {
  display: grid;
  grid-template-columns: 36px 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  padding: 10px;
  background: #fff;
  transition: background 0.2s ease, transform 0.2s ease;
}

.movie-row:hover {
  background: var(--warm-50);
  transform: translateX(3px);
}

.rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
}

.row-cover {
  display: block;
  width: 96px;
  height: 62px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--warm-100);
}

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

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

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

.row-body strong {
  color: var(--secondary-800);
  font-size: 15px;
  font-weight: 900;
}

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

.heat {
  color: var(--primary-600);
  font-weight: 900;
  font-size: 13px;
}

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

.page-hero {
  margin: 0;
  padding: 54px 22px;
  background:
    radial-gradient(circle at 18% 0%, rgba(238, 127, 56, 0.14), transparent 28%),
    linear-gradient(180deg, #fff, var(--warm-50));
}

.page-hero > div {
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-hero p {
  color: var(--secondary-500);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--secondary-500);
  font-size: 14px;
  font-weight: 700;
}

.breadcrumb a {
  color: var(--primary-600);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px 180px;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: var(--shadow-md);
}

.filter-bar select {
  appearance: none;
  border-radius: 999px;
}

.result-count {
  margin: 12px 0 22px;
  color: var(--secondary-500);
  font-weight: 800;
}

.ranking-page-list {
  max-width: 940px;
  margin: 0 auto;
}

.detail-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 22px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.player-card {
  overflow: hidden;
  margin-bottom: 22px;
  background: #000;
}

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

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  cursor: pointer;
  background:
    radial-gradient(circle, rgba(238, 127, 56, 0.26), transparent 33%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72));
}

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

.play-circle {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-600);
  font-size: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-xl);
}

.player-overlay strong {
  font-size: 24px;
  font-weight: 900;
}

.player-overlay em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.78);
}

.player-error {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 5;
  border-radius: 12px;
  padding: 12px 14px;
  color: #fff;
  background: rgba(185, 28, 28, 0.88);
}

.info-card {
  padding: 24px;
  margin-bottom: 28px;
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 16px;
}

.detail-title-row h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
  font-weight: 900;
}

.detail-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 14px 0;
  color: var(--secondary-600);
  font-weight: 800;
}

.detail-tags span {
  color: var(--primary-700);
  background: var(--primary-100);
}

.story-block {
  border-top: 1px solid var(--warm-200);
  padding-top: 22px;
  margin-top: 22px;
}

.story-block h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 900;
}

.story-block p {
  margin: 0;
  color: var(--secondary-700);
  font-size: 17px;
}

.detail-sidebar {
  position: sticky;
  top: 88px;
}

.sidebar-card {
  padding: 18px;
}

.detail-related-section {
  padding-left: 0;
  padding-right: 0;
}

.site-footer {
  color: var(--warm-100);
  background: var(--secondary-800);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 46px 22px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: #fff;
  margin-bottom: 14px;
}

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

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

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 7px 0;
  color: var(--warm-200);
  transition: color 0.2s ease;
}

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

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--warm-300);
  text-align: center;
  font-size: 14px;
}

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

@media (max-width: 1180px) {
  .desktop-nav {
    gap: 12px;
    font-size: 14px;
  }

  .nav-search {
    flex-basis: 250px;
  }

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

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

  .ranking-panel,
  .detail-sidebar {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
  }

  .hero-inner {
    gap: 26px;
  }

  .hero-feature-grid,
  .movie-grid,
  .movie-grid.four-col,
  .category-grid,
  .large-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 640px) {
  .nav-wrap {
    height: 62px;
    padding: 0 16px;
  }

  .brand {
    font-size: 19px;
  }

  .hero-section {
    padding: 44px 16px;
  }

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

  .hero-search {
    flex-direction: column;
    border-radius: 22px;
  }

  .hero-search button {
    width: 100%;
  }

  .hero-feature-grid,
  .movie-grid,
  .movie-grid.four-col,
  .category-grid,
  .large-category-grid {
    grid-template-columns: 1fr;
  }

  .content-section,
  .page-hero,
  .detail-layout {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .heading-line {
    width: 100%;
  }

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

  .movie-row {
    grid-template-columns: 34px 78px minmax(0, 1fr);
  }

  .movie-row .heat {
    display: none;
  }

  .row-cover {
    width: 78px;
    height: 54px;
  }

  .detail-title-row {
    flex-direction: column;
  }
}
