* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #020617;
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.28);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: #ffffff;
  font-size: 16px;
  box-shadow: 0 18px 35px rgba(6, 182, 212, 0.22);
  transition: transform 0.2s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.06);
}

.brand-text strong {
  display: block;
  color: #f8fafc;
  font-size: 20px;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.brand-text em {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  color: #cbd5e1;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-current {
  color: #22d3ee;
}

.nav-dropdown {
  position: relative;
  padding: 22px 0;
}

.dropdown-panel {
  position: absolute;
  top: 58px;
  left: -14px;
  width: 190px;
  padding: 8px;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 14px;
}

.dropdown-panel a:hover {
  background: rgba(51, 65, 85, 0.75);
  color: #22d3ee;
}

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

.nav-search input,
.mobile-panel input,
.big-search input {
  width: 100%;
  border: 1px solid #334155;
  border-radius: 12px;
  background: #0f172a;
  color: #f8fafc;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
  padding: 10px 12px;
}

.nav-search input:focus,
.mobile-panel input:focus,
.big-search input:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.1);
}

.nav-search button,
.mobile-panel button,
.big-search button {
  border: 0;
  border-radius: 12px;
  background: #06b6d4;
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease;
}

.nav-search button {
  padding: 10px 13px;
}

.nav-search button:hover,
.mobile-panel button:hover,
.big-search button:hover {
  background: #0891b2;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 24px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(51, 65, 85, 0.65);
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
}

.mobile-panel a {
  padding: 10px 0;
  color: #cbd5e1;
}

.mobile-panel form {
  display: flex;
  gap: 10px;
}

.mobile-panel input {
  padding: 11px 12px;
}

.mobile-panel button {
  padding: 11px 14px;
}

.hero {
  position: relative;
  height: min(80vh, 760px);
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at 30% 20%, rgba(34, 211, 238, 0.24), transparent 35%), linear-gradient(135deg, #0f172a, #1e293b);
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.82) 42%, rgba(2, 6, 23, 0.25) 100%), linear-gradient(0deg, #020617 0%, transparent 52%, rgba(2, 6, 23, 0.42) 100%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100% - 1180px) / 2));
  width: min(680px, calc(100% - 48px));
  transform: translateY(-50%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 14px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.18);
  color: #67e8f9;
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero h1,
.hero h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #f8fafc;
  letter-spacing: -0.04em;
}

.hero h1,
.hero h2 {
  max-width: 700px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.95;
}

.hero p {
  max-width: 650px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

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

.btn.primary {
  background: #06b6d4;
  color: #ffffff;
  box-shadow: 0 18px 35px rgba(6, 182, 212, 0.22);
}

.btn.ghost {
  border: 1px solid rgba(148, 163, 184, 0.42);
  background: rgba(15, 23, 42, 0.48);
  color: #e2e8f0;
  backdrop-filter: blur(12px);
}

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

.btn.primary:hover {
  background: #0891b2;
  box-shadow: 0 22px 44px rgba(6, 182, 212, 0.3);
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span,
.detail-tags span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.8);
  color: #cbd5e1;
  font-size: 13px;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(226, 232, 240, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #ffffff;
  cursor: pointer;
  font-size: 34px;
  line-height: 38px;
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(8, 145, 178, 0.72);
}

.hero-control.prev {
  right: 88px;
}

.hero-control.next {
  right: 32px;
}

.hero-dots {
  position: absolute;
  right: 34px;
  bottom: 34px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 18px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: #64748b;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 42px;
  background: #22d3ee;
}

.section {
  padding: 72px max(20px, calc((100% - 1180px) / 2));
  background: linear-gradient(180deg, #020617 0%, #0f172a 100%);
}

.section:nth-of-type(even) {
  background: #0f172a;
}

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

.section-head h2 {
  margin: 0;
  color: #f8fafc;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.03em;
}

.section-head p {
  max-width: 520px;
  margin: 0;
  color: #94a3b8;
  line-height: 1.7;
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.78);
  border-radius: 18px;
  background: #1e293b;
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.22);
  transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.88);
  transform: translateY(-4px);
  box-shadow: 0 24px 55px rgba(6, 182, 212, 0.14);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: radial-gradient(circle at 18% 20%, rgba(34, 211, 238, 0.24), transparent 38%), linear-gradient(135deg, #0f172a, #334155);
}

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

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

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

