:root {
  --cream-50: #fffaf1;
  --cream-100: #fff4dc;
  --warm-50: #faf8f4;
  --warm-100: #efe8dc;
  --warm-200: #d8ccb9;
  --warm-600: #695b4a;
  --warm-700: #4d4236;
  --warm-800: #332b24;
  --warm-900: #1f1a17;
  --tea-50: #edfdfa;
  --tea-100: #d2f7ef;
  --tea-400: #2dd4bf;
  --tea-500: #14b8a6;
  --tea-600: #0d9488;
  --tea-700: #0f766e;
  --gold: #f6c96b;
  --shadow: 0 18px 50px rgba(31, 26, 23, 0.12);
  --shadow-soft: 0 12px 30px rgba(31, 26, 23, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--warm-900);
  background: linear-gradient(180deg, var(--cream-50), #ffffff 42%, var(--warm-50));
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(216, 204, 185, 0.55);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 30px rgba(31, 26, 23, 0.06);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--tea-500), var(--tea-700));
  box-shadow: 0 10px 24px rgba(13, 148, 136, 0.28);
}

.brand-name {
  min-width: max-content;
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  color: var(--warm-700);
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--tea-700);
}

.header-search,
.mobile-search,
.wide-search {
  position: relative;
}

.header-search-input,
.wide-search input,
.filter-area input,
.filter-area select {
  width: 100%;
  border: 1px solid rgba(216, 204, 185, 0.95);
  border-radius: 999px;
  outline: none;
  background: #ffffff;
  color: var(--warm-800);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search-input {
  width: 240px;
  padding: 12px 16px;
}

.header-search-input:focus,
.wide-search input:focus,
.filter-area input:focus,
.filter-area select:focus {
  border-color: var(--tea-500);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.13);
}

.global-search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, 86vw);
  max-height: 440px;
  overflow: auto;
  display: none;
  padding: 10px;
  border: 1px solid rgba(216, 204, 185, 0.85);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.global-search-panel.active {
  display: block;
}

.search-result {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.search-result:hover {
  background: var(--tea-50);
}

.search-result img {
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}

.search-result strong {
  display: block;
  margin-bottom: 4px;
  color: var(--warm-900);
}

.search-result span {
  color: var(--warm-600);
  font-size: 13px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--warm-50);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--warm-800);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

.hero-carousel {
  position: relative;
  height: min(720px, 72vh);
  min-height: 540px;
  overflow: hidden;
  background: var(--warm-900);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

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

.hero-backdrop,
.rank-hero-mask,
.detail-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.35), transparent 28%),
    linear-gradient(0deg, rgba(10, 10, 10, 0.88), rgba(10, 10, 10, 0.48), rgba(10, 10, 10, 0.20));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 86px;
  color: #ffffff;
}

.eyebrow,
.hero-content .eyebrow,
.rank-hero-content span,
.page-hero span,
.section-heading span,
.channel-title span {
  display: inline-flex;
  align-items: center;
  color: var(--tea-400);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.rank-hero-content h1,
.page-hero h1,
.detail-info h1 {
  max-width: 760px;
  margin: 12px 0 16px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content p,
.rank-hero-content p,
.page-hero p,
.detail-info p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.movie-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags {
  margin: 24px 0 0;
}

.hero-tags span,
.detail-meta span {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--tea-500), var(--tea-700));
  box-shadow: 0 14px 30px rgba(13, 148, 136, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.rank-action:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(12px);
}

.ghost-btn.light {
  color: var(--warm-900);
  border-color: rgba(216, 204, 185, 0.75);
  background: #ffffff;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.32);
  font-size: 38px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 28px;
}

.hero-next {
  right: 28px;
}

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

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

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

.search-band,
.content-section,
.home-channel,
.detail-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.search-band {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: -42px;
  padding: 26px;
  border: 1px solid rgba(216, 204, 185, 0.55);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  position: relative;
  z-index: 10;
}

.search-band span {
  color: var(--tea-700);
  font-weight: 800;
}

.search-band h2 {
  margin: 6px 0 0;
  font-size: clamp(24px, 3vw, 34px);
}

.wide-search input {
  padding: 16px 20px;
}

.content-section,
.home-channel {
  padding: 72px 0;
}

.warm-section,
.cream-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: rgba(239, 232, 220, 0.36);
}

.cream-section {
  background: rgba(255, 244, 220, 0.45);
}

.section-heading {
  margin-bottom: 26px;
}

.section-heading h2,
.channel-title h2,
.detail-article h2,
.detail-sidebar h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.card-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(216, 204, 185, 0.65);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(20, 184, 166, 0.35);
  box-shadow: var(--shadow);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--warm-200), var(--cream-100));
}

.movie-card-small .poster {
  aspect-ratio: 4 / 3;
}

.poster img,
.category-cover::before,
.rank-hero,
.detail-bg {
  background-size: cover;
  background-position: center;
}

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

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

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

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

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--tea-700);
  background: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #dc2626);
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.25);
}

.movie-info {
  padding: 16px;
}

.movie-meta {
  color: var(--warm-600);
  font-size: 13px;
}

.movie-meta span + span::before {
  content: "·";
  margin-right: 8px;
  color: var(--warm-200);
}

.movie-info h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--warm-600);
  font-size: 14px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.channel-title p {
  margin: 8px 0 0;
  color: var(--warm-600);
}

