:root {
  color-scheme: light;
  --bg: #f8fbff;
  --bg-soft: #eef7ff;
  --surface: #ffffff;
  --surface-strong: rgba(255, 255, 255, 0.92);
  --text: #172033;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --green: #10b981;
  --purple: #7c3aed;
  --yellow: #f59e0b;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(6, 182, 212, 0.14), transparent 30%),
    linear-gradient(135deg, #f8fafc 0%, #eff6ff 48%, #ecfeff 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.brand-name {
  font-size: 21px;
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  min-height: 42px;
  padding: 0 15px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--blue);
  background: #eff6ff;
}

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

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 14px;
  background: #eff6ff;
  color: var(--blue);
}

.mobile-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 99px;
  background: currentColor;
}

.mobile-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
  border-radius: 18px;
  background: white;
  box-shadow: var(--shadow-soft);
}

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

.site-main {
  min-height: 64vh;
}

.hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.28), transparent 22%),
    linear-gradient(135deg, #2563eb 0%, #06b6d4 48%, #14b8a6 100%);
  color: white;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.05)),
    radial-gradient(circle at 25px 25px, rgba(255, 255, 255, 0.24) 2px, transparent 3px);
  background-size: auto, 56px 56px;
  opacity: 0.9;
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
  padding: 70px 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 18px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #dcfce7;
  font-size: 14px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.hero p,
.page-hero p {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: white;
  color: var(--blue-deep);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}

.btn-ghost {
  color: white;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

.hero-stage {
  position: relative;
}

.hero-slider {
  position: relative;
  min-height: 430px;
  border-radius: 32px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.32);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.04) 0%, rgba(15, 23, 42, 0.78) 100%);
}

.slide-content {
  position: relative;
  z-index: 2;
  padding: 30px;
}

.slide-content h2 {
  margin: 10px 0 10px;
  font-size: 28px;
  line-height: 1.2;
}

.slide-content p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.65;
}

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

.slide-tags span,
.tag-row span,
.detail-tags span,
.info-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 800;
}

.slide-tags span {
  background: rgba(255, 255, 255, 0.18);
  color: white;
  padding: 6px 10px;
}

.slider-dots {
  position: absolute;
  left: 30px;
  bottom: 22px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.slider-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.slider-dots button.active {
  width: 28px;
  background: white;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.hero-stat {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero-stat strong {
  display: block;
  font-size: 26px;
}

.hero-stat span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

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

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

.section-head h2,
.content-panel h2,
.footer-col h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.text-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  color: var(--blue-deep);
  font-weight: 800;
}

.text-link:hover {
  color: var(--cyan);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: var(--shadow);
}

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

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.74));
}

.type-chip,
.rank-badge {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}

.type-chip {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.type-chip.series {
  background: linear-gradient(135deg, var(--green), #22c55e);
}

.type-chip.doc {
  background: linear-gradient(135deg, var(--purple), #a855f7);
}

.type-chip.anime {
  background: linear-gradient(135deg, var(--yellow), #f97316);
}

.rank-badge {
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  background: rgba(15, 23, 42, 0.82);
}

.card-body {
  padding: 18px;
}

.card-meta,
.wide-top,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.card-body h2 {
  margin: 9px 0 8px;
  font-size: 18px;
  line-height: 1.32;
}

.card-body h2 a:hover,
.wide-info h2 a:hover {
  color: var(--blue);
}

.card-body p {
  min-height: 64px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.compact-card .card-body p {
  min-height: 44px;
}

.tag-row span,
.detail-tags span,
.info-pill {
  padding: 5px 9px;
}

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

.category-card {
  display: grid;
  gap: 12px;
  min-height: 164px;
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.category-card strong {
  font-size: 20px;
}

.category-card em {
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

.wide-list {
  display: grid;
  gap: 18px;
}

.wide-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.wide-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.wide-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.wide-info {
  display: grid;
  align-content: center;
  gap: 10px;
}

.wide-info h2 {
  margin: 0;
  font-size: 22px;
}

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

.wide-rank {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 999px;
  padding: 2px 9px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: white;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(6, 182, 212, 0.92)),
    radial-gradient(circle at 75% 20%, rgba(255, 255, 255, 0.24), transparent 26%);
}

.page-hero-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0 64px;
}

.page-hero p {
  max-width: 820px;
}

.filter-panel {
  width: min(1180px, calc(100% - 32px));
  margin: -30px auto 0;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  position: relative;
  z-index: 4;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 24px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.search-box input,
.filter-panel select {
  min-height: 46px;
  width: 100%;
  border: 1px solid rgba(203, 213, 225, 0.95);
  border-radius: 16px;
  background: white;
  color: var(--text);
  outline: none;
}

.search-box input {
  padding: 0 16px;
}

.filter-panel select {
  padding: 0 40px 0 14px;
}

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

.filter-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 12px;
}

.empty-state {
  margin: 28px 0 0;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border-radius: 22px;
  background: white;
  box-shadow: var(--shadow-soft);
}

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

.detail-title {
  display: grid;
  gap: 18px;
  margin-bottom: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

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

.detail-meta {
  gap: 10px;
}

.player-section {
  border-radius: 30px;
  overflow: hidden;
  background: #020617;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.26);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: radial-gradient(circle at 50% 20%, rgba(37, 99, 235, 0.25), transparent 30%), #020617;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.player-start {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 168px;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 999px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 24px 50px rgba(37, 99, 235, 0.32);
  cursor: pointer;
}

.player-box.is-playing .player-start {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  margin-top: 28px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
  box-shadow: var(--shadow-soft);
}

.content-panel {
  padding: 28px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 26px;
  background: white;
  box-shadow: var(--shadow-soft);
}

.content-panel h2 {
  margin: 0 0 16px;
}

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

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

.info-item {
  padding: 14px;
  border-radius: 18px;
  background: #f8fafc;
  color: var(--muted);
}

.info-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}

.site-footer {
  margin-top: 78px;
  color: white;
  background: linear-gradient(135deg, #111827 0%, #1e3a8a 100%);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 36px;
}

.footer-logo {
  color: white;
}

.footer-brand p,
.footer-col a,
.footer-bottom {
  color: rgba(226, 232, 240, 0.82);
}

.footer-brand p {
  max-width: 560px;
  margin: 16px 0 0;
  line-height: 1.8;
}

.footer-col {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-col h2 {
  font-size: 18px;
  margin-bottom: 4px;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  text-align: center;
  border-top: 1px solid rgba(226, 232, 240, 0.16);
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1024px) {
  .hero-inner,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    gap: 26px;
  }

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

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

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

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

  .mobile-toggle {
    display: block;
  }

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

  .site-nav {
    height: 64px;
  }

  .hero,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    padding: 46px 0;
  }

  .hero-slider {
    min-height: 390px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: grid;
  }

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

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

  .wide-card {
    grid-template-columns: 108px 1fr;
    gap: 14px;
  }

  .wide-info h2 {
    font-size: 18px;
  }

  .wide-info p {
    display: none;
  }

  .detail-layout {
    padding-top: 34px;
  }

  .content-panel {
    padding: 22px;
  }
}

@media (max-width: 480px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .player-section {
    border-radius: 22px;
  }
}
