:root {
  color-scheme: dark;
  --accent-red: #ff3b5c;
  --bg-deep: #211d22;
}

body {
  font-family: "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, #3b2740 0, #211d22 42%, #050308 100%);
  color: #f9fafb;
}

/* Material Symbols 图标配置 */
.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 500,
    "GRAD" 0,
    "opsz" 24;
  vertical-align: middle;
}

/* 页眉导航下划线效果 */
.nav-link {
  position: relative;
  padding-bottom: 0.1rem;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--accent-red), #ff6b81);
  transition: width 0.22s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link--active {
  color: var(--accent-red);
}

.nav-link--active::after {
  width: 100%;
}

/* 搜索输入样式微调 */
.search-input::placeholder {
  color: rgba(148, 163, 184, 0.9);
}

.search-input:focus {
  outline: none;
}

/* Hero 背景光斑 */
.hero-blob {
  pointer-events: none;
  border-radius: 9999px;
  background:
    radial-gradient(circle at 20% 0%, rgba(248, 113, 113, 0.8), transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(129, 140, 248, 0.9), transparent 55%);
  opacity: 0.9;
  filter: blur(48px);
  transform: translate3d(0, 0, 0);
}

/* 封面流 Coverflow 样式 */
.coverflow-shell {
  border-radius: 1.75rem;
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.96), #050308);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(15, 23, 42, 0.8);
  overflow: hidden;
  isolation: isolate;
  position: relative;
  z-index: 0;
  padding: 1.2rem 1.1rem 1.4rem;
}

@media (min-width: 640px) {
  .coverflow-shell {
    padding: 1.5rem 1.5rem 1.7rem;
  }
}

.coverflow-scene {
  perspective: 1200px;
  overflow: hidden;
}

.coverflow-list {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0 1.6rem;
}

.coverflow-card {
  position: relative;
  width: min(60vw, 240px);
  height: min(80vw, 340px);
  border-radius: 1.6rem;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.8);
  transform-style: preserve-3d;
  transform-origin: center center;
  opacity: 0;
  filter: saturate(0.9);
  pointer-events: none;
  transition:
    transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
    opacity 0.45s ease,
    box-shadow 0.45s ease,
    filter 0.45s ease;
}

.coverflow-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.15), transparent 55%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.coverflow-card--center {
  opacity: 1;
  transform: translateX(0) translateZ(90px) scale(1.04);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(248, 250, 252, 0.08);
  filter: saturate(1.1);
  pointer-events: auto;
  z-index: 3;
}

.coverflow-card--left {
  opacity: 0.9;
  transform: translateX(-70px) rotateY(-32deg) scale(0.94);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.85);
  z-index: 2;
}

.coverflow-card--right {
  opacity: 0.9;
  transform: translateX(70px) rotateY(32deg) scale(0.94);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.85);
  z-index: 2;
}

.coverflow-card--hidden {
  opacity: 0;
  transform: translateX(0) translateZ(-160px) scale(0.8);
  box-shadow: none;
  z-index: 1;
}

@media (min-width: 768px) {
  .coverflow-card {
    width: 260px;
    height: 340px;
  }

  .coverflow-card--left {
    transform: translateX(-130px) rotateY(-30deg) scale(0.96);
  }

  .coverflow-card--right {
    transform: translateX(130px) rotateY(30deg) scale(0.96);
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  .coverflow-shell {
    padding: 1rem 1rem 1.2rem;
  }

  .coverflow-card {
    width: 240px;
    height: 320px;
  }

  .coverflow-card--left {
    transform: translateX(-100px) rotateY(-30deg) scale(0.96);
  }

  .coverflow-card--right {
    transform: translateX(100px) rotateY(30deg) scale(0.96);
  }

  .coverflow-shell > .flex {
    gap: 0.5rem;
  }
}

.coverflow-card-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem 1.1rem 1.1rem;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.35));
}

@media (min-width: 640px) {
  .coverflow-card-inner {
    padding: 1.1rem 1.25rem 1.2rem;
  }
}

