:root {
  --color-bg: #fffaf0;
  --color-card: #ffffff;
  --color-card-soft: #fffbeb;
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --color-line: #f3d6a1;
  --color-primary: #d97706;
  --color-primary-dark: #92400e;
  --color-primary-soft: #fef3c7;
  --color-accent: #f59e0b;
  --shadow-soft: 0 20px 50px rgba(146, 64, 14, 0.12);
  --shadow-card: 0 12px 28px rgba(146, 64, 14, 0.10);
  --radius-xl: 28px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-text);
  background:
    radial-gradient(circle at 10% 0%, rgba(245, 158, 11, 0.14), transparent 34rem),
    linear-gradient(180deg, #fff7ed 0%, #fff 42%, #fffaf0 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,
video {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(255, 251, 235, 0.88);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--color-primary-dark);
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  font-size: 22px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary-dark));
  box-shadow: 0 10px 22px rgba(217, 119, 6, 0.28);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong,
.footer-brand {
  font-size: 22px;
  font-weight: 800;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--color-primary);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link,
.mobile-link {
  color: #4b5563;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--color-primary-dark);
  background: var(--color-primary-soft);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--color-primary-soft);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 9px;
  background: var(--color-primary-dark);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-card);
}

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

.mobile-link {
  display: block;
  padding: 12px 14px;
}

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

.hero {
  position: relative;
  margin: 34px auto 44px;
  min-height: 560px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #111827;
  box-shadow: var(--shadow-soft);
}

.hero-slider {
  position: relative;
  height: 560px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.88), rgba(17, 24, 39, 0.58) 52%, rgba(17, 24, 39, 0.08)),
    linear-gradient(0deg, rgba(17, 24, 39, 0.44), transparent 52%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 56px;
}

.hero-copy {
  max-width: 680px;
  color: #ffffff;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.92);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
}

.hero h1,
.hero h2 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 640px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 18px;
}

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

.hero-meta span,
.detail-meta span,
.card-meta span,
.search-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

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

.hero-actions {
  margin-top: 28px;
}

.btn,
.btn-ghost,
.section-more,
.card-foot a,
.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 0;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.btn,
.search-button,
.card-foot a {
  color: #ffffff;
  background: var(--color-primary);
  box-shadow: 0 12px 22px rgba(217, 119, 6, 0.22);
}

.btn:hover,
.search-button:hover,
.card-foot a:hover {
  transform: translateY(-2px);
  background: var(--color-primary-dark);
}

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

.btn-ghost:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
}

.hero-controls {
  position: absolute;
  left: 56px;
  right: 56px;
  bottom: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 5;
}

.hero-dots {
  display: flex;
  gap: 10px;
}

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

.hero-dot.active {
  width: 58px;
  background: #fbbf24;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 28px;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
}

.section {
  margin: 44px 0;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 3.8vw, 42px);
  line-height: 1.16;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-head p,
.page-title p,
.detail-title p {
  margin: 8px 0 0;
  color: var(--color-muted);
}

.section-more {
  color: var(--color-primary-dark);
  background: var(--color-primary-soft);
}

.section-more:hover {
  transform: translateY(-2px);
  color: #ffffff;
  background: var(--color-primary);
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  padding: 24px;
  border: 1px solid rgba(251, 191, 36, 0.38);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.22), transparent 8rem),
    #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover,
.movie-card:hover,
.rank-panel:hover,
.info-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 38px rgba(146, 64, 14, 0.16);
}

.category-card strong {
  display: block;
  color: var(--color-primary-dark);
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 10px 0 20px;
  color: var(--color-muted);
}

.category-card span {
  color: var(--color-primary);
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 22px;
  background: var(--color-card);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card.compact {
  border-radius: 18px;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #fff7ed);
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(17, 24, 39, 0.64));
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.card-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.92);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(10px);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translateY(0);
}

.rank-mark {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #b45309);
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta span,
.search-meta span,
.detail-meta span {
  color: var(--color-primary-dark);
  background: #fff7ed;
}

.card-body h3 {
  margin: 12px 0 8px;
  color: #111827;
  font-size: 18px;
  line-height: 1.28;
  font-weight: 900;
}

.card-body h3 a:hover,
.rank-title:hover {
  color: var(--color-primary);
}

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

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--color-primary-dark);
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 12px;
  font-weight: 800;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.card-foot span {
  color: #b45309;
  font-weight: 900;
}

