/* ============================================
   展展的生活小站 — 样式
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-deep: #0a0a1a;
  --card-bg: rgba(20, 20, 45, 0.75);
  --text-primary: #e8e8f0;
  --text-muted: #8888aa;
  --accent-1: #a78bfa;  /* 紫 */
  --accent-2: #60a5fa;  /* 蓝 */
  --accent-3: #f472b6;  /* 粉 */
  --glow-purple: rgba(167, 139, 250, 0.5);
  --glow-blue: rgba(96, 165, 250, 0.5);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg-deep);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: default;
}

/* --- 粒子画布背景 --- */
#particles-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- 主卡片 --- */
.card {
  position: relative;
  z-index: 1;
  background: var(--card-bg);
  border-radius: 24px;
  padding: 56px 48px;
  text-align: center;
  max-width: 480px;
  width: calc(100% - 40px);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 120px rgba(167, 139, 250, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.1s ease-out, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* 卡片的动态光晕边框 */
.card::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  padding: 2px;
  background: linear-gradient(
    135deg,
    var(--accent-1), var(--accent-2), var(--accent-3),
    var(--accent-1), var(--accent-2)
  );
  background-size: 400% 400%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: borderGlow 6s ease infinite;
  z-index: -1;
  opacity: 0.6;
}

@keyframes borderGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* --- 头像 --- */
.avatar {
  width: 84px;
  height: 84px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  margin: 0 auto 24px;
  box-shadow: 0 0 40px var(--glow-purple);
  position: relative;
  animation: avatarPulse 3s ease-in-out infinite;
  transform-style: preserve-3d;
  transform: translateZ(30px);
}

@keyframes avatarPulse {
  0%, 100% { box-shadow: 0 0 30px var(--glow-purple); }
  50% { box-shadow: 0 0 60px var(--glow-purple), 0 0 90px rgba(244, 114, 182, 0.25); }
}

/* --- 标题 --- */
h1 {
  font-size: 28px;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: 4px;
  font-weight: 700;
  transform-style: preserve-3d;
  transform: translateZ(20px);
}

/* 标题渐变文字 */
h1 span.gradient-text {
  background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-3) 50%, var(--accent-2) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textShimmer 4s ease-in-out infinite;
}

@keyframes textShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 44px;
  letter-spacing: 6px;
  transform-style: preserve-3d;
  transform: translateZ(15px);
}

/* --- 项目列表 --- */
.projects {
  display: flex;
  flex-direction: column;
  gap: 14px;
  transform-style: preserve-3d;
  transform: translateZ(25px);
}

.project-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
}

/* 项目卡片悬停光效 */
.project-link::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  transition: left 0.6s ease;
}

.project-link:hover::after {
  left: 100%;
}

.project-link:hover {
  background: rgba(167, 139, 250, 0.12);
  border-color: rgba(167, 139, 250, 0.3);
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(167, 139, 250, 0.1);
}

.project-icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: white;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  flex-shrink: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(167, 139, 250, 0.3);
}

.project-link:hover .project-icon {
  box-shadow: 0 6px 20px rgba(167, 139, 250, 0.5);
  transform: scale(1.05);
}

.project-info { text-align: left; }

.project-name {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 3px;
}

.project-desc {
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.project-link:hover .project-desc {
  color: rgba(167, 139, 250, 0.8);
}

/* 箭头指示器 */
.project-link .arrow {
  margin-left: auto;
  color: var(--text-muted);
  transition: all 0.3s ease;
  font-size: 14px;
}

.project-link:hover .arrow {
  color: var(--accent-1);
  transform: translateX(4px);
}

/* --- 底部 --- */
.footer {
  margin-top: 36px;
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  letter-spacing: 2px;
  transform-style: preserve-3d;
  transform: translateZ(10px);
}

.footer .heart {
  color: var(--accent-3);
  display: inline-block;
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.3); }
  30% { transform: scale(1); }
  45% { transform: scale(1.2); }
  60% { transform: scale(1); }
}

/* --- 流星 --- */
.shooting-star {
  position: fixed;
  width: 2px;
  height: 80px;
  background: linear-gradient(to top, rgba(255,255,255,0.8), transparent);
  z-index: 0;
  pointer-events: none;
  animation: shoot 1.2s linear forwards;
  opacity: 0;
}

@keyframes shoot {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(56.3deg);
  }
  60% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate(-600px, 400px) rotate(56.3deg);
  }
}

/* --- 响应式 --- */
@media (max-width: 520px) {
  .card { padding: 40px 28px; }
  h1 { font-size: 24px; letter-spacing: 2px; }
  .subtitle { letter-spacing: 4px; }
  .avatar { width: 68px; height: 68px; font-size: 30px; }
}
