/* ============ 基础重置 ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --white: rgba(255, 255, 255, 0.92);
  --white-soft: rgba(255, 255, 255, 0.55);
  --white-faint: rgba(255, 255, 255, 0.28);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.14);
}

html, body {
  height: 100%;
  overflow: hidden;
  background: #000;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* ============ 背景 ============ */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bg .light-pillar-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bg-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 60%, #1a1030 0%, #000 70%);
  color: var(--white-soft);
  font-size: 13px;
  letter-spacing: 2px;
}

/* 轻微暗化遮罩，保证文字可读，保持通透感 */
.bg-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 45%,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.38) 65%,
    rgba(0, 0, 0, 0.62) 100%
  );
}

/* ============ 顶部导航 ============ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(16px + env(safe-area-inset-top)) 20px 16px;
}

.nav-logo {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--white);
  text-decoration: none;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
  transition: opacity 0.35s ease;
}

.nav-logo .dot {
  color: var(--white-soft);
}

.nav-logo:active {
  opacity: 0.6;
}

.nav-about {
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--white);
  text-decoration: none;
  padding: 8px 18px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-about:active {
  background: rgba(255, 255, 255, 0.14);
  transform: scale(0.96);
}

/* ============ 页面容器 ============ */
.page-wrap {
  position: relative;
  z-index: 5;
  height: 100%;
}

.page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px calc(24px + env(safe-area-inset-bottom));
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.page.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ============ 首页 ============ */
.hero {
  text-align: center;
  animation: floatIn 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(26px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.hero-title {
  font-size: clamp(30px, 9vw, 44px);
  font-weight: 300;
  letter-spacing: 3px;
  color: var(--white);
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.55);
  margin-bottom: 34px;
}

.hero-msg {
  font-size: clamp(17px, 4.6vw, 21px);
  font-weight: 400;
  letter-spacing: 4px;
  color: var(--white);
}

.hero-sub {
  margin-top: 12px;
  font-size: 13px;
  letter-spacing: 8px;
  color: var(--white-soft);
  animation: breathe 3.2s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

/* ============ 页脚 ============ */
.foot {
  position: absolute;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--white-faint);
}

.foot .icp {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.foot .icp:active {
  opacity: 0.6;
}

/* ============ 关于页 ============ */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.about-card {
  width: 100%;
  max-width: 400px;
  padding: 34px 28px 28px;
  margin: auto 0;
}

.about-title {
  text-align: center;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 1.5px;
}

.about-line {
  width: 36px;
  height: 1px;
  margin: 20px auto 26px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
}

.about-block {
  margin-bottom: 26px;
}

.about-h {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 4px;
  color: var(--white-soft);
  margin-bottom: 12px;
}

.about-p {
  font-size: 14.5px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.85);
}

.contact-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 10px;
  text-decoration: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

a.contact-row:active {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(0.98);
}

.contact-label {
  flex-shrink: 0;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--white-soft);
}

.contact-value {
  flex: 1;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.9);
  word-break: break-all;
}

.copy-btn {
  flex-shrink: 0;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--white);
  padding: 6px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.copy-btn:active {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(0.94);
}

.copy-toast {
  position: absolute;
  right: 16px;
  top: -30px;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 5px 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.copy-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.back-home {
  display: block;
  text-align: center;
  margin-top: 6px;
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--white-soft);
  text-decoration: none;
  padding: 12px;
  border-radius: 12px;
  transition: all 0.35s ease;
}

.back-home:active {
  color: var(--white);
  transform: scale(0.97);
}

/* 小屏适配 */
@media (max-height: 620px) {
  .about-card {
    padding: 26px 22px 20px;
  }
  .about-block {
    margin-bottom: 18px;
  }
}

/* ============ 首页黑色文字（body.on-home 时生效，导航和关于页不受影响） ============ */
body.on-home .hero-title {
  color: #000;
  text-shadow: 0 4px 40px rgba(255, 255, 255, 0.35);
}

body.on-home .hero-msg {
  color: #000;
}

body.on-home .hero-sub {
  color: rgba(0, 0, 0, 0.65);
}

body.on-home .foot {
  color: rgba(0, 0, 0, 0.5);
}

/* 黑色文字下减轻背景暗化，保证可读性 */
body.on-home .bg-veil {
  background: radial-gradient(
    ellipse at 50% 45%,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.12) 65%,
    rgba(0, 0, 0, 0.4) 100%
  );
}
