:root {
  --bg: #f8fafc;
  --text: #1f2937;
  --muted: #64748b;
  --panel: #ffffff;
  --line: #e2e8f0;
  --dark: #0f172a;
  --dark-2: #111827;
  --accent: #f97316;
  --accent-2: #dc2626;
  --purple: #7c3aed;
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 46%, #fff7ed 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.32);
}

.navbar {
  max-width: 1280px;
  min-height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand-icon,
.footer-brand span {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.35);
}

.brand-text {
  display: grid;
  line-height: 1.15;
}

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

.brand-text small {
  color: #94a3b8;
  font-size: 12px;
  margin-top: 4px;
}

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

.nav-links a {
  color: #cbd5e1;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fb923c;
}

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

.nav-search input,
.footer-search input,
.local-filter input,
.search-hero input,
.local-filter select {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  padding: 11px 14px;
}

.nav-search input {
  width: 230px;
  background: rgba(30, 41, 59, 0.98);
  color: #fff;
}

.nav-search input::placeholder {
  color: #94a3b8;
}

.nav-search button,
.footer-search button,
.search-hero button,
.btn,
.play-overlay button {
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 800;
  padding: 11px 18px;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(249, 115, 22, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-search button:hover,
.footer-search button:hover,
.search-hero button:hover,
.btn:hover,
.play-overlay button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.36);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #fff;
  font-size: 26px;
  background: transparent;
}

.main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 64px;
}

.hero {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  background: radial-gradient(circle at 20% 18%, rgba(249, 115, 22, 0.32), transparent 28%), linear-gradient(135deg, #0f172a 0%, #111827 48%, #450a0a 100%);
  color: #fff;
  border-radius: 0 0 34px 34px;
  box-shadow: var(--shadow);
}

.hero-track {
  position: relative;
  min-height: 610px;
}

.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::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.68) 48%, rgba(15, 23, 42, 0.1));
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transform: scale(1.05);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 610px;
  margin: 0 auto;
  padding: 72px 24px 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 46px;
  align-items: center;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.16);
  border: 1px solid rgba(251, 146, 60, 0.35);
  color: #fed7aa;
  padding: 8px 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.9;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 28px;
}

.pill,
.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #475569;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
}

