@import url('../assets/fonts/lxgw/lxgwwenkai-regular.css');
/* ===================================================================
   忘年岛 · 原型设计系统
   面向新老人的 S2B2C 银发社群平台
   =================================================================== */

:root {
  /* ---- 海岛色系 (主色) ---- */
  --sea: #2B7A8C;          /* 海水青 - 主色 */
  --sea-deep: #1E5966;     /* 深海 - hover */
  --sea-mist: #D8E8EC;     /* 海雾 - 弱提示底色 */
  --sea-soft: #EEF5F7;     /* 浅雾 - 卡片底色 */

  /* ---- 沙滩色系 (中性底色) ---- */
  --sand: #F7F3EC;         /* 沙滩米 - 页面底色 */
  --sand-soft: #FDFAF4;    /* 浅沙 - 卡片底色 */
  --sand-deep: #EAE3D3;    /* 深沙 - 分割线 */

  /* ---- 夕阳色系 (情感强调色) ---- */
  --sunset: #E98A4F;       /* 夕阳橘 - CTA/重要强调 */
  --sunset-deep: #C96A30;  /* 深夕阳 - hover */
  --sunset-soft: #FDEDE0;  /* 浅橘 - 徽章底色 */

  /* ---- 其他情感色 ---- */
  --coral: #D85959;        /* 珊瑚红 - 握手按钮/点赞 */
  --coral-soft: #FBE3E3;
  --leaf: #6B9E60;         /* 叶绿 - 成功/勋章 */
  --leaf-soft: #E3EDDF;
  --gold: #D4A94A;         /* 沙金 - 付费/高级 */
  --gold-soft: #F7EFD8;

  /* ---- 文字色 ---- */
  --ink: #1F2A2E;          /* 主文字 - 墨色 */
  --ink-soft: #4A5A60;     /* 次要文字 */
  --ink-faint: #5A6A70;    /* 提示文字 */
  --ink-white: #FFFFFF;

  /* ---- 尺寸 ---- */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;

  /* ---- 字号 (适老化：整体放大 ~15%) ---- */
  --fs-xs: 14px;
  --fs-sm: 15px;
  --fs-base: 17px;        /* 正文 */
  --fs-md: 18px;
  --fs-lg: 20px;
  --fs-xl: 24px;
  --fs-2xl: 28px;
  --fs-3xl: 34px;
  --fs-hero: 44px;

  /* ---- 行高 ---- */
  --lh-tight: 1.3;
  --lh-base: 1.6;
  --lh-loose: 1.8;

  /* ---- 间距 ---- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* ---- 阴影 ---- */
  --shadow-xs: 0 1px 2px rgba(31, 42, 46, 0.04);
  --shadow-sm: 0 2px 8px rgba(31, 42, 46, 0.06);
  --shadow-md: 0 6px 20px rgba(31, 42, 46, 0.08);
  --shadow-lg: 0 12px 32px rgba(31, 42, 46, 0.12);
  --shadow-sea: 0 8px 24px rgba(43, 122, 140, 0.18);
}

/* ---- 基础重置 ---- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

/* 彻底去除手机浏览器点击时的黑框/黄框/高亮 */
button, a, [role=button], .icon-btn, .top-tab, .tabbar-item {
  -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
  outline: none !important;
  -webkit-touch-callout: none;
  user-select: none;
}
button:focus, a:focus, button:focus-visible, a:focus-visible, .icon-btn:focus, .icon-btn:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
               "Microsoft YaHei", "Noto Sans SC", "Source Han Sans CN",
               "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 文楷字体用于情感类标题 —— 本地化，零外部依赖 */

.font-wenkai {
  font-family: 'LXGW WenKai', "KaiTi", "楷体", serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  cursor: pointer;
  background: none;
  color: inherit;
}

input, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

ul, ol {
  list-style: none;
}

/* ---- 通用布局 ---- */
.page {
  min-height: 100vh;
  background: var(--sand);
  padding-bottom: 64px; /* tabbar space — V2.9 缩小底部 */
}

