:root {
  --page: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f3f4f6;
  --dark: #111827;
  --dark-2: #1f2937;
  --accent: #d1a76d;
  --accent-2: #f5d7a1;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #f8fafc 0%, #f3f4f6 48%, #fafaf9 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #111827, #374151);
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.18);
  font-size: 13px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-text em {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
  font-style: normal;
  font-weight: 500;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  color: #4b5563;
  white-space: nowrap;
}

.desktop-nav a {
  position: relative;
  font-weight: 650;
  transition: color 0.2s ease;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 2px;
  border-radius: 999px;
  background: var(--dark);
  transition: right 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--ink);
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
  right: 0;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: #f3f4f6;
  border-radius: 12px;
  cursor: pointer;
  padding: 11px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #374151;
  font-weight: 650;
}

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

.mobile-nav.open {
  display: block;
}

main {
  min-height: 60vh;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 15% 15%, rgba(245, 215, 161, 0.22), transparent 30%), linear-gradient(120deg, #0f172a, #111827 55%, #27272a);
}

.hero-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.72fr);
  align-items: center;
  gap: 46px;
  padding: 58px 0 52px;
}

.hero-copy {
  position: relative;
  z-index: 3;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #f7d99f;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 18px 0 18px;
  max-width: 780px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 660px;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin: 28px 0;
}

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

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

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, #fff7ed, #f5d7a1);
  box-shadow: 0 18px 32px rgba(245, 215, 161, 0.22);
}

.btn-dark {
  color: #fff;
  background: #111827;
}

.btn-ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.hero-search {
  display: flex;
  max-width: 560px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  backdrop-filter: blur(18px);
}

.hero-search input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  color: var(--ink);
  background: #fff;
  border-radius: 14px;
  padding: 13px 15px;
  font: inherit;
}

.hero-search input {
  color: #fff;
  border: 0;
  background: transparent;
}

.hero-search input::placeholder {
  color: #cbd5e1;
}

.hero-search button {
  border: 0;
  border-radius: 13px;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
  background: #fff;
  color: #111827;
}

.hero-panel {
  position: relative;
  z-index: 2;
  min-height: 520px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  border-radius: 32px;
  background: #111827;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateX(22px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 350px;
  object-fit: cover;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.02), rgba(17, 24, 39, 0.9));
}

.hero-slide-text {
  position: relative;
  z-index: 2;
  padding: 24px;
}

.hero-slide-text h2 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.2;
}

.hero-slide-text p {
  margin: 0 0 16px;
  color: #d1d5db;
  line-height: 1.7;
}

.hero-dots {
  position: absolute;
  left: 24px;
  bottom: -34px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 28px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.35);
}

.hero-dots button.active {
  background: #f5d7a1;
}

.content-section,
.category-hero,
.page-hero,
.detail-page,
.filter-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.section-heading,
.page-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.section-heading h2,
.page-title-row h1,
.page-hero h1,
.category-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p,
.category-hero p {
  margin: 10px 0 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  flex-shrink: 0;
  color: #111827;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
}

.movie-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 190px;
  gap: 18px;
  overflow-x: auto;
  padding: 2px 2px 18px;
  scrollbar-width: thin;
}

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

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: #e5e7eb;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.12);
}

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

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

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

.poster-link:hover .poster-shade {
  opacity: 1;
}

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #fff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.poster-link strong {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #111827;
  background: #f5d7a1;
  font-size: 12px;
}

.movie-card-body {
  padding: 12px 2px 0;
}

.movie-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.movie-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-line {
  margin: 8px 0 0;
  min-height: 42px;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.65;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #4b5563;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 650;
}

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

.category-tile {
  min-height: 172px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, #f8fafc);
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile h2,
.category-tile h3 {
  margin: 0;
  font-size: 22px;
}

.category-tile p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 78px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
}

.rank-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: #f5d7a1;
  font-weight: 900;
}

.rank-item img {
  width: 78px;
  height: 108px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.page-hero,
.category-hero {
  padding: 62px 0 28px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin: 22px 0 28px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.06);
}

.empty-message {
  display: none;
  padding: 36px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 22px;
  background: #fff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 30px 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #374151;
  font-weight: 700;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #050505;
  box-shadow: 0 34px 70px rgba(0, 0, 0, 0.28);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.74));
}

.play-overlay span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(14px);
  font-size: 30px;
}

.play-overlay strong {
  max-width: 80%;
  font-size: 24px;
  line-height: 1.3;
}

.play-overlay.is-hidden {
  display: none;
}

.detail-card {
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.06);
}

.detail-card h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-card h2,
.side-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-card p {
  color: #374151;
  line-height: 1.95;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 20px;
}

.side-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.06);
}

.side-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  margin-bottom: 16px;
}

.mini-list {
  display: grid;
  gap: 10px;
}

.mini-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  transition: background 0.18s ease;
}

.mini-card:hover {
  background: #f3f4f6;
}

.mini-card img {
  width: 58px;
  height: 78px;
  object-fit: cover;
  border-radius: 12px;
}

.mini-card strong {
  display: block;
  line-height: 1.35;
  margin-bottom: 6px;
}

.mini-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.site-footer {
  margin-top: 72px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937 55%, #0f172a);
}

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

.footer-brand {
  color: #fff;
  font-size: 20px;
}

.footer-main p,
.footer-block li,
.footer-bottom {
  color: #9ca3af;
  line-height: 1.8;
}

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

.footer-block ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

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

  .menu-button {
    display: block;
  }

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

  .hero-panel {
    min-height: 520px;
  }

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

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

@media (max-width: 760px) {
  .hero-inner {
    min-height: auto;
    padding: 40px 0 70px;
  }

  .hero-search,
  .filter-bar {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .hero-search {
    display: grid;
  }

  .hero-search button {
    min-height: 44px;
  }

  .hero-panel {
    min-height: 460px;
  }

  .section-heading,
  .page-title-row {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 14px;
  }

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

  .rank-item {
    grid-template-columns: 42px 66px 1fr;
  }

  .rank-item img {
    width: 66px;
    height: 92px;
  }

  .detail-card,
  .side-panel {
    border-radius: 22px;
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .header-inner,
  .content-section,
  .category-hero,
  .page-hero,
  .detail-page,
  .filter-page,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

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

  .brand-text em {
    display: none;
  }

  .movie-grid,
  .category-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .movie-scroll {
    grid-auto-columns: 165px;
  }
}
