/* ============================================
   叽叽喳喳画廊 — 毛绒星空主题样式
   配色：小染特调配色盘（严格使用）
   ============================================ */

/* --- CSS 自定义属性（主题色） --- */
:root {
  --color-bg: #1B1B3A;          /* 绒夜蓝 — 夜空底色 */
  --color-star-happy: #FFD93D;  /* 蜜糖星光 — 开心情绪 */
  --color-star-calm: #A0D2DB;   /* 云朵淡蓝 — 平静情绪 */
  --color-accent: #FF8A80;      /* 珊瑚粉泡泡 — 按钮/高亮 */
  --color-text: #E8E0F0;        /* 浅紫白 — 正文 */
  --color-text-dim: #9B8FB5;    /* 淡紫灰 — 辅助文字 */
  --color-glass: rgba(255, 255, 255, 0.08); /* 毛玻璃底色 */
  --color-glass-border: rgba(255, 255, 255, 0.15);
  --radius-star: 24px;          /* 星星圆角 */
  --radius-card: 20px;          /* 卡片圆角 */
  --shadow-glow-happy: 0 0 30px rgba(255, 217, 61, 0.4);
  --shadow-glow-calm: 0 0 30px rgba(160, 210, 219, 0.4);
  --font-display: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* --- 全局重置 --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-display);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  /* 背景微纹理：星空颗粒 */
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.15), transparent),
    radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,0.1), transparent),
    radial-gradient(1.5px 1.5px at 50% 10%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,0.1), transparent),
    radial-gradient(1px 1px at 90% 80%, rgba(255,255,255,0.15), transparent),
    radial-gradient(1.5px 1.5px at 20% 90%, rgba(255,255,255,0.12), transparent),
    radial-gradient(1px 1px at 80% 15%, rgba(255,255,255,0.08), transparent);
}

/* --- 渐变标题（让第一眼"哇"） --- */
.gradient-title {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-star-happy), var(--color-accent), var(--color-star-calm));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 2px;
  text-align: center;
  line-height: 1.3;
}

/* --- 通用按钮 --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: 50px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.92);
}

/* 主按钮 — 珊瑚粉 */
.btn-primary {
  background: var(--color-accent);
  color: #1B1B3A;
  box-shadow: 0 6px 20px rgba(255, 138, 128, 0.35);
}
.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 30px rgba(255, 138, 128, 0.5);
}

/* 次要按钮 — 毛玻璃 */
.btn-glass {
  background: var(--color-glass);
  color: var(--color-text);
  border: 1px solid var(--color-glass-border);
  backdrop-filter: blur(10px);
}
.btn-glass:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

/* --- 毛玻璃卡片 --- */
.glass-card {
  background: var(--color-glass);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* --- 星星组件（通用） --- */
.star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  /* 毛绒光晕 */
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  animation: starFloat 3s ease-in-out infinite;
}

.star-happy {
  background: radial-gradient(circle at 35% 35%, #FFE066, var(--color-star-happy));
  box-shadow: var(--shadow-glow-happy);
}
.star-calm {
  background: radial-gradient(circle at 35% 35%, #C8E6ED, var(--color-star-calm));
  box-shadow: var(--shadow-glow-calm);
}

.star:hover {
  transform: scale(1.15) rotate(8deg);
}

/* 星星浮动呼吸动画 */
@keyframes starFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* 星星出现动画（从录音飞入画廊） */
@keyframes starFlyIn {
  0% {
    opacity: 0;
    transform: scale(0.2) translate(0, 100px) rotate(0deg);
  }
  60% {
    opacity: 1;
    transform: scale(1.1) translate(-10px, -20px) rotate(10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) translate(0, 0) rotate(0deg);
  }
}

.star-fly-in {
  animation: starFlyIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* 星星上的表情贴纸 */
.star-sticker {
  position: absolute;
  font-size: 1.2rem;
  bottom: -4px;
  right: -4px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  animation: stickerPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes stickerPop {
  0% { transform: scale(0); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* --- 导航栏 --- */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(27, 27, 58, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-star-happy);
  text-decoration: none;
  letter-spacing: 1px;
}

.nav-links {
  display: flex;
  gap: 12px;
}

.nav-link {
  color: var(--color-text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all 0.2s ease;
}
.nav-link:hover {
  color: var(--color-text);
  background: var(--color-glass);
}
.nav-link.active {
  color: var(--color-accent);
  background: rgba(255, 138, 128, 0.15);
}

/* --- 页面容器 --- */
.page-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

/* --- 响应式 --- */
@media (max-width: 600px) {
  .gradient-title {
    font-size: 1.6rem;
  }
  .btn {
    padding: 12px 22px;
    font-size: 1rem;
  }
  .nav-bar {
    padding: 12px 16px;
  }
  .page-container {
    padding: 16px 14px 60px;
  }
}

/* --- 工具类 --- */
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-col { flex-direction: column; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
