:root {
  --page-bg: #f9fafb;
  --card-bg: #ffffff;
  --text-main: #111827;
  --text-soft: #6b7280;
  --text-light: #ffffff;
  --line: #e5e7eb;
  --orange: #f97316;
  --red: #ef4444;
  --pink: #ec4899;
  --blue: #3b82f6;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.10);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-main);
  background: var(--page-bg);
  line-height: 1.6;
}

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

img,
video {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

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

.header-inner,
.footer-inner,
.section-wrap,
.hero-inner,
.page-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: 68px;
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 10px 20px rgba(249, 115, 22, 0.32);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-2deg);
}

.brand-text {
  font-size: 21px;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ea580c, #dc2626);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  position: relative;
  color: #374151;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--orange), var(--red));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ea580c;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

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

.header-search input,
.mobile-search input,
.search-panel input {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 10px 16px;
  color: #111827;
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 230px;
}

.header-search input:focus,
.mobile-search input:focus,
.search-panel input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.header-search button,
.mobile-search button,
.search-panel button,
.primary-btn,
.secondary-btn,
.player-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--orange), var(--red));
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 12px 22px rgba(249, 115, 22, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-panel button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.player-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(249, 115, 22, 0.32);
}

.secondary-btn {
  color: #ea580c;
  background: #ffffff;
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #111827;
}

.mobile-panel {
  border-top: 1px solid #e5e7eb;
  padding: 16px;
  background: #ffffff;
}

.mobile-panel[hidden] {
  display: none;
}

.mobile-search input {
  flex: 1;
  width: 100%;
}

.mobile-links {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mobile-links a {
  padding: 10px 4px;
  color: #374151;
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(125deg, #f97316 0%, #ef4444 48%, #ec4899 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.26), transparent 32%),
    radial-gradient(circle at 84% 10%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.22));
}

.hero-inner {
  position: relative;
  min-height: 560px;
  padding: 76px 0;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.72fr);
  gap: 44px;
  align-items: center;
}

.hero-slide.is-active {
  display: grid;
}

.hero-copy {
  max-width: 720px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero p {
  margin: 0;
  max-width: 650px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-meta span,
.tag-row span,
.info-pill,
.rank-score {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.hero-visual {
  position: relative;
  min-height: 430px;
  border-radius: 30px;
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.68)),
    var(--hero-image),
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(0, 0, 0, 0.12));
  background-position: center;
  background-size: cover;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.34);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 22px;
  pointer-events: none;
}

.hero-card-info {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  background: rgba(17, 24, 39, 0.58);
  backdrop-filter: blur(12px);
}

.hero-card-info strong {
  display: block;
  margin-bottom: 6px;
  font-size: 24px;
}

.hero-card-info span {
  color: rgba(255, 255, 255, 0.86);
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.hero-dot {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

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

.section-wrap,
.page-wrap {
  padding: 54px 0;
}

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

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

.section-heading p,
.page-title p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--text-soft);
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #ea580c;
  font-weight: 800;
}

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

