/*
 * WarmCore 公共样式 — 手机 Web 端暖色设计系统
 *
 * 适用于：index.html, family.html, faces.html, album.html, membership.html
 * 不适用于：car.html, car-bind.html, tv.html（独立配色）
 *
 * 各页面仍可在自己的 <style> 中覆盖变量或追加样式。
 */

/* ── 设计令牌 ── */
:root {
  /* 背景 */
  --wc-bg: #FFF8F0;
  --wc-card: rgba(255,255,255,0.78);
  --wc-card-solid: #FFFFFF;

  /* 文字 */
  --wc-text: #5D4037;
  --wc-text-sec: #8D6E63;
  --wc-text-light: #BCAAA4;

  /* 强调色 */
  --wc-accent: #FF8A65;
  --wc-accent2: #FFB74D;
  --wc-accent3: #F48FB1;
  --wc-green: #66BB6A;

  /* 暖色装饰 */
  --wc-warm1: #FFE0B2;
  --wc-warm2: #FFCCBC;

  /* 边框 & 阴影 */
  --wc-border: rgba(255,183,130,0.2);
  --wc-shadow: rgba(255,138,101,0.1);

  /* 圆角 */
  --wc-radius: 16px;
  --wc-radius-sm: 10px;
  --wc-radius-lg: 20px;

  /* 字体 */
  --wc-font: -apple-system, "SF Pro Text", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

/* ── 重置 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── 基础 body ── */
body {
  font-family: var(--wc-font);
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── 粘性顶栏 ── */
.top-bar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: rgba(255,248,240,0.88);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--wc-border);
}

/* ── 返回按钮 ── */
.top-bar .back,
.header .back {
  width: 36px; height: 36px;
  border: none; background: none;
  font-size: 22px; color: var(--wc-accent);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--wc-radius-sm);
  text-decoration: none; flex-shrink: 0;
  transition: transform 0.15s;
}
.top-bar .back:active,
.header .back:active {
  transform: scale(0.9);
  background: var(--wc-warm2);
}

/* ── 顶栏标题 ── */
.top-bar h1,
.header h1 {
  font-size: 18px; font-weight: 700; flex: 1;
  color: var(--wc-text);
}

/* ── 毛玻璃卡片基类 ── */
.wc-card {
  background: var(--wc-card);
  border: 1px solid var(--wc-border);
  border-radius: var(--wc-radius);
  box-shadow: 0 2px 10px var(--wc-shadow);
}

/* ── 渐变强调文字 ── */
.wc-gradient-text {
  background: linear-gradient(135deg, var(--wc-accent), var(--wc-accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── 模态遮罩 ── */
.wc-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(93,64,55,0.4);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  z-index: 200; align-items: center; justify-content: center;
}
.wc-modal-overlay.show { display: flex; }

/* ── 模态面板 ── */
.wc-modal {
  background: var(--wc-card-solid);
  border-radius: var(--wc-radius);
  padding: 24px; width: 400px; max-width: 90vw;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

/* ── 强调色按钮 ── */
.wc-btn-accent {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--wc-accent), var(--wc-accent2));
  color: #fff; border: none; border-radius: var(--wc-radius-sm);
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.wc-btn-accent:active { transform: scale(0.96); opacity: 0.9; }

/* ── 输入框 ── */
.wc-input {
  width: 100%;
  background: var(--wc-bg); color: var(--wc-text);
  border: 1px solid var(--wc-border);
  padding: 8px 12px; border-radius: var(--wc-radius-sm);
  font-size: 14px; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.wc-input:focus {
  border-color: var(--wc-accent);
  box-shadow: 0 0 0 3px rgba(255,138,101,0.12);
}

/* ── 背景装饰渐变 ── */
.wc-bg-warm {
  background-color: var(--wc-bg);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(255,183,77,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 10%, rgba(244,143,177,0.1) 0%, transparent 50%);
}

/* ── 滚动条隐藏（WebKit） ── */
.wc-hide-scrollbar::-webkit-scrollbar { display: none; }
.wc-hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
