:root {
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --stone-950: #1c1917;
  --stone-900: #292524;
  --stone-800: #44403c;
  --stone-700: #57534e;
  --stone-600: #78716c;
  --stone-500: #a8a29e;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --amber-50: #fffbeb;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(41, 37, 36, 0.12);
  --shadow-soft: 0 10px 28px rgba(41, 37, 36, 0.10);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--stone-800);
  background: linear-gradient(180deg, #fffbeb 0%, #fafaf9 40%, #ffffff 100%);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #fffbeb 0%, #fafaf9 50%, #fffbeb 100%);
  box-shadow: 0 3px 18px rgba(41, 37, 36, 0.10);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber-dark), var(--stone-700));
  box-shadow: 0 9px 20px rgba(217, 119, 6, 0.30);
}

.brand-text strong,
.footer-brand strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
  color: var(--stone-800);
}

.brand-text small,
.footer-brand small {
  display: block;
  font-size: 12px;
  color: var(--stone-600);
  margin-top: 2px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--stone-700);
  font-weight: 600;
}

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

.desktop-nav a:hover,
.mobile-panel a:hover,
.footer-links a:hover {
  color: var(--amber-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.menu-toggle,
.search-close {
  border: 0;
  background: transparent;
  color: var(--stone-600);
  border-radius: 12px;
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.icon-button:hover,
.menu-toggle:hover,
.search-close:hover {
  background: #fef3c7;
  color: var(--amber-dark);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--stone-200);
  background: rgba(255, 255, 255, 0.96);
}

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

.mobile-panel .container {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  padding-bottom: 16px;
}

.mobile-panel a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--stone-700);
  font-weight: 600;
}

.search-panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  background: rgba(28, 25, 23, 0.62);
  backdrop-filter: blur(6px);
  padding: 80px 18px 20px;
}

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

.search-box {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.search-head {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--stone-200);
  padding: 16px;
}

.search-head input {
  width: 100%;
  border: 0;
  outline: none;
  font-size: 18px;
  color: var(--stone-800);
}

.search-results {
  max-height: min(620px, calc(100vh - 180px));
  overflow: auto;
  padding: 10px;
}

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

.search-result-item:hover {
  background: #fffbeb;
}

.search-result-item img {
  width: 56px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(135deg, #92400e, #1c1917);
}

.search-result-title {
  font-weight: 800;
  color: var(--stone-800);
  margin-bottom: 4px;
}

.search-result-meta,
.search-empty {
  color: var(--stone-500);
  font-size: 14px;
}

.hero {
  position: relative;
  height: 430px;
  overflow: hidden;
  background: var(--stone-900);
}

.hero-bg,
.hero-bg img,
.hero-bg::after {
  position: absolute;
  inset: 0;
}

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

.hero-bg::after {
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.55) 48%, rgba(0, 0, 0, 0.15) 100%);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 46px;
}

.hero-panel {
  max-width: 680px;
}

.badge-row,
.card-meta,
.detail-meta,
.tag-list,
.local-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.badge,
.meta-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  padding: 8px 12px;
}

.badge-amber {
  background: var(--amber);
  color: #fff;
  font-weight: 700;
}

.badge-dark {
  background: rgba(41, 37, 36, 0.82);
  color: #fff;
}

.hero h1 {
  margin: 14px 0 12px;
  color: #fff;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 24px;
  color: #e7e5e4;
  font-size: 18px;
  line-height: 1.8;
  max-width: 640px;
}

.hero-actions,
.section-head,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(41, 37, 36, 0.18);
}

.btn-primary {
  color: #fff;
  background: var(--amber);
}

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

.btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
}

.btn-light {
  color: var(--amber-dark);
  background: #fff;
}

