/* 基础重置 */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

/* 全局样式 */
body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% -20%, rgba(80, 46, 153, 0.5), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(46, 158, 153, 0.35), transparent 50%),
    radial-gradient(circle at 50% 120%, rgba(143, 82, 255, 0.6), rgb(8, 5, 16));
  color: #fefeff;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 链接基本样式 */
a {
  color: #b3abc5;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* 全屏背景 Canvas */
#canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* 放在内容后面 */
  display: block;
}

/* 主视图区域：Flex 居中布局 */
#hero {
  position: relative;
  min-height: calc(100vh - 60px); /* 留一点空间给 footer */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
}

/* 标题与副标题 */
.site-title {
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-shadow: 0 0 26px rgba(254, 254, 255, 0.8);
  margin-bottom: 0.75rem;
}

.site-subtitle {
  font-size: clamp(1.1rem, 2.4vw, 1.8rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-shadow: 0 0 22px rgba(254, 254, 255, 0.7);
  margin-bottom: 2rem;
}

/* 字母基础样式：默认全部可见（无 JS 时内容仍可读） */
.site-title .letter,
.site-subtitle .letter {
  display: inline-block;
  opacity: 1;
}

/* 开启动画模式下的初始状态（由 JS 挂 body.enable-hero-animation） */
body.enable-hero-animation .site-title .letter,
body.enable-hero-animation .site-subtitle .letter {
  opacity: 0;
  transform: translateY(0.2em);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

/* 逐字显现的状态（由 JS 添加 .is-visible） */
body.enable-hero-animation .site-title .letter.is-visible,
body.enable-hero-animation .site-subtitle .letter.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 抖动效果 */
@keyframes shake {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  10% {
    transform: translate(-2px, -1px) rotate(-1deg);
  }
  20% {
    transform: translate(2px, 0px) rotate(1deg);
  }
  30% {
    transform: translate(-1px, 1px) rotate(0deg);
  }
  40% {
    transform: translate(1px, -1px) rotate(1deg);
  }
  50% {
    transform: translate(-1px, 1px) rotate(-1deg);
  }
  60% {
    transform: translate(-2px, 1px) rotate(0deg);
  }
  70% {
    transform: translate(2px, 1px) rotate(-1deg);
  }
  80% {
    transform: translate(-1px, -1px) rotate(1deg);
  }
  90% {
    transform: translate(1px, 2px) rotate(0deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

.site-title.shake {
  animation: shake 3s ease-in-out infinite;
  transform-origin: center;
}

/* 店铺入口块 */
.shop-entry {
  margin-bottom: 2rem;
}

.shop-entry p {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.shop-link {
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* 主按钮 */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.8rem;
  border-radius: 999px;
  border: 1px solid rgba(198, 180, 255, 0.8);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #fefeff;
  background: radial-gradient(circle at 0 0, rgba(198, 180, 255, 0.4), rgba(61, 42, 118, 0.9));
  box-shadow:
    0 0 18px rgba(198, 180, 255, 0.7),
    0 0 48px rgba(143, 82, 255, 0.5);
  text-decoration: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow:
    0 0 24px rgba(198, 180, 255, 0.9),
    0 0 64px rgba(143, 82, 255, 0.75);
  background: radial-gradient(circle at 0 0, rgba(220, 201, 255, 0.7), rgba(80, 54, 170, 0.95));
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow:
    0 0 12px rgba(198, 180, 255, 0.7),
    0 0 32px rgba(143, 82, 255, 0.6);
}

/* 联系方式 */
.contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #dcd6f0;
}

.contact-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem;
}

.contact-item .label {
  font-weight: 500;
}

.contact-note {
  opacity: 0.75;
  font-size: 0.85em;
}

/* 特殊链接样式（原 hionestar-link） */
.hionestar-link {
  font-family: "Arial Rounded MT Bold", "Arial", "Microsoft YaHei", sans-serif;
  font-weight: bold;
  letter-spacing: 0.05em;
  color: #b3abc5;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  transition:
    color 0.2s ease,
    text-shadow 0.2s ease;
}

.hionestar-link:hover {
  color: #ffffff;
  text-shadow: 0 0 8px #b3abc5;
}

/* 页脚 */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0.8rem 1rem 1.2rem;
  font-size: 0.85rem;
  color: rgba(222, 216, 255, 0.75);
}

/* noscript 提示 */
.noscript-message {
  position: fixed;
  z-index: 2;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: rgba(15, 12, 30, 0.9);
  border: 1px solid rgba(198, 180, 255, 0.7);
  color: #fefeff;
  font-size: 0.8rem;
  backdrop-filter: blur(12px);
}

/* 响应式调整 */
@media (max-width: 768px) {
  #hero {
    padding-top: 3rem;
    padding-bottom: 2.5rem;
  }

  .site-title {
    letter-spacing: 0.12em;
  }

  .site-subtitle {
    letter-spacing: 0.14em;
  }

  .btn-primary {
    width: 100%;
    max-width: 260px;
  }

  .contact-item {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 2rem;
  }

  .site-subtitle {
    font-size: 1.1rem;
  }

  .contact-note {
    max-width: 90%;
    margin: 0 auto;
  }
}

/* 遵守“减少动态效果”设置 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }

  .site-title.shake {
    animation: none;
  }

  body.enable-hero-animation .site-title .letter,
  body.enable-hero-animation .site-subtitle .letter {
    opacity: 1;
    transform: none;
  }
}
