/* ============================================================
   全站通用 · 浅色棉花糖天空主题（用户端）
   各用户页在 style.css 之后引入；主页在此之上再叠 home.css
   ============================================================ */

/* ---------- 变量覆写：墨色文字 + 白色磨砂卡片 ---------- */
:root {
  --text: #4a3f5c;
  --text-dim: rgba(74, 63, 92, 0.62);
  --bg-card: rgba(255, 255, 255, 0.74);
  --bg-card-hover: rgba(255, 255, 255, 0.88);
  --border: rgba(255, 133, 192, 0.32);
  --border-hover: rgba(255, 133, 192, 0.58);
  --blue-deep: #4a90e2;
  /* 暗夜主题里的浅粉/浅蓝在白底上太淡，加深一档保证可读 */
  --pink-light: #e05599;
  --blue-light: #3d7dc2;
}

::selection {
  background: rgba(255, 133, 192, 0.35);
}

/* 粉蓝渐变滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.35); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ffb3d9, #b8d6ff);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.65);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff9ccc, #9cc8ff);
}

/* 锚点跳转避开固定导航栏 */
.section-container section[id] {
  scroll-margin-top: 80px;
}

/* ---------- 天空背景：蜜桃粉 → 天空蓝 → 薰衣草紫 ---------- */
body {
  background: linear-gradient(135deg, #ffe0ee 0%, #ffd0e5 22%, #c4dfff 48%, #d9ceff 74%, #ffd4e8 100%);
  background-size: 400% 400%;
  animation: gradientBG 26s ease infinite;
}

/* 右上暖阳 */
body::before {
  content: '';
  position: fixed;
  top: -130px;
  right: -130px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 210, 130, 0.6) 0%, rgba(255, 185, 215, 0.3) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---------- 云朵 ---------- */
.sky-clouds {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.cloud {
  position: absolute;
  background: #ffffff;
  border-radius: 999px;
  opacity: 0.92;
  filter: blur(1px);
  animation: cloudDrift linear infinite;
}

.cloud::before,
.cloud::after {
  content: '';
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
}

.cloud::before {
  width: 55%;
  height: 160%;
  top: -80%;
  left: 15%;
}

.cloud::after {
  width: 38%;
  height: 110%;
  top: -45%;
  right: 14%;
}

.cloud-1 { width: 150px; height: 44px; top: 9%;  animation-duration: 95s;  animation-delay: -30s; }
.cloud-2 { width: 110px; height: 34px; top: 20%; animation-duration: 125s; animation-delay: -80s; opacity: 0.7; }
.cloud-3 { width: 190px; height: 54px; top: 34%; animation-duration: 80s;  animation-delay: -8s; }
.cloud-4 { width: 95px;  height: 30px; top: 52%; animation-duration: 140s; animation-delay: -60s; opacity: 0.65; }
.cloud-5 { width: 135px; height: 40px; top: 68%; animation-duration: 105s; animation-delay: -45s; opacity: 0.75; }

@keyframes cloudDrift {
  from { transform: translateX(-25vw); }
  to   { transform: translateX(115vw); }
}

/* ---------- 粒子（各页 inline 脚本本来就会生成，这里补上样式） ---------- */
#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  bottom: -12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  opacity: 0;
  animation-name: particleRise;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.particle:nth-child(3n) { width: 7px; height: 7px; }
.particle:nth-child(4n) { width: 3px; height: 3px; }

@keyframes particleRise {
  0%   { transform: translate3d(0, 0, 0) scale(0.6); opacity: 0; }
  12%  { opacity: 0.55; }
  85%  { opacity: 0.4; }
  100% { transform: translate3d(2vw, -108vh, 0) scale(1); opacity: 0; }
}

/* ---------- 导航栏：白磨砂 ---------- */
.navbar {
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(255, 133, 192, 0.3);
  box-shadow: 0 4px 24px rgba(199, 125, 255, 0.14);
}

.logo { color: var(--text); }

.logo span {
  background: linear-gradient(135deg, var(--pink-dark), var(--blue-deep));
  -webkit-background-clip: text;
  background-clip: text;
}

.nav-links a { color: var(--text); }

.nav-links a:hover {
  color: var(--pink-dark);
  text-shadow: 0 0 12px rgba(255, 133, 192, 0.45);
}

.user-info-btn {
  background: rgba(255, 133, 192, 0.1);
  color: var(--text);
}

.user-info-btn:hover {
  background: rgba(255, 133, 192, 0.18);
  border-color: var(--pink);
}

/* ---------- 移动端菜单：白底 ---------- */
.mobile-menu {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(253, 241, 248, 0.98) 100%);
  box-shadow: -5px 0 30px rgba(199, 125, 255, 0.18);
}

.mobile-menu-header {
  border-bottom-color: rgba(255, 133, 192, 0.25);
  color: var(--text);
}

.mobile-menu-close {
  background: rgba(74, 63, 92, 0.06);
  border-color: rgba(74, 63, 92, 0.12);
  color: var(--text);
}

.mobile-menu-close:active { background: rgba(74, 63, 92, 0.12); }

.mobile-menu-item { color: var(--text); }

/* ---------- 卡片：白磨砂 + 柔和彩色投影 ---------- */
.card-glass {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(199, 125, 255, 0.12), 0 2px 8px rgba(110, 181, 255, 0.08);
}

.card-glass:hover {
  border-color: var(--border-hover);
  box-shadow: 0 16px 44px rgba(199, 125, 255, 0.18), 0 4px 12px rgba(110, 181, 255, 0.1);
}

/* ---------- 弹窗：白底 ---------- */
.modal-overlay { background: rgba(90, 60, 110, 0.32); }

.game-window {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--pink-light);
  box-shadow: 0 10px 44px rgba(199, 125, 255, 0.28);
  color: var(--text);
}