.card-foot a {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
}

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

.rank-panel,
.info-panel,
.search-box,
.content-panel {
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-card);
}

.rank-panel,
.info-panel,
.content-panel {
  padding: 22px;
}

.rank-panel {
  position: sticky;
  top: 98px;
}

.rank-panel h2,
.info-panel h2,
.content-panel h2 {
  margin: 0 0 16px;
  color: #111827;
  font-size: 24px;
  font-weight: 900;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  background: #fff7ed;
  transition: background 0.25s ease, transform 0.25s ease;
}

.rank-row:hover {
  background: #fef3c7;
  transform: translateX(3px);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: var(--color-primary);
  font-weight: 900;
}

.rank-title {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: #b45309;
  font-weight: 900;
}

.page-hero {
  margin: 34px 0;
  padding: 46px;
  border: 1px solid rgba(251, 191, 36, 0.36);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 86% 18%, rgba(245, 158, 11, 0.24), transparent 18rem),
    linear-gradient(135deg, #ffffff, #fff7ed);
  box-shadow: var(--shadow-soft);
}

.page-title {
  max-width: 820px;
}

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

.breadcrumb a {
  color: var(--color-primary-dark);
  font-weight: 800;
}

.search-box {
  padding: 20px;
  margin-bottom: 24px;
}

.search-input,
.search-select {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #f3d6a1;
  border-radius: 14px;
  color: var(--color-text);
  background: #ffffff;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-input:focus,
.search-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 160px 120px;
  gap: 12px;
}

.search-results-note {
  margin: 14px 0 0;
  color: var(--color-muted);
  font-weight: 700;
}

.detail-main {
  margin: 34px auto 0;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #111827;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 16 / 9;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  background: #111827;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.25), rgba(17, 24, 39, 0.72));
  cursor: pointer;
}

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

.play-circle {
  display: grid;
  place-items: center;
  width: 94px;
  height: 94px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(217, 119, 6, 0.94);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  font-size: 38px;
  transform: scale(1);
  transition: transform 0.25s ease, background 0.25s ease;
}

.player-overlay:hover .play-circle {
  transform: scale(1.08);
  background: var(--color-primary-dark);
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.78);
}

.player-message.show {
  display: block;
}

.detail-title {
  margin: 22px 0;
}

.detail-title h1 {
  margin-top: 12px;
}

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

.detail-actions {
  margin-top: 20px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 18px;
  background: #fff7ed;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.info-panel p,
.content-panel p {
  color: var(--color-muted);
}

.info-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px dashed #f3d6a1;
}

.info-list dt {
  color: var(--color-muted);
  font-weight: 800;
}

.info-list dd {
  margin: 0;
  color: #111827;
  font-weight: 900;
  text-align: right;
}

.content-panel {
  margin-top: 24px;
}

.content-panel p {
  margin: 0 0 16px;
  font-size: 17px;
}

.content-panel p:last-child {
  margin-bottom: 0;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid rgba(251, 191, 36, 0.38);
  background: rgba(255, 251, 235, 0.74);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.footer-inner p {
  margin: 8px 0 0;
  color: var(--color-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
  max-width: 560px;
}

.footer-links a {
  color: #4b5563;
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--color-primary-dark);
}

.empty-state {
  padding: 28px;
  border-radius: 18px;
  color: var(--color-muted);
  background: #fff7ed;
  text-align: center;
  font-weight: 800;
}

@media (max-width: 1040px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .rank-panel {
    position: static;
  }

  .search-form {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .menu-toggle {
    display: flex;
  }

  .nav-wrap {
    min-height: 68px;
  }

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

  .brand-copy small {
    display: none;
  }

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

  .hero-content {
    align-items: flex-end;
    padding: 28px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.34));
  }

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

  .hero-controls {
    left: 28px;
    right: 28px;
    bottom: 22px;
  }

  .hero-arrow {
    display: none;
  }

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

  .section-head,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .page-hero {
    padding: 28px;
  }

  .search-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  main {
    width: min(100% - 22px, 1180px);
  }

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

  .hero {
    border-radius: 20px;
  }

  .hero h1,
  .hero h2 {
    font-size: 34px;
  }

  .hero-content {
    padding: 22px;
  }

  .player-wrap {
    border-radius: 18px;
  }
}