.badge {
  position: absolute;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 9px;
  background: rgba(2, 6, 23, 0.72);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.top-left {
  top: 10px;
  left: 10px;
}

.top-right {
  top: 10px;
  right: 10px;
  color: #fde68a;
}

.bottom-right {
  right: 10px;
  bottom: 10px;
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.card-body strong {
  color: #f8fafc;
  font-size: 17px;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body strong {
  color: #22d3ee;
}

.card-body em {
  min-height: 44px;
  color: #94a3b8;
  font-size: 13px;
  font-style: normal;
  line-height: 1.6;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-meta span,
.detail-meta span {
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
  font-size: 12px;
}

.rail-box {
  position: relative;
}

.movie-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.movie-rail::-webkit-scrollbar {
  display: none;
}

.rail-card {
  flex: 0 0 300px;
}

.rail-arrow {
  position: absolute;
  top: 40%;
  z-index: 5;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff;
  cursor: pointer;
  font-size: 34px;
  line-height: 34px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.rail-box:hover .rail-arrow {
  opacity: 1;
}

.rail-left {
  left: -16px;
}

.rail-right {
  right: -16px;
}

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

.category-card {
  min-height: 150px;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 22px;
  border-radius: 20px;
  color: #ffffff;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.24);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.32), transparent 28%);
}

.category-card span,
.category-card strong,
.category-card em {
  position: relative;
  z-index: 2;
}

.category-card span {
  font-size: 13px;
  opacity: 0.82;
}

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

.category-card em {
  font-style: normal;
  opacity: 0.78;
}

.category-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 26px 60px rgba(6, 182, 212, 0.18);
}

.gradient-0 {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.gradient-1 {
  background: linear-gradient(135deg, #10b981, #0d9488);
}

.gradient-2 {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.gradient-3 {
  background: linear-gradient(135deg, #f97316, #dc2626);
}

.gradient-4 {
  background: linear-gradient(135deg, #ec4899, #e11d48);
}

.gradient-5 {
  background: linear-gradient(135deg, #6366f1, #2563eb);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 68px;
  padding: 12px 16px;
  border: 1px solid rgba(51, 65, 85, 0.78);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.84);
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.rank-row:hover {
  border-color: rgba(34, 211, 238, 0.75);
  background: rgba(30, 41, 59, 1);
  transform: translateX(4px);
}

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

.rank-title {
  color: #f8fafc;
  font-weight: 800;
}

.rank-meta {
  color: #94a3b8;
  font-size: 14px;
}

.center-actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.page-hero,
.detail-hero {
  padding: 72px max(20px, calc((100% - 1180px) / 2));
  background: radial-gradient(circle at 15% 20%, rgba(34, 211, 238, 0.18), transparent 30%), linear-gradient(135deg, #020617 0%, #0f172a 100%);
}

.page-hero.compact {
  min-height: 280px;
  display: flex;
  align-items: center;
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.05;
}

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

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

.big-search {
  display: flex;
  gap: 12px;
  max-width: 700px;
  margin-top: 28px;
}

.big-search input {
  min-height: 54px;
  padding: 0 16px;
}

.big-search button {
  min-width: 110px;
  min-height: 54px;
  padding: 0 18px;
}

.search-status {
  margin-bottom: 20px;
  color: #67e8f9;
  font-size: 18px;
  font-weight: 800;
}

.empty-state {
  padding: 42px;
  border: 1px solid rgba(51, 65, 85, 0.86);
  border-radius: 18px;
  background: #1e293b;
  color: #cbd5e1;
  text-align: center;
}

.detail-hero {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 48px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.22), transparent 35%), linear-gradient(135deg, #0f172a, #334155);
  box-shadow: 0 32px 80px rgba(2, 6, 23, 0.42);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #22d3ee;
}

.detail-info h1 {
  font-size: clamp(36px, 6vw, 66px);
  line-height: 1.05;
}

.lead {
  max-width: 780px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.player-section {
  background: #020617;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.86);
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
  aspect-ratio: 16 / 9;
}

.player-frame video {
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-ring {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #06b6d4;
  color: #ffffff;
  font-size: 34px;
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.32);
  transition: transform 0.2s ease;
}

.player-cover:hover .play-ring {
  transform: scale(1.08);
}

.article-card {
  padding: 34px;
  border: 1px solid rgba(51, 65, 85, 0.78);
  border-radius: 24px;
  background: #1e293b;
  box-shadow: 0 20px 55px rgba(2, 6, 23, 0.22);
}

.article-card h2 {
  margin: 0 0 16px;
  color: #f8fafc;
  font-size: 28px;
}

.article-card h2 + p {
  margin-top: 0;
}

.article-card p {
  color: #cbd5e1;
  font-size: 17px;
  line-height: 2;
}

.site-footer {
  padding: 54px max(20px, calc((100% - 1180px) / 2)) 26px;
  border-top: 1px solid rgba(30, 41, 59, 0.92);
  background: #020617;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 14px;
  color: #f8fafc;
  font-size: 22px;
  font-weight: 900;
}

.site-footer p {
  max-width: 520px;
  margin: 0;
  color: #94a3b8;
  line-height: 1.8;
}

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

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: #94a3b8;
}

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

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(30, 41, 59, 0.92);
  color: #64748b;
  font-size: 14px;
  text-align: center;
}

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

  .menu-toggle {
    display: block;
  }

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

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

  .detail-hero {
    grid-template-columns: 280px 1fr;
    gap: 32px;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    height: 64px;
  }

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

  .brand-text em {
    display: none;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    top: 52%;
  }

  .hero-control {
    display: none;
  }

  .hero-dots {
    left: 24px;
    right: auto;
    bottom: 24px;
  }

  .section,
  .page-hero,
  .detail-hero,
  .site-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-head {
    display: block;
  }

  .section-head p {
    margin-top: 10px;
  }

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

  .card-body {
    padding: 13px;
  }

  .card-body em {
    min-height: 40px;
  }

  .rail-card {
    flex-basis: 250px;
  }

  .rail-arrow {
    display: none;
  }

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

  .rank-row,
  .rank-row.wide {
    grid-template-columns: 48px 1fr;
  }

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

  .big-search {
    flex-direction: column;
  }

  .detail-hero {
    display: block;
  }

  .detail-poster {
    max-width: 260px;
    margin-bottom: 28px;
  }

  .detail-info h1 {
    font-size: 38px;
  }

  .play-ring {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }

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

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

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