.game-title {
  background: linear-gradient(135deg, var(--pink-dark), var(--blue-deep));
  -webkit-background-clip: text;
  background-clip: text;
}

.close-btn { color: rgba(74, 63, 92, 0.45); }

.close-btn:hover {
  background: rgba(74, 63, 92, 0.08);
  color: var(--pink-dark);
}

.login-status-text {
  background: rgba(74, 63, 92, 0.05);
}

.login-loading { border-color: rgba(74, 63, 92, 0.2); border-top-color: var(--pink); }

/* ---------- 表单 ---------- */
.form-label { color: var(--text); }

.form-input {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
}

.form-input:focus {
  background: #ffffff;
}

/* ---------- Toast ---------- */
#toast {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
}

/* ---------- 骨架屏：浅灰扫光 ---------- */
.skeleton,
.skeleton-card,
.skeleton-song-group,
.skeleton-reward-card,
.skeleton-order-item {
  background: linear-gradient(90deg,
    rgba(74, 63, 92, 0.05) 25%,
    rgba(255, 255, 255, 0.65) 50%,
    rgba(74, 63, 92, 0.05) 75%
  );
  background-size: 200% 100%;
}

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 768px) {
  .navbar {
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 4px 20px rgba(199, 125, 255, 0.15);
    border-bottom-color: rgba(255, 133, 192, 0.22);
  }

  .logo,
  .logo span {
    background: linear-gradient(135deg, var(--pink-dark), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
  }

  /* 子页没有汉堡菜单，移动端必须保住导航链接（style.css 会全局隐藏） */
  body.sub-page .nav-links {
    display: flex !important;
    gap: 6px;
  }

  body.sub-page .nav-links a {
    font-size: 13px;
    padding: 6px 10px;
  }
}

/* 减少动态偏好：停掉装饰性动画 */
@media (prefers-reduced-motion: reduce) {
  .cloud,
  .particle {
    animation: none !important;
  }
}