.coverflow-card-bg-a {
  background-image: linear-gradient(135deg, #020617, #0f172a, #7c2d4f);
}

.coverflow-card-bg-b {
  background-image: linear-gradient(135deg, #0b1120, #1d283a, #9333ea);
}

.coverflow-card-bg-c {
  background-image: linear-gradient(135deg, #020617, #111827, #0369a1);
}

.coverflow-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.1rem;
  width: 2.1rem;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), #020617);
  color: #e5e7eb;
  font-size: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.coverflow-nav-btn:hover {
  transform: translateY(-1px) scale(1.03);
  border-color: rgba(248, 250, 252, 0.6);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.9);
}

.coverflow-nav-btn .material-symbols-outlined {
  font-size: 1.2rem;
}

/* Top 水平滚动列表 */
.top-scroll {
  scroll-snap-type: x mandatory;
}

.top-scroll::-webkit-scrollbar {
  height: 6px;
}

.top-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.top-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.45);
  border-radius: 9999px;
}

.top-card {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 172px;
  border-radius: 1.6rem;
  overflow: hidden;
  background: radial-gradient(circle at top, #020617, #020617);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.9);
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    filter 0.28s ease;
}

@media (min-width: 640px) {
  .top-card {
    width: 190px;
  }
}

@media (min-width: 768px) {
  .top-card {
    width: 210px;
  }
}

.top-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.95);
  filter: saturate(1.08);
}

.top-card-image {
  position: relative;
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: flex-end;
  padding: 0.75rem;
  color: #f9fafb;
}

.top-card-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent 60%);
}

.top-card-image-inner {
  position: relative;
  z-index: 1;
}

.top-card-gradient-a {
  background-image: linear-gradient(135deg, #020617, #b91c1c, #fb923c);
}

.top-card-gradient-b {
  background-image: linear-gradient(135deg, #020617, #4c1d95, #22d3ee);
}

.top-card-gradient-c {
  background-image: linear-gradient(135deg, #020617, #0369a1, #22c55e);
}

.top-card-gradient-d {
  background-image: linear-gradient(135deg, #020617, #475569, #f97316);
}

.top-card-gradient-e {
  background-image: linear-gradient(135deg, #020617, #1d4ed8, #a855f7);
}

.top-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  width: 2rem;
  border-radius: 9999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), #020617);
  color: #e5e7eb;
  font-size: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease;
}

.top-nav-btn:hover {
  transform: translateY(-1px) scale(1.03);
  border-color: rgba(248, 250, 252, 0.7);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.9);
}

.top-nav-btn .material-symbols-outlined {
  font-size: 1.15rem;
}

.gradient-fade-left {
  background: linear-gradient(to right, rgba(5, 3, 8, 0.98), transparent);
}

.gradient-fade-right {
  background: linear-gradient(to left, rgba(5, 3, 8, 0.98), transparent);
}

/* 卡片悬浮微动效（适配暗色背景） */
.card-hover {
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    background-color 0.28s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.95);
  border-color: rgba(248, 250, 252, 0.34);
  background-color: rgba(15, 23, 42, 0.9);
}

/* 主按钮与次按钮微动效 */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease,
    background 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 20px 45px rgba(248, 113, 113, 0.7);
  filter: brightness(1.04);
}

.btn-secondary {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.9);
}

/* Hero 区域淡入动效 */
.fade-in-up {
  opacity: 0;
  animation: fadeInUp 0.7s ease-out 0.1s forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 设计参考图片悬浮微动效 */
.reference-image {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

.reference-image:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85);
  filter: saturate(1.04);
}

/* FAB 按钮微动效 */
.fab-floating {
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease;
}

.fab-floating:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 24px 60px rgba(248, 113, 113, 0.85);
}

/* xl 保护（1280–1535）：仍单列，但 Coverflow 更紧凑 */
@media (min-width: 1280px) and (max-width: 1535px) {
  .coverflow-shell {
    padding: 1rem 1rem 1.2rem;
  }

  .coverflow-card {
    width: 250px;
    height: 330px;
  }

  .coverflow-card--left {
    transform: translateX(-110px) rotateY(-30deg) scale(0.96);
  }

  .coverflow-card--right {
    transform: translateX(110px) rotateY(30deg) scale(0.96);
  }
}

/* 2xl 及更大（≥1536）：两列模式下给 Coverflow 更宽且位移更保守，避免侵入左列 */
@media (min-width: 1536px) {
  .coverflow-shell {
    padding: 1.2rem 1.2rem 1.4rem;
  }

  .coverflow-card {
    width: 260px;
    height: 340px;
  }

  .coverflow-card--left {
    transform: translateX(-120px) rotateY(-28deg) scale(0.96);
  }

  .coverflow-card--right {
    transform: translateX(120px) rotateY(28deg) scale(0.96);
  }
}