.main-section {
  padding: 48px 0;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title {
  margin: 0;
  color: var(--stone-800);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-desc {
  color: var(--stone-600);
  line-height: 1.8;
  max-width: 760px;
  margin: 8px 0 0;
}

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

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #92400e, #1c1917);
  box-shadow: var(--shadow-soft);
}

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

.movie-card:hover img,
.related-card:hover img,
.hero-card:hover img {
  transform: scale(1.08);
}

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 9px;
  border-radius: 9px;
  background: var(--amber);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.poster-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 42px 12px 12px;
  color: #fff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.poster-overlay p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card h3,
.related-card h3,
.hero-card h3 {
  margin: 10px 0 5px;
  color: var(--stone-800);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.movie-card:hover h3,
.related-card:hover h3,
.hero-card:hover h3 {
  color: var(--amber-dark);
}

.card-meta {
  justify-content: space-between;
  color: var(--stone-500);
  font-size: 12px;
}

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

.channel-card {
  display: block;
  padding: 24px;
  border-radius: 22px;
  color: var(--stone-800);
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.channel-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 900;
}

.channel-card p {
  margin: 0;
  color: var(--stone-600);
  line-height: 1.7;
}

.feature-strip {
  margin-top: -46px;
  position: relative;
  z-index: 3;
}

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

.hero-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-card .poster-wrap {
  border-radius: 14px;
}

.hero-card p {
  margin: 0;
  color: var(--stone-600);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero {
  padding: 74px 0;
  color: #fff;
  background: linear-gradient(120deg, var(--amber-dark), var(--stone-800));
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 900;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #fef3c7;
  line-height: 1.8;
  font-size: 18px;
}

.local-filter-card {
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.local-filter-bar {
  gap: 12px;
}

.local-filter-bar input {
  min-width: min(100%, 320px);
  flex: 1;
  height: 44px;
  border: 1px solid var(--stone-200);
  border-radius: 12px;
  padding: 0 14px;
  outline: none;
}

.filter-chip {
  height: 38px;
  border: 1px solid var(--stone-200);
  border-radius: 999px;
  padding: 0 14px;
  background: #fff;
  color: var(--stone-700);
  cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #fff;
  background: var(--amber);
  border-color: var(--amber);
}

.detail-shell {
  padding: 34px 0 56px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--stone-600);
  margin-bottom: 18px;
}

.breadcrumb a:hover {
  color: var(--amber-dark);
}

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

.content-card,
.side-card {
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.content-card {
  padding: clamp(22px, 3vw, 34px);
  margin-top: 22px;
}

.content-card h1 {
  margin: 14px 0 14px;
  color: var(--stone-800);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 18px;
  color: var(--stone-800);
  font-size: 24px;
  font-weight: 900;
}

.lead {
  color: var(--amber-dark);
  font-size: 19px;
  line-height: 1.75;
  font-weight: 700;
  margin: 0 0 22px;
}

.detail-meta {
  margin: 18px 0 24px;
}

.meta-pill,
.tag-pill {
  background: var(--stone-100);
  color: var(--stone-700);
}

.tag-pill {
  background: #fef3c7;
  color: #92400e;
}

.prose-text {
  color: var(--stone-700);
  line-height: 1.95;
  font-size: 16px;
}

.prose-text p {
  margin: 0 0 18px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.10));
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.22s ease;
}

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

.player-button {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 30px;
  background: var(--amber);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
  padding-left: 4px;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #92400e, #1c1917);
}

.side-card {
  padding: 18px;
  margin-bottom: 22px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--stone-200);
  color: var(--stone-600);
}

.info-list strong {
  color: var(--stone-800);
}

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

.related-card {
  display: block;
}

.related-card .poster-wrap {
  border-radius: 14px;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-row a {
  display: grid;
  grid-template-columns: 64px 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-num {
  color: var(--amber-dark);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #92400e, #1c1917);
}

.rank-title {
  font-size: 18px;
  font-weight: 900;
  color: var(--stone-800);
  margin-bottom: 6px;
}

.rank-desc {
  color: var(--stone-600);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-meta {
  color: var(--stone-500);
  white-space: nowrap;
}

.static-page {
  max-width: 900px;
  margin: 0 auto;
}

.static-page .content-card {
  margin: -28px 0 56px;
}

.site-footer {
  background: linear-gradient(135deg, #1c1917 0%, #292524 56%, #78350f 100%);
  color: var(--stone-200);
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 28px;
}

.footer-brand strong {
  color: #fff;
}

.footer-brand small,
.footer-text,
.footer-links a,
.footer-bottom {
  color: var(--stone-500);
}

.footer-text {
  line-height: 1.8;
}

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

.footer-title {
  color: #fff;
  font-weight: 800;
  margin-bottom: 14px;
}

.footer-bottom {
  border-top: 1px solid rgba(231, 229, 228, 0.16);
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
}

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

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

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

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

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

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

  .brand-text strong {
    font-size: 18px;
  }

  .hero {
    height: 520px;
  }

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

  .feature-strip {
    margin-top: -56px;
  }

  .feature-card-grid,
  .channel-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-row a {
    grid-template-columns: 46px 58px 1fr;
  }

  .rank-row img {
    width: 58px;
    height: 78px;
  }

  .rank-meta {
    display: none;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}