.category-tile {
  min-height: 156px;
  padding: 22px;
  color: #ffffff;
  border-radius: 22px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-tile.from-blue { background: linear-gradient(135deg, #3b82f6, #06b6d4); }
.category-tile.from-red { background: linear-gradient(135deg, #ef4444, #f97316); }
.category-tile.from-green { background: linear-gradient(135deg, #22c55e, #10b981); }
.category-tile.from-orange { background: linear-gradient(135deg, #f97316, #f59e0b); }
.category-tile.from-purple { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.category-tile.from-slate { background: linear-gradient(135deg, #334155, #0f172a); }
.category-tile.from-yellow { background: linear-gradient(135deg, #f59e0b, #f97316); }
.category-tile.from-pink { background: linear-gradient(135deg, #ec4899, #ef4444); }
.category-tile.from-amber { background: linear-gradient(135deg, #d97706, #b45309); }
.category-tile.from-cyan { background: linear-gradient(135deg, #06b6d4, #2563eb); }

.category-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
}

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

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

.movie-card,
.movie-list-card,
.info-card,
.rank-item,
.detail-panel,
.player-shell,
.search-panel {
  background: var(--card-bg);
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.movie-card {
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-soft);
}

.poster,
.list-poster,
.detail-poster,
.related-poster {
  display: block;
  position: relative;
  background-image:
    linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.62)),
    var(--poster-image),
    linear-gradient(135deg, #fed7aa, #fecdd3);
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.poster {
  min-height: 220px;
}

.poster-badge,
.play-dot {
  position: absolute;
  z-index: 1;
}

.poster-badge {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.64);
  font-size: 12px;
  font-weight: 800;
}

.play-dot {
  display: grid;
  width: 46px;
  height: 46px;
  right: 14px;
  bottom: 14px;
  place-items: center;
  border-radius: 999px;
  color: #ea580c;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.26);
}

.card-body,
.list-content {
  padding: 18px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--text-soft);
  font-size: 13px;
}

.meta-line span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #d1d5db;
}

.movie-card h3,
.movie-list-card h3,
.rank-item h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a,
.movie-list-card h3 a,
.rank-item h3 a {
  transition: color 0.2s ease;
}

.movie-card h3 a:hover,
.movie-list-card h3 a:hover,
.rank-item h3 a:hover {
  color: #ea580c;
}

.movie-card p,
.movie-list-card p,
.rank-item p {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  color: #374151;
  background: #f3f4f6;
}

.feature-strip {
  background: linear-gradient(90deg, #eff6ff, #ecfeff);
}

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

.movie-list-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  overflow: hidden;
}

.list-poster {
  min-height: 160px;
}

.page-title {
  margin-bottom: 30px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--text-soft);
  font-size: 14px;
}

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

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

.info-card {
  padding: 22px;
}

.info-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.info-card p {
  margin: 0;
  color: var(--text-soft);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 70px 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.rank-number {
  color: #ea580c;
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.rank-poster {
  min-height: 92px;
  border-radius: 14px;
}

.rank-score {
  color: #b45309;
  background: #ffedd5;
}

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

.player-shell {
  overflow: hidden;
  background: #020617;
}

.video-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-box video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background-image:
    linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.74)),
    var(--poster-image),
    linear-gradient(135deg, #111827, #f97316);
  background-position: center;
  background-size: cover;
  cursor: pointer;
}

.player-cover.is-hidden {
  display: none;
}

.player-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  padding: 0;
  font-size: 30px;
}

.player-status {
  min-height: 28px;
  padding: 12px 18px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

.detail-panel {
  margin-top: 22px;
  padding: 26px;
}

.detail-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.info-pill {
  color: #9a3412;
  background: #ffedd5;
}

.detail-panel h2,
.sidebar h2 {
  margin: 24px 0 10px;
  font-size: 22px;
}

.detail-panel p {
  color: #374151;
}

.sidebar {
  position: sticky;
  top: 92px;
}

.detail-poster {
  min-height: 420px;
  margin-bottom: 18px;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

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

.related-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.related-card:hover {
  transform: translateX(4px);
  border-color: #fed7aa;
}

.related-poster {
  min-height: 72px;
  border-radius: 12px;
}

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

.related-card span {
  color: var(--text-soft);
  font-size: 13px;
}

.search-panel {
  display: flex;
  gap: 12px;
  padding: 22px;
  margin-bottom: 28px;
}

.search-panel input {
  flex: 1;
}

.search-empty {
  padding: 42px;
  color: var(--text-soft);
  text-align: center;
  background: #ffffff;
  border-radius: 18px;
  border: 1px dashed #d1d5db;
}

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

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 30px;
  padding: 42px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

.site-footer p {
  max-width: 520px;
  margin: 10px 0 0;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
}

.footer-links a:hover {
  color: #fb923c;
}

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

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

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

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

  .sidebar {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-inner {
    min-height: auto;
    padding: 54px 0;
  }

  .hero-slide,
  .hero-slide.is-active {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 360px;
  }

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

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

  .list-poster {
    min-height: 220px;
  }

  .rank-item {
    grid-template-columns: 54px 110px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
    width: fit-content;
  }

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

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

@media (max-width: 560px) {
  .header-inner,
  .footer-inner,
  .section-wrap,
  .hero-inner,
  .page-wrap {
    width: min(100% - 24px, 1180px);
  }

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

  .hero h1 {
    font-size: 38px;
  }

  .hero-actions,
  .search-panel {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn,
  .search-panel button {
    width: 100%;
    text-align: center;
  }

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

  .poster {
    min-height: 260px;
  }

  .rank-item {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .rank-poster {
    display: none;
  }

  .rank-score {
    grid-column: 2;
  }

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