/* ---- Pill 徽章 ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 500;
  line-height: 1.3;
}

.pill-sea { background: var(--sea-mist); color: var(--sea-deep); }
.pill-sunset { background: var(--sunset-soft); color: var(--sunset-deep); }
.pill-gold { background: var(--gold-soft); color: #8C6F20; }
.pill-leaf { background: var(--leaf-soft); color: #3D5C35; }
.pill-coral { background: var(--coral-soft); color: #9A3030; }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: var(--fs-base);
  font-weight: 500;
  transition: all 0.2s;
  min-height: 42px;
}

.btn-primary {
  background: var(--sea);
  color: white;
}
.btn-primary:hover { background: var(--sea-deep); }

.btn-cta {
  background: var(--sunset);
  color: white;
  font-weight: 600;
}
.btn-cta:hover { background: var(--sunset-deep); }

.btn-ghost {
  background: transparent;
  color: var(--sea-deep);
  border: 1.5px solid var(--sea-mist);
}
.btn-ghost:hover { background: var(--sea-mist); }

.btn-soft {
  background: var(--sea-soft);
  color: var(--sea-deep);
}

.btn-lg {
  padding: 14px 28px;
  font-size: var(--fs-md);
  min-height: 52px;
}

/* ---- 卡片 ---- */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ---- 分割线 ---- */
.divider {
  height: 1px;
  background: var(--sand-deep);
  margin: var(--sp-4) 0;
}

/* ---- 头像 ---- */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--sea-mist);
}

.avatar-sm { width: 36px; height: 36px; }
.avatar-md { width: 44px; height: 44px; }
.avatar-lg { width: 56px; height: 56px; }
.avatar-xl { width: 80px; height: 80px; }

/* ---- 圆形图标按钮 ---- */
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  transition: all 0.2s;
}
.icon-btn:hover {
  background: var(--sand-deep);
  color: var(--ink);
}

/* ---- 通用 SVG 图标 ---- */
.icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  vertical-align: middle;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm { width: 18px; height: 18px; }
.icon-lg { width: 26px; height: 26px; }

/* ---- 原型展示容器 (桌面端并排手机原型) ---- */
.prototype-shell {
  min-height: 100vh;
  background: linear-gradient(135deg, #F5EDE0 0%, #E8DCC7 50%, #D5C5A8 100%);
  padding: 40px 20px;
}

.prototype-header {
  max-width: 1400px;
  margin: 0 auto 40px;
  text-align: center;
}

.prototype-header h1 {
  font-family: 'LXGW WenKai', "KaiTi", serif;
  font-size: 44px;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.prototype-header p {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

.prototype-nav {
  max-width: 1400px;
  margin: 32px auto 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.prototype-nav a {
  padding: 10px 20px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-weight: 500;
  font-size: 15px;
  transition: all 0.2s;
  border: 1px solid rgba(255,255,255,0.6);
}
.prototype-nav a:hover {
  background: var(--sea);
  color: white;
}
.prototype-nav a.active {
  background: var(--sea);
  color: white;
  box-shadow: var(--shadow-sea);
}

.phone-frame {
  width: 390px;
  margin: 0 auto;
  background: #1F2A2E;
  border-radius: 44px;
  padding: 14px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25), 0 10px 30px rgba(0,0,0,0.15);
  position: relative;
}

.phone-notch {
  position: absolute;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: #1F2A2E;
  border-radius: 0 0 18px 18px;
  z-index: 10;
}

.phone-screen {
  background: var(--sand);
  border-radius: 32px;
  overflow: hidden;
  height: 800px;
  overflow-y: auto;
  position: relative;
}

.phone-screen::-webkit-scrollbar {
  width: 0;
}

/* ---- 顶部状态栏（模拟） ---- */
.status-bar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* ---- 页面标题栏 — V2.10 与顶 tab 间隙压缩 ⅓ ---- */
.page-header {
  padding: 8px 16px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--sand);
  position: sticky;
  top: 44px;
  z-index: 99;
}

.page-header-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  font-family: 'LXGW WenKai', "KaiTi", serif;
  letter-spacing: 1px;
}

/* ---- 底部 Tab Bar ---- */
.tabbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(253, 250, 244, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--sand-deep);
  display: flex;
  padding: 6px 0 8px;
  z-index: 100;
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 0 0;
  position: relative;
  transition: color 0.2s;
}

