:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 22px 50px rgba(15, 23, 42, 0.18);
  --radius-lg: 18px;
  --radius-md: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-900);
  background: linear-gradient(180deg, var(--amber-50) 0%, var(--white) 36%, var(--gray-50) 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", 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(100% - 32px, var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(16px);
}

.nav-bar {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-900);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-600), var(--amber-800));
  box-shadow: 0 10px 24px rgba(180, 83, 9, 0.25);
}

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

.nav-link {
  color: var(--gray-700);
  font-weight: 650;
  transition: color 0.2s ease;
}

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

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

.header-search input,
.mobile-nav input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  background: var(--white);
  color: var(--gray-800);
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input {
  width: 220px;
  padding: 10px 12px;
}

.header-search input:focus,
.mobile-nav input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.header-search button,
.mobile-nav button,
.btn-primary,
.btn-secondary,
.filter-panel button {
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  font-weight: 750;
}

.header-search button,
.mobile-nav button,
.btn-primary {
  color: var(--white);
  background: var(--amber-700);
  box-shadow: 0 12px 24px rgba(180, 83, 9, 0.22);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.header-search button {
  padding: 10px 16px;
}

.header-search button:hover,
.mobile-nav button:hover,
.btn-primary:hover {
  background: var(--amber-800);
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(180, 83, 9, 0.28);
}

.btn-secondary {
  color: var(--amber-800);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.45);
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  background: var(--white);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  margin-left: auto;
  border: 0;
  border-radius: 12px;
  background: var(--gray-100);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--gray-800);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--gray-200);
  background: var(--white);
}

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

.mobile-nav form {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.mobile-nav input {
  padding: 11px 12px;
}

.mobile-nav button {
  padding: 10px 16px;
}

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

.mobile-nav a {
  padding: 10px 4px;
  color: var(--gray-700);
  font-weight: 650;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  color: var(--white);
  background: var(--gray-900);
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.08));
}

.hero .container {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
}

.hero-content {
  width: min(650px, 100%);
  padding: 82px 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  color: var(--white);
  background: rgba(180, 83, 9, 0.9);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
  backdrop-filter: blur(10px);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 22px 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-actions a {
  padding: 15px 24px;
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: linear-gradient(90deg, rgba(255, 247, 237, 0.96), rgba(254, 243, 199, 0.9));
}

.section.gray {
  background: var(--gray-50);
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--gray-600);
}

.more-link {
  display: inline-flex;
  align-items: center;
  color: var(--amber-700);
  font-weight: 750;
  white-space: nowrap;
}

.more-link:hover {
  color: var(--amber-800);
}

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

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

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

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

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card a:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--gray-100);
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 36%, rgba(0, 0, 0, 0.72));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card a:hover .poster-wrap::after {
  opacity: 1;
}

.rating,
.card-play {
  position: absolute;
  z-index: 2;
}

.rating {
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.62);
  font-size: 13px;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.card-play {
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: rgba(180, 83, 9, 0.92);
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.72);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-info {
  padding: 15px;
}

.movie-info h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s ease;
}

.movie-card a:hover h3 {
  color: var(--amber-700);
}

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

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

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 10px;
  color: var(--gray-300);
}

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

.tag-row span {
  max-width: 100%;
  padding: 4px 8px;
  color: var(--amber-800);
  background: var(--amber-100);
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.category-card {
  min-height: 178px;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--gray-900);
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--gray-600);
}

.page-hero {
  padding: 70px 0 46px;
  background: linear-gradient(135deg, var(--amber-50), var(--white));
}

.page-hero h1 {
  margin: 0 0 14px;
  color: var(--gray-900);
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: var(--gray-600);
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 170px;
  gap: 12px;
  padding: 18px;
  margin-bottom: 26px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.filter-panel input,
.filter-panel select {
  padding: 12px 14px;
}

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

.rank-item a {
  display: grid;
  grid-template-columns: 54px 72px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 100px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.rank-no {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-600), var(--amber-800));
  font-weight: 850;
}

.rank-item img {
  width: 72px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--gray-100);
}

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

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

.rank-body strong {
  font-size: 17px;
}

.rank-body em {
  color: var(--gray-500);
  font-size: 13px;
  font-style: normal;
}

.rank-score {
  color: var(--amber-700);
  font-weight: 850;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.detail-hero {
  padding: 34px 0 62px;
  color: var(--white);
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.28), transparent 32%), linear-gradient(135deg, #111827 0%, #1f2937 56%, #78350f 100%);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.85fr);
  gap: 28px;
  align-items: center;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
  object-fit: cover;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.58));
  cursor: pointer;
  font-weight: 800;
  font-size: 18px;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-shell.is-playing .play-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(180, 83, 9, 0.95);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28);
}

.detail-title h1 {
  margin-top: 0;
}

.detail-title p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.detail-poster {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 22px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.detail-poster img {
  width: 112px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: var(--gray-100);
}

.detail-poster strong {
  display: block;
  font-size: 18px;
}

.detail-poster span {
  color: rgba(255, 255, 255, 0.72);
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 54px 0;
}

.article-box,
.side-box {
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.article-box {
  padding: 30px;
}

.article-box h2,
.side-box h2 {
  margin: 0 0 16px;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.article-box p {
  margin: 0 0 18px;
  color: var(--gray-700);
  font-size: 17px;
}

.side-box {
  padding: 20px;
}

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

.side-list a {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  transition: background 0.2s ease;
}

.side-list a:hover {
  background: var(--amber-50);
}

.side-list img {
  width: 56px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--gray-100);
}

.side-list strong {
  display: block;
  line-height: 1.35;
}

.side-list span {
  display: block;
  color: var(--gray-500);
  font-size: 13px;
}

.site-footer {
  color: var(--gray-300);
  background: var(--gray-900);
}

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

.footer-logo {
  color: var(--white);
  margin-bottom: 14px;
}

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

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

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

.footer-links a {
  color: var(--gray-300);
  transition: color 0.2s ease;
}

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

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--gray-500);
  text-align: center;
}

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

@media (max-width: 1100px) {
  .header-search {
    display: none;
  }

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

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

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

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

  .menu-toggle {
    display: block;
  }

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

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

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

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

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

  .nav-bar {
    height: 64px;
  }

  .logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

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

  .hero-bg::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.88));
  }

  .hero-content {
    align-self: end;
    padding: 80px 0 54px;
  }

  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    font-size: 38px;
  }

  .section {
    padding: 48px 0;
  }

  .section-head {
    display: block;
  }

  .more-link {
    margin-top: 8px;
  }

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

  .movie-info {
    padding: 12px;
  }

  .movie-info h3 {
    font-size: 15px;
  }

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

  .category-cards {
    grid-template-columns: 1fr;
  }

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

  .rank-score {
    display: none;
  }

  .rank-item img {
    width: 58px;
    height: 74px;
  }

  .article-box {
    padding: 22px;
  }
}
