:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --bg-card: #1e293b;
  --bg-panel: #0b1220;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #2563eb;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -10%, rgba(34, 211, 238, 0.18), transparent 34rem),
    radial-gradient(circle at 90% 0%, rgba(37, 99, 235, 0.16), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #111827 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 15px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 30px rgba(34, 211, 238, 0.24);
  transition: transform 0.3s ease;
}

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

.brand-mark span {
  width: 22px;
  height: 22px;
  border: 2px solid white;
  border-radius: 5px;
  position: relative;
}

.brand-mark span::before,
.brand-mark span::after {
  content: "";
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: 2px;
  background: white;
}

.brand-mark span::before {
  left: 5px;
}

.brand-mark span::after {
  right: 5px;
}

.brand-copy strong {
  display: block;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-copy em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

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

.nav-link {
  color: #dbeafe;
  font-weight: 700;
  transition: color 0.25s ease;
}

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

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

.header-search input,
.mobile-search input,
.filter-input {
  width: 250px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: white;
  outline: none;
  padding: 10px 16px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.14);
}

.header-search button,
.mobile-search button,
.btn-primary,
.btn-secondary {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: white;
  font-weight: 800;
  background: linear-gradient(90deg, var(--cyan-dark), var(--blue));
  box-shadow: 0 14px 32px rgba(37, 99, 235, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.26);
}

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

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: white;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 16px;
  background: rgba(2, 6, 23, 0.96);
}

.mobile-panel.open {
  display: block;
}

.mobile-nav,
.mobile-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-category-link {
  color: #bae6fd;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(34, 211, 238, 0.12);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.54), rgba(2, 6, 23, 0.18)),
    linear-gradient(180deg, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.82));
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
}

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

.hero-kicker,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 12px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.82);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
  color: #cbd5e1;
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

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

.hero-arrow.prev {
  left: 22px;
}

.hero-arrow.next {
  right: 22px;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dots button.active {
  width: 34px;
  background: white;
}

.page-main,
.home-main {
  padding: 56px 0;
}

.home-main {
  display: grid;
  gap: 64px;
}

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

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

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

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

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

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.86);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow: var(--shadow);
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 46%, rgba(0, 0, 0, 0.72));
}

.poster-pill {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
}

.play-bubble {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  backdrop-filter: blur(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-info {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.movie-info strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 46px;
  color: #f8fafc;
  font-size: 17px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.25s ease;
}

.movie-card:hover strong,
.related-item:hover strong {
  color: var(--cyan);
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  margin-top: auto;
  color: #94a3b8;
  font-size: 13px;
}

.movie-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card-horizontal {
  flex-direction: row;
}

.movie-card-horizontal .poster-wide {
  width: 210px;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
}

.movie-card-horizontal .movie-info strong {
  min-height: auto;
}

.movie-card-large {
  position: relative;
  min-height: 380px;
}

.poster-large {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
}

.overlay-info {
  position: relative;
  z-index: 3;
  justify-content: flex-end;
  min-height: 380px;
  background: linear-gradient(180deg, transparent 34%, rgba(0, 0, 0, 0.92));
}

.overlay-info strong {
  font-size: 24px;
}

.category-strip {
  margin: 0 -10px;
  padding: 34px;
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.16), rgba(15, 23, 42, 0.92));
}

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

.category-box {
  display: flex;
  min-height: 170px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.78);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-box:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.52);
}

.category-box h2,
.category-box h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-box p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.category-box span {
  color: var(--cyan);
  font-weight: 800;
}

.page-hero {
  margin-bottom: 32px;
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 28px;
  padding: clamp(34px, 6vw, 68px);
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.22), transparent 28rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(2, 6, 23, 0.9));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 54px);
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
}

.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.78);
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 8px 14px;
  color: #dbeafe;
  background: rgba(30, 41, 59, 0.9);
}

.filter-chip.active,
.filter-chip:hover {
  color: white;
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(8, 145, 178, 0.76);
}

.empty-state {
  display: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
  text-align: center;
}

.empty-state.show {
  display: block;
}

.detail-main {
  padding: 34px 0 60px;
}

.breadcrumb {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 22px;
  color: #bae6fd;
  font-weight: 700;
}

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

.detail-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.86);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.detail-card {
  padding: 24px;
}

.player-card {
  margin-bottom: 22px;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  border: 0;
  place-items: center;
  color: white;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.12), rgba(2, 6, 23, 0.72));
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.player-button {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.92), rgba(37, 99, 235, 0.92));
  box-shadow: 0 18px 48px rgba(34, 211, 238, 0.28);
  font-size: 30px;
  transform: translateZ(0);
}

.detail-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  color: #cbd5e1;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.detail-tags span {
  border-radius: 999px;
  padding: 6px 10px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.9);
}

.article-block {
  margin-top: 20px;
}

.article-block h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.article-block p {
  margin: 0 0 14px;
  color: #d1d5db;
}

.side-card {
  position: sticky;
  top: 98px;
  padding: 18px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.related-item {
  display: flex;
  min-width: 0;
  gap: 12px;
}

.related-cover {
  width: 118px;
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #020617;
}

.related-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.related-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.related-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.related-copy em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.more-section {
  margin-top: 38px;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
  padding: 44px 0;
}

.footer-brand {
  margin-bottom: 10px;
  font-size: 24px;
  font-weight: 900;
  color: var(--cyan);
}

.site-footer p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

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

.footer-links a {
  color: #cbd5e1;
}

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

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px;
  color: #64748b;
  text-align: center;
}

.card-hidden {
  display: none !important;
}

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

  .desktop-nav {
    gap: 14px;
  }

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

@media (max-width: 900px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    height: 540px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .side-card {
    position: static;
  }

  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-input {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

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

  .brand-copy em {
    display: none;
  }

  .hero {
    height: 500px;
  }

  .hero-copy {
    padding-right: 0;
  }

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

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

  .page-main,
  .home-main {
    padding: 34px 0;
  }

  .section-head,
  .page-head,
  .detail-title {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .movie-card-horizontal {
    flex-direction: column;
  }

  .movie-card-horizontal .poster-wide {
    width: 100%;
    aspect-ratio: 3 / 4;
  }

  .movie-info {
    padding: 13px;
  }

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

  .movie-desc {
    font-size: 13px;
  }

  .category-strip {
    margin: 0;
    padding: 20px;
  }

  .page-hero {
    border-radius: 22px;
    padding: 30px 22px;
  }

  .detail-card {
    padding: 18px;
  }

  .player-button {
    width: 68px;
    height: 68px;
    font-size: 24px;
  }
}
