:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --dark: #111827;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --green: #16a34a;
  --orange: #ea580c;
  --purple: #7e22ce;
  --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.10), 0 4px 6px -4px rgb(0 0 0 / 0.10);
  --shadow-strong: 0 25px 50px -12px rgb(0 0 0 / 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

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;
  background: rgb(255 255 255 / 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  backdrop-filter: blur(14px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #1f2937;
  font-size: 22px;
  font-weight: 800;
  transition: color 0.2s ease;
}

.brand:hover {
  color: var(--blue);
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: var(--blue);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  color: #374151;
  font-weight: 600;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--blue);
}

.menu-button {
  display: none;
  border: 0;
  color: #374151;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #000000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 2;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.94), rgb(0 0 0 / 0.52), rgb(0 0 0 / 0.10));
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  max-width: 960px;
  padding: 56px clamp(24px, 6vw, 96px);
  color: #ffffff;
}

.hero-tags,
.poster-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.poster-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgb(255 255 255 / 0.20);
  backdrop-filter: blur(4px);
  font-size: 13px;
  font-weight: 600;
}

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

.hero p {
  max-width: 760px;
  margin: 0 0 26px;
  color: rgb(255 255 255 / 0.90);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
}

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

.button-primary,
.button-secondary,
.button-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.button-primary {
  color: #ffffff;
  background: var(--blue);
  box-shadow: var(--shadow);
}

.button-primary:hover,
.button-light:hover {
  transform: translateY(-2px);
  background: #1d4ed8;
  box-shadow: var(--shadow-strong);
}

.button-secondary {
  color: #ffffff;
  border-color: rgb(255 255 255 / 0.35);
  background: rgb(255 255 255 / 0.14);
  backdrop-filter: blur(8px);
}

.button-secondary:hover {
  background: rgb(0 0 0 / 0.70);
}

.button-light {
  color: var(--blue);
  background: #ffffff;
  border-color: var(--line);
}

.hero-controls {
  position: absolute;
  right: clamp(20px, 5vw, 64px);
  bottom: 42px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgb(255 255 255 / 0.45);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.page.narrow {
  max-width: 960px;
}

.section {
  margin-top: 58px;
}

.section:first-child {
  margin-top: 0;
}

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title .mark {
  font-size: 28px;
}

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

.section-lead,
.page-title p,
.detail-title p {
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card,
.category-tile,
.info-panel,
.rank-card,
.search-panel,
.player-card,
.detail-panel {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.category-tile:hover,
.horizontal-card:hover,
.rank-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #111827;
}

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

.movie-card:hover .poster-wrap img,
.horizontal-card:hover img {
  transform: scale(1.07);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(0 0 0 / 0.78), rgb(0 0 0 / 0.18), transparent);
}

.poster-tags {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
}

.poster-tags span,
.tag-row span {
  padding: 4px 10px;
  font-size: 12px;
}

.movie-card-body {
  flex: 1;
  padding: 18px;
}

.movie-card-body h3,
.horizontal-card h3,
.rank-card h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
}

.movie-card-body p,
.horizontal-card p,
.rank-card p {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.65;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: #6b7280;
  font-size: 13px;
}

.movie-meta span {
  padding: 4px 9px;
  border-radius: 999px;
  background: #f3f4f6;
}

.category-tile {
  position: relative;
  display: block;
  padding: 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.75;
}

.category-badge {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 8px 12px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 999px;
  font-weight: 800;
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.horizontal-card img {
  width: 150px;
  height: 98px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.7s ease;
}

.horizontal-card span {
  display: inline-flex;
  margin-top: 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
  gap: 28px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 54px 124px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: var(--blue);
  border-radius: 999px;
  font-weight: 900;
}

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

.search-panel {
  margin-bottom: 30px;
  padding: 22px;
}

.search-form {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(120px, 0.6fr));
  gap: 14px;
}

.search-form input,
.search-form select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: #111827;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.search-form select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgb(37 99 235 / 0.12);
}

.empty-state {
  display: none;
  padding: 26px;
  color: #6b7280;
  text-align: center;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: #6b7280;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--blue);
  font-weight: 700;
}

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

.player-card {
  background: #05070c;
  border-color: #111827;
}

.video-box {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000000;
  border-radius: 18px 18px 0 0;
}

.video-box video {
  width: 100%;
  height: 100%;
  background: #000000;
  cursor: pointer;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #ffffff;
  background: linear-gradient(to top, rgb(0 0 0 / 0.62), rgb(0 0 0 / 0.18));
  border: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 6px;
  color: var(--blue);
  background: #ffffff;
  border-radius: 999px;
  box-shadow: var(--shadow-strong);
  font-size: 34px;
}

.player-meta {
  padding: 18px 22px 22px;
  color: #ffffff;
}

.player-meta h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.player-meta p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.75;
}

.detail-panel {
  padding: 24px;
}

.detail-panel h2,
.detail-panel h3 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
}

.detail-panel p {
  margin: 0 0 18px;
  color: #374151;
  line-height: 1.9;
}

.detail-facts {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.detail-facts div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.detail-facts strong {
  color: #111827;
}

.detail-facts span {
  color: #4b5563;
  text-align: right;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px 36px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-logo {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.footer-inner p {
  max-width: 380px;
  margin: 0;
  color: #9ca3af;
  line-height: 1.75;
}

.footer-inner h3 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
}

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

.footer-links a,
.footer-bottom button {
  color: #9ca3af;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-bottom button:hover {
  color: #60a5fa;
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #1f2937;
  color: #6b7280;
  font-size: 14px;
}

.footer-bottom button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

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

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

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

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
    padding: 0 16px;
  }

  .brand {
    font-size: 19px;
  }

  .brand-icon {
    width: 34px;
    height: 34px;
  }

  .menu-button {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 20px 18px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    width: 100%;
    padding: 12px 0;
  }

  .hero {
    height: 72vh;
    min-height: 560px;
  }

  .hero-content {
    padding: 32px 20px 74px;
  }

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

  .page {
    padding: 36px 16px 58px;
  }

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

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

  .rank-card {
    grid-template-columns: 42px 92px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-card img {
    width: 92px;
    height: 68px;
  }

  .horizontal-card {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .horizontal-card img {
    width: 112px;
    height: 82px;
  }

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

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