.hero-meta span {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

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

.hero-poster {
  position: relative;
  padding: 12px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.hero-poster img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: 22px;
}

.hero-poster .floating-card {
  position: absolute;
  left: -28px;
  bottom: 32px;
  width: 220px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dot.active {
  width: 34px;
  background: #fb923c;
}

.section {
  margin-top: 38px;
}

.section-panel {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.section-panel.dark {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  border: 0;
}

.section-panel.purple {
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  border: 0;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
}

.section-panel.dark .section-head h2,
.section-panel.purple .section-head h2 {
  color: #fff;
}

.section-head p,
.page-title p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-panel.dark .section-head p,
.section-panel.purple .section-head p {
  color: rgba(255, 255, 255, 0.78);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.92);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
  aspect-ratio: 2 / 3;
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.95);
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  padding: 6px 10px;
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  transform: scale(0.9);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: scale(1);
}

.movie-card-body {
  padding: 16px;
}

.movie-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a {
  color: #111827;
  text-decoration: none;
}

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

.movie-meta,
.movie-line {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.movie-line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.card-tags .pill {
  padding: 5px 9px;
  font-size: 12px;
}

.movie-card.large {
  display: grid;
  grid-template-columns: 185px 1fr;
  min-height: 278px;
}

.movie-card.large .poster-wrap {
  aspect-ratio: auto;
  height: 100%;
}

.movie-card.large .movie-card-body {
  padding: 22px;
}

.movie-card.large h3 {
  font-size: 22px;
}

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

.category-card {
  display: block;
  min-height: 170px;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, #0f172a, #334155);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.category-card:nth-child(4n + 2) {
  background: linear-gradient(135deg, #ea580c, #dc2626);
}

.category-card:nth-child(4n + 3) {
  background: linear-gradient(135deg, #7c3aed, #db2777);
}

.category-card:nth-child(4n + 4) {
  background: linear-gradient(135deg, #2563eb, #14b8a6);
}

.category-card:hover {
  transform: translateY(-5px);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.page-title {
  margin: 0 0 28px;
  padding: 34px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow);
}

.local-filter {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
}

.local-filter input,
.local-filter select {
  width: 100%;
}

.breadcrumb {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 800;
}

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

.detail-main,
.detail-side {
  display: grid;
  gap: 24px;
}

.player-card,
.detail-info,
.side-card {
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.78));
  cursor: pointer;
  z-index: 2;
}

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

.play-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
}

.play-overlay button {
  position: relative;
  z-index: 3;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  padding: 0;
  font-size: 34px;
}

.player-caption {
  padding: 18px 22px;
}

.player-caption h1,
.detail-title h1 {
  margin: 0 0 10px;
  color: #111827;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

.player-caption p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.detail-info {
  padding: 26px;
}

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

.detail-info h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  color: #111827;
}

.detail-info p {
  color: #334155;
  line-height: 1.95;
  margin: 0 0 16px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

.side-card {
  padding: 22px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.side-item img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
  background: #0f172a;
}

.side-item strong {
  display: block;
  color: #111827;
  line-height: 1.35;
}

.side-item span {
  color: var(--muted);
  font-size: 13px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 96px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
}

.rank-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #f97316, #dc2626);
  color: #fff;
  font-weight: 900;
}

.rank-item img {
  width: 96px;
  height: 126px;
  object-fit: cover;
  border-radius: 16px;
  background: #0f172a;
}

.rank-item h2,
.rank-item h3 {
  margin: 0 0 8px;
  color: #111827;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.search-hero {
  display: grid;
  gap: 18px;
  padding: 36px;
  border-radius: 30px;
  color: #fff;
  background: radial-gradient(circle at 20% 10%, rgba(249, 115, 22, 0.38), transparent 32%), linear-gradient(135deg, #0f172a, #7f1d1d);
  box-shadow: var(--shadow);
}

.search-hero form {
  display: flex;
  gap: 12px;
}

.search-hero input {
  flex: 1;
  min-width: 0;
}

.search-results {
  margin-top: 28px;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
  margin-top: 30px;
}

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

.footer-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: #fff;
  font-size: 20px;
  margin-bottom: 14px;
}

.site-footer p {
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #fff;
}

.site-footer a {
  display: block;
  color: #cbd5e1;
  text-decoration: none;
  margin: 8px 0;
}

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

.footer-search {
  display: flex;
  gap: 8px;
}

.footer-search input {
  min-width: 0;
  flex: 1;
}

.copyright {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: #64748b;
  text-align: center;
}

.empty-state {
  padding: 48px;
  border-radius: 24px;
  background: #fff;
  text-align: center;
  color: var(--muted);
}

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

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

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

  .hero-poster {
    max-width: 420px;
  }

  .detail-side {
    grid-template-columns: 280px 1fr;
  }
}

@media (max-width: 860px) {
  .navbar {
    flex-wrap: wrap;
    padding: 12px 18px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links,
  .nav-search {
    display: none;
    width: 100%;
  }

  .site-header.open .nav-links,
  .site-header.open .nav-search {
    display: flex;
  }

  .site-header.open .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    order: 3;
  }

  .site-header.open .nav-search {
    order: 4;
  }

  .nav-search input {
    flex: 1;
    width: auto;
  }

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

  .movie-card.large {
    display: block;
  }

  .movie-card.large .poster-wrap {
    aspect-ratio: 2 / 3;
  }

  .hero,
  .hero-track,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    padding-top: 54px;
    gap: 26px;
  }

  .hero-poster img {
    height: 360px;
  }

  .hero-poster .floating-card {
    left: 14px;
    bottom: 18px;
  }

  .section-head {
    display: block;
  }

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

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

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

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

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

@media (max-width: 560px) {
  .brand-text small {
    display: none;
  }

  .main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-content {
    padding-left: 14px;
    padding-right: 14px;
  }

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

  .section-panel,
  .page-title,
  .detail-info,
  .side-card {
    padding: 20px;
    border-radius: 22px;
  }

  .search-hero form,
  .footer-search {
    flex-direction: column;
  }
}