.tab.active {
  color: var(--sea-deep);
  font-weight: 700;
}

.tab.active .tab-icon {
  transform: translateY(-1px);
  stroke-width: 2.4;
}

/* 选中态小圆点指示器 */
.tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--sea);
}
.tab.tab-fab.active::before { display: none; }

.tab-icon {
  width: 24px;
  height: 24px;
  transition: transform 0.2s, stroke-width 0.2s;
}

.tab-fab {
  position: relative;
}

.tab-fab .tab-icon-wrap {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--sunset) 0%, #F4A872 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -18px;
  box-shadow: 0 8px 20px rgba(233, 138, 79, 0.4);
  color: white;
}

.tab-fab .tab-label {
  font-size: 12px;
  color: var(--sunset-deep);
  font-weight: 600;
  margin-top: 2px;
}

/* ---- 对话气泡 ---- */
.bubble {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 14px;
  background: white;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 240px;
  box-shadow: var(--shadow-xs);
}

/* ---- 全局页面背景装饰（浅浪纹） ---- */
.bg-wave {
  position: relative;
  overflow: hidden;
}
.bg-wave::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(ellipse 800px 400px at 50% 0%, rgba(216, 232, 236, 0.35), transparent);
  pointer-events: none;
  z-index: 0;
}

/* ---- 可按压反馈 ---- */
.tappable {
  transition: transform 0.1s, opacity 0.15s;
}
.tappable:active {
  transform: scale(0.97);
  opacity: 0.85;
}

/* ---- 响应式：移动设备直接显示一张（无 phone 框） ---- */
@media (max-width: 767px) {
  .prototype-shell {
    padding: 0;
    background: var(--sand);
  }
  .prototype-header,
  .prototype-nav {
    display: none;
  }
  .phone-frame {
    width: 100%;
    background: none;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .phone-notch { display: none; }
  .phone-screen {
    height: 100vh;
    border-radius: 0;
  }
  .status-bar { display: none; }
}

/* ---- 桌面端：响应式设备外壳（手机模拟器） ---- */
@media (min-width: 768px) {
  html {
    height: 100%;
  }
  
  body {
    background: linear-gradient(160deg, #F5EDE0 0%, #E8DCC7 60%, #DDD0B8 100%) !important;
    overflow: hidden !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
  }
  
  .phone-screen {
    width: 390px !important;
    height: 844px !important;
    max-height: calc(100vh - 40px) !important;
    border-radius: 46px !important;
    border: 10px solid #1a1a1a !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    transform: translateZ(0);
    flex-shrink: 0;
    position: relative !important;
    box-shadow: 0 24px 48px rgba(0,0,0,0.18) !important;
  }

  .phone-screen > * {
    max-width: 100% !important;
  }
  
  /* 顶部刘海/灵动岛已移除 */
  
  /* 背景装饰也要跟着圆角 */
  .phone-screen.bg-wave::before {
    border-radius: 44px;
  }
  
  .phone-screen::-webkit-scrollbar {
    width: 0;
  }
  
  /* tabbar 底部圆角 */
  .tabbar {
    border-radius: 0 0 42px 42px !important;
  }
}

/* ---- 多屏并排（prototype-frames 容器） ---- */
.prototype-frames {
  max-width: 1750px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  padding: 20px;
}

.phone-label {
  text-align: center;
  font-size: 15px;
  color: var(--ink-soft);
  margin-top: 14px;
  font-weight: 500;
}

.phone-label strong {
  display: block;
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 2px;
  font-family: 'LXGW WenKai', "KaiTi", serif;
  letter-spacing: 1px;
}

.phone-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* device-frame v1.0.3 responsive shell */