.channel-title > a,
.text-link {
  color: var(--tea-700);
  background: var(--tea-50);
}

.page-hero,
.rank-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: var(--warm-900);
}

.page-hero {
  padding: 92px max(16px, calc((100% - 1180px) / 2));
  background:
    radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.28), transparent 24%),
    linear-gradient(135deg, var(--warm-900), #34251c 60%, var(--tea-700));
}

.slim-hero {
  padding-top: 74px;
  padding-bottom: 74px;
}

.category-hero {
  background:
    radial-gradient(circle at 88% 18%, rgba(246, 201, 107, 0.32), transparent 24%),
    linear-gradient(135deg, #1f1a17, #3a2a21 54%, #0f766e);
}

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

.category-tile {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  padding: 18px;
  border: 1px solid rgba(216, 204, 185, 0.65);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.category-cover {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border-radius: 18px;
  background-image: var(--tile-image);
  background-size: cover;
  background-position: center;
}

.category-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

.category-cover span {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  color: #ffffff;
  font-weight: 900;
}

.category-tile h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-tile p {
  margin: 0 0 14px;
  color: var(--warm-600);
  line-height: 1.7;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.category-samples a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--warm-700);
  background: var(--warm-50);
  font-size: 13px;
}

.filter-area {
  display: grid;
  grid-template-columns: 1fr 170px 170px;
  gap: 14px;
  margin-bottom: 26px;
}

.filter-area input,
.filter-area select {
  min-height: 48px;
  padding: 0 16px;
}

.empty-state {
  display: none;
  padding: 36px;
  border-radius: 18px;
  text-align: center;
  color: var(--warm-600);
  background: var(--warm-50);
}

.empty-state.active {
  display: block;
}

.rank-hero {
  min-height: 460px;
  display: flex;
  align-items: flex-end;
  background-image: var(--rank-image);
  background-size: cover;
  background-position: center;
}

.rank-hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 86px 0;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 62px 150px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(216, 204, 185, 0.65);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-num {
  font-size: 24px;
  font-weight: 900;
  color: var(--tea-700);
}

.rank-poster img {
  height: 94px;
  border-radius: 16px;
  object-fit: cover;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--warm-600);
  line-height: 1.65;
}

.rank-action {
  color: #ffffff;
  background: var(--tea-600);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background: var(--warm-900);
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-image: var(--detail-image);
  filter: blur(12px) saturate(1.15);
  transform: scale(1.08);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
  gap: 32px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

.main-video {
  aspect-ratio: 16 / 9;
  height: auto;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.58));
  cursor: pointer;
}

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

.player-overlay span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--tea-700);
  background: rgba(255, 255, 255, 0.92);
  font-size: 34px;
}

.player-overlay strong {
  font-size: 22px;
}

.detail-info {
  color: #ffffff;
  align-self: center;
}

.detail-info h1 {
  font-size: clamp(36px, 5vw, 58px);
}

.detail-meta {
  margin-top: 22px;
}

.detail-tags {
  margin-top: 18px;
}

.detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 32px;
  padding: 72px 0 0;
}

.detail-article,
.detail-sidebar {
  padding: 28px;
  border: 1px solid rgba(216, 204, 185, 0.65);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.detail-article h2,
.detail-sidebar h2 {
  font-size: 28px;
}

.detail-article p {
  color: var(--warm-700);
  font-size: 17px;
  line-height: 2;
}

.detail-article h2 + p {
  margin-top: 12px;
}

.detail-article p + h2 {
  margin-top: 30px;
}

.sidebar-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.sidebar-list .movie-info p,
.sidebar-list .tag-row {
  display: none;
}

.prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 32px;
}

.prev-next a {
  padding: 14px 16px;
  border-radius: 16px;
  color: var(--warm-700);
  background: var(--warm-50);
}

.site-footer {
  margin-top: 86px;
  color: var(--warm-100);
  background: var(--warm-900);
}

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

.footer-grid p {
  max-width: 620px;
  color: var(--warm-200);
  line-height: 1.8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: var(--warm-200);
}

.footer-grid a:hover {
  color: var(--tea-400);
}

@media (max-width: 1100px) {
  .card-grid.five,
  .card-grid.six {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .detail-sidebar {
    display: none;
  }
}

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

  .header-inner {
    height: 64px;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .mobile-nav.active {
    display: grid;
    gap: 12px;
  }

  .mobile-search .global-search-panel {
    left: 0;
    right: auto;
  }

  .hero-carousel {
    height: 70vh;
    min-height: 520px;
  }

  .hero-content {
    padding-bottom: 74px;
  }

  .hero-arrow {
    display: none;
  }

  .search-band,
  .filter-area,
  .footer-grid,
  .category-grid,
  .category-tile,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .card-grid.four,
  .card-grid.five,
  .card-grid.six {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-row {
    align-items: start;
  }

  .rank-poster img {
    height: 150px;
  }

  .rank-action {
    justify-self: start;
  }

  .prev-next {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand-name {
    font-size: 17px;
  }

  .hero-carousel {
    min-height: 600px;
  }

  .hero-content h1,
  .rank-hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .card-grid.four,
  .card-grid.five,
  .card-grid.six {
    grid-template-columns: 1fr;
  }

  .content-section,
  .home-channel {
    padding: 48px 0;
  }

  .detail-layout {
    padding: 36px 0;
  }
}
