/* ========== 全局重置 & 基础变量（淡紫色主题） ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg-primary: #f3eaf6;       /* 淡紫色背景 */
  --bg-secondary: #faf5fd;     /* 更浅的紫白 */
  --bg-card: #ffffff;
  --purple-light: #e8daf0;
  --purple-main: #b48cd9;
  --purple-deep: #8a5fc4;
  --purple-soft: #d4b8e8;
  --pink-soft: #f7d4e3;
  --pink-main: #f5a5c2;
  --text-main: #4a3a5c;
  --text-sub: #8b7a9e;
  --text-light: #b5a8c2;
  --shadow: 0 4px 16px rgba(180, 140, 217, 0.15);
  --shadow-strong: 0 6px 24px rgba(180, 140, 217, 0.22);
  --radius: 16px;
  --radius-sm: 10px;
  --gradient: linear-gradient(135deg, #f3eaf6 0%, #faf5fd 50%, #fff5f8 100%);
}

html, body {
  width: 100%;
  min-height: 100vh;
  background: var(--gradient);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Twemoji Mozilla", sans-serif;
  color: var(--text-main);
  font-size: 14px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* ========== 顶部状态栏模拟 ========== */
.status-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  background: transparent;
  z-index: 200;
  pointer-events: none;
}

/* ========== 左侧导航栏 ========== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 200px;
  height: 100vh;
  background: linear-gradient(180deg, #f7eef9 0%, #faf0f6 100%);
  border-right: 1px solid var(--purple-light);
  display: flex;
  flex-direction: column;
  padding: 50px 12px 20px;
  z-index: 150;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar.collapsed {
  transform: translateX(-200px);
}

.sidebar-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 18px;
  border-bottom: 1px dashed var(--purple-light);
  margin-bottom: 14px;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-main), var(--pink-main));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  border: 3px solid #fff;
}

.avatar-inner {
  font-size: 20px;
  color: #fff;
  font-weight: 600;
}

.sidebar-motto {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 8px;
  letter-spacing: 1px;
}

.nav-list {
  list-style: none;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 11px 12px;
  margin-bottom: 6px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.nav-item:hover {
  background: rgba(180, 140, 217, 0.1);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--purple-main), var(--purple-soft));
  color: #fff;
  box-shadow: 0 4px 12px rgba(180, 140, 217, 0.4);
}

.nav-icon {
  font-size: 16px;
  margin-right: 10px;
  width: 22px;
  text-align: center;
}

.nav-label {
  flex: 1;
  font-weight: 500;
}

.nav-tag {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--pink-soft);
  color: var(--purple-deep);
  border-radius: 6px;
  font-weight: 600;
}

.nav-item.active .nav-tag {
  background: rgba(255,255,255,0.3);
  color: #fff;
}

.sidebar-footer {
  padding: 12px 0;
  border-top: 1px dashed var(--purple-light);
  text-align: center;
}

.update-info {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  color: var(--text-sub);
  background: var(--bg-secondary);
  padding: 6px 10px;
  border-radius: 20px;
}

.update-info .dot {
  width: 6px;
  height: 6px;
  background: #6dc76d;
  border-radius: 50%;
  margin-right: 6px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ========== 折叠按钮 ========== */
.sidebar-toggle {
  position: fixed;
  top: 36px;
  left: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--purple-deep);
  font-size: 18px;
  box-shadow: var(--shadow);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--purple-light);
}

.sidebar-toggle.shifted {
  left: 212px;
}

/* ========== 遮罩 ========== */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(74, 58, 92, 0.4);
  z-index: 140;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.mask.show {
  opacity: 1;
  pointer-events: auto;
}

/* ========== 主内容区 ========== */
.main-content {
  margin-left: 200px;
  padding: 40px 18px 60px 38px;
  max-width: 760px;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .main-content,
.main-content.expanded {
  margin-left: 0;
  padding: 40px 16px 60px 64px;
}

/* ========== 顶部欢迎 ========== */
.top-header {
  text-align: center;
  padding: 18px 0 24px;
}

.greet-text {
  font-size: 15px;
  color: var(--text-sub);
  margin-bottom: 6px;
}

.greet-time {
  font-size: 56px;
  font-weight: 200;
  color: var(--text-main);
  letter-spacing: 2px;
  line-height: 1.1;
  margin-bottom: 8px;
}

.greet-date {
  font-size: 13px;
  color: var(--purple-deep);
  font-weight: 500;
}

/* ========== 通用卡片 ========== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(232, 218, 240, 0.5);
}

.quote-card {
  background: linear-gradient(135deg, #fbeaf3 0%, #f3eaf6 100%);
  text-align: center;
  padding: 22px 18px;
  position: relative;
  border: 1px solid #f7d4e3;
}

.quote-paw {
  font-size: 16px;
  color: var(--pink-main);
  opacity: 0.5;
}

.quote-paw-right {
  text-align: right;
  display: block;
}

.quote-cn {
  font-size: 15px;
  color: var(--text-main);
  line-height: 1.7;
  font-weight: 500;
  margin: 8px 0;
}

.quote-en {
  font-size: 12px;
  color: var(--text-sub);
  font-style: italic;
  line-height: 1.6;
  margin-bottom: 6px;
}

/* ========== Section 标题 ========== */
.section-title {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin: 22px 0 12px;
}

.section-title .bar {
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, var(--purple-main), var(--pink-main));
  border-radius: 2px;
  margin-right: 8px;
}

.section-title.small {
  font-size: 14px;
  margin: 18px 0 10px;
}

/* ========== 首页：健康数据 ========== */
.block-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
}

.meal-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.meal-item {
  text-align: center;
  padding: 8px 4px;
  background: var(--bg-secondary);
  border-radius: 10px;
  border: 1px solid var(--purple-light);
}

.meal-item.done {
  background: linear-gradient(135deg, #f3eaf6, #fbeaf3);
  border-color: var(--purple-soft);
}

.meal-dot {
  width: 8px;
  height: 8px;
  background: var(--text-light);
  border-radius: 50%;
  margin: 0 auto 6px;
}

.meal-item.done .meal-dot {
  background: var(--purple-main);
}

.meal-label {
  font-size: 12px;
  color: var(--text-main);
  font-weight: 500;
}

.meal-status {
  font-size: 10px;
  color: var(--text-sub);
  margin-top: 2px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--purple-main), var(--pink-main));
  border-radius: 3px;
  transition: width 0.5s;
}

.progress-text {
  font-size: 11px;
  color: var(--text-sub);
  text-align: right;
  margin-top: 4px;
}

/* 统计行 */
.stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.stat-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px 12px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--purple-light);
}

.stat-card.highlight {
  background: linear-gradient(135deg, var(--purple-main), var(--pink-main));
  border: none;
  color: #fff;
}

.stat-card.highlight .stat-label,
.stat-card.highlight .stat-unit {
  color: rgba(255,255,255,0.85);
}

.stat-num {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.stat-unit {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 6px;
}

/* 健身 mini */
.fitness-mini .fitness-info {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.ft-label {
  font-size: 11px;
  color: var(--text-sub);
}

.ft-value {
  font-size: 14px;
  color: var(--text-main);
  font-weight: 600;
  margin-top: 2px;
}

.fitness-btn {
  background: linear-gradient(135deg, var(--purple-main), var(--pink-main));
  color: #fff;
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(180, 140, 217, 0.35);
}

/* 自媒体创作 */
.creation-card {
  background: linear-gradient(135deg, #fff 0%, #faf5fd 100%);
}

.update-time {
  font-size: 11px;
  color: var(--purple-deep);
  background: var(--bg-secondary);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.creation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.creation-item {
  text-align: center;
  background: #fff;
  padding: 12px 6px;
  border-radius: 12px;
  border: 1px solid var(--purple-light);
}

.ci-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--purple-deep);
  line-height: 1;
}

.ci-label {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 4px;
}

/* 待办 */
.todo-card {
  padding: 8px 16px;
}

.todo-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--purple-light);
  font-size: 13px;
  color: var(--text-main);
}

.todo-item:last-child {
  border-bottom: none;
}

.todo-check {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--purple-main);
  border-radius: 50%;
  margin-right: 10px;
  flex-shrink: 0;
  position: relative;
}

.todo-check.done {
  background: var(--purple-main);
}

.todo-check.done::after {
  content: "✓";
  color: #fff;
  font-size: 11px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.done-text {
  color: var(--text-light);
  text-decoration: line-through;
}

/* 每日小结 */
.summary-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--purple-light);
}

.summary-item:last-of-type {
  border-bottom: none;
}

.s-icon {
  font-size: 20px;
  margin-right: 10px;
  width: 32px;
  text-align: center;
}

.s-content {
  flex: 1;
}

.s-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.s-desc {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
}

.s-score {
  background: linear-gradient(135deg, var(--purple-main), var(--pink-main));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
}

.ai-suggest {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-radius: 10px;
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.6;
  border-left: 3px solid var(--purple-main);
}

/* ========== 通用页面 ========== */
.page {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.page-sub {
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 18px;
}

/* ========== 每日灵感 ========== */
.platform-switch {
  display: flex;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.platform {
  flex: 1;
  text-align: center;
  padding: 8px;
  font-size: 13px;
  color: var(--text-sub);
  border-radius: 8px;
  font-weight: 500;
}

.platform.active {
  background: linear-gradient(135deg, var(--purple-main), var(--pink-main));
  color: #fff;
  box-shadow: 0 3px 10px rgba(180, 140, 217, 0.35);
}

/* ========== 灵感源泉 ========== */
.inspiration-source {
  background: linear-gradient(135deg, #f3eaf6 0%, #fbeaf3 100%);
  border: 1px solid var(--purple-light);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.is-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--purple-deep);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.is-section {
  margin-bottom: 14px;
}

.is-section:last-child {
  margin-bottom: 0;
}

.is-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 8px;
}

.is-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  padding: 4px 10px;
  background: #fff;
  border-radius: 8px;
  display: inline-block;
}

.is-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.is-tag {
  font-size: 12px;
  padding: 5px 12px;
  background: #fff;
  border: 1px solid var(--purple-light);
  border-radius: 16px;
  color: var(--purple-deep);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  font-weight: 500;
}

.is-tag:active {
  transform: scale(0.94);
}

.is-tag.predicted {
  background: linear-gradient(135deg, #fff5f8, #f3eaf6);
  border-style: dashed;
  border-color: var(--pink-main);
  color: var(--purple-deep);
}

.is-thoughts-list {
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
}

.is-thought-item {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.8;
  padding: 3px 0;
}

.is-thought-item b {
  color: var(--purple-deep);
}

.inspiration-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(232, 218, 240, 0.6);
}

.ins-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.ins-tag {
  background: linear-gradient(135deg, #ff7e8a, #ffa85a);
  color: #fff;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 8px;
  font-weight: 600;
}

.ins-view {
  font-size: 11px;
  color: var(--text-sub);
}

.ins-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 6px;
}

.ins-meta {
  font-size: 11px;
  color: var(--text-sub);
  margin-bottom: 12px;
}

.ins-block {
  background: var(--bg-secondary);
  padding: 8px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.ib-label {
  font-size: 11px;
  color: var(--purple-deep);
  font-weight: 600;
  margin-bottom: 3px;
}

.ib-text {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.6;
}

.ins-thoughts {
  background: linear-gradient(135deg, #f3eaf6 0%, #fbeaf3 100%);
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.it-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--purple-deep);
  margin-bottom: 6px;
}

.it-item {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.8;
}

.ins-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.ins-tags span {
  font-size: 11px;
  color: var(--purple-deep);
  background: var(--bg-secondary);
  padding: 3px 8px;
  border-radius: 8px;
}

.ins-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple-main), var(--pink-main));
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  flex: 1;
  box-shadow: 0 3px 10px rgba(180, 140, 217, 0.35);
}

.btn-line {
  background: var(--bg-secondary);
  color: var(--purple-deep);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  flex: 1;
  border: 1px solid var(--purple-light);
}

.btn-primary.full,
.btn-line.full {
  flex: none;
  width: 100%;
  margin: 10px 0;
  padding: 11px;
}

.btn-primary.small,
.btn-line.small {
  padding: 6px 10px;
  font-size: 11px;
  border-radius: 8px;
  flex: 0 0 auto;
}

/* ========== 饮食打卡 ========== */
.diet-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.ds-item {
  background: #fff;
  border-radius: 14px;
  padding: 12px 6px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--purple-light);
  transition: transform 0.15s;
}

.ds-item.clickable {
  cursor: pointer;
}

.ds-item.clickable:active {
  transform: scale(0.95);
}

.ds-item.clickable .ds-num {
  background: linear-gradient(135deg, var(--purple-main), var(--pink-main));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 目标设置预设按钮 */
.target-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

.target-preset {
  background: var(--bg-secondary);
  border: 1.5px solid var(--purple-light);
  border-radius: 12px;
  padding: 10px 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.3;
}

.target-preset small {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-sub);
  display: block;
  margin-top: 2px;
}

.target-preset.active {
  background: linear-gradient(135deg, var(--purple-main), var(--pink-main));
  color: #fff;
  border-color: transparent;
}

.target-preset.active small {
  color: rgba(255,255,255,0.85);
}

.ds-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--purple-deep);
  line-height: 1.1;
}

.ds-label {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 4px;
}

.meal-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  border: 1px solid var(--purple-light);
}

.meal-card.done {
  background: linear-gradient(135deg, #fff 0%, #faf5fd 100%);
}

.meal-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.meal-emoji {
  font-size: 18px;
}

.meal-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  flex: 0 0 auto;
}

.meal-kcal {
  font-size: 12px;
  color: var(--purple-deep);
  font-weight: 600;
  flex: 1;
  text-align: right;
}

.meal-tag-done {
  font-size: 10px;
  background: var(--purple-soft);
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
}

.meal-tag-todo {
  font-size: 10px;
  background: var(--bg-secondary);
  color: var(--text-sub);
  padding: 2px 8px;
  border-radius: 6px;
}

.meal-content {
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.meal-time {
  font-size: 11px;
  color: var(--text-light);
}

.meal-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* ========== 饮食文字录入弹窗 ========== */
.meal-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.meal-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(74, 58, 92, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.meal-modal-box {
  position: relative;
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 12px 40px rgba(74, 58, 92, 0.3);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.meal-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 14px;
  text-align: center;
}

.meal-modal-input {
  width: 100%;
  border: 1.5px solid var(--purple-light);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  resize: none;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.meal-modal-input:focus {
  border-color: var(--purple-main);
}

.meal-modal-kcal {
  margin-top: 10px;
  background: linear-gradient(135deg, #f3eaf6 0%, #fbeaf3 100%);
  border: 1px solid var(--purple-light);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.kcal-auto-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--purple-deep);
  margin-bottom: 6px;
}

.kcal-auto-display {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 4px;
}

.kcal-auto-display .kcal-num {
  font-size: 28px;
  font-weight: 700;
  color: var(--purple-deep);
  line-height: 1.1;
}

.kcal-auto-hint {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.4;
}

.meal-modal-btns {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.meal-modal-btns button {
  flex: 1;
  padding: 10px;
  font-size: 13px;
  border-radius: 10px;
  font-weight: 600;
}

/* 运动类型选择网格 */
.ex-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.ex-type-btn {
  background: var(--bg-secondary);
  border: 1.5px solid var(--purple-light);
  border-radius: 10px;
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.ex-type-btn.active {
  background: linear-gradient(135deg, var(--purple-main), var(--pink-main));
  color: #fff;
  border-color: transparent;
}

/* 性别切换 */
.gender-switch {
  display: flex;
  gap: 8px;
}

.gender-btn {
  flex: 1;
  background: var(--bg-secondary);
  border: 1.5px solid var(--purple-light);
  border-radius: 12px;
  padding: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-sub);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.gender-btn.active {
  background: linear-gradient(135deg, var(--purple-main), var(--pink-main));
  color: #fff;
  border-color: transparent;
}

/* 趋势 */
.trend-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-sub);
}

.trend-row > span:first-child {
  width: 36px;
  flex-shrink: 0;
}

.trend-row > span:last-child {
  width: 40px;
  text-align: right;
  font-weight: 600;
  color: var(--text-main);
}

.trend-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.trend-fill {
  height: 100%;
  background: var(--purple-light);
  border-radius: 4px;
}

.trend-fill.active {
  background: linear-gradient(90deg, var(--purple-main), var(--pink-main));
}

/* ========== 爆款热点 ========== */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter {
  font-size: 12px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid var(--purple-light);
  border-radius: 16px;
  color: var(--text-sub);
  white-space: nowrap;
  flex-shrink: 0;
}

.filter.active {
  background: linear-gradient(135deg, var(--purple-main), var(--pink-main));
  color: #fff;
  border: none;
}

/* 平台区块标题 */
.platform-section {
  margin-bottom: 20px;
}

.platform-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
  flex-wrap: wrap;
}

.platform-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  flex-shrink: 0;
}

.head-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: flex-end;
  min-width: 160px;
}

.hotspot-search {
  flex: 1;
  max-width: 180px;
  border: 1.5px solid var(--purple-light);
  border-radius: 14px;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s;
}

.hotspot-search:focus {
  border-color: var(--purple-main);
}

.search-result-hint {
  font-size: 11px;
  color: var(--purple-deep);
  background: var(--bg-secondary);
  padding: 5px 10px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-weight: 500;
}

.refresh-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--purple-light);
  border-radius: 14px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--purple-deep);
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.refresh-btn:active {
  transform: scale(0.94);
  background: var(--purple-light);
}

/* 分类标签小按钮 */
.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.cat-tag {
  font-size: 11px;
  padding: 4px 10px;
  background: #fff;
  border: 1px solid var(--purple-light);
  border-radius: 14px;
  color: var(--text-sub);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}

.cat-tag.active {
  background: linear-gradient(135deg, var(--purple-main), var(--pink-main));
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}

.hot-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--purple-light);
}

.hot-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.hot-rank {
  background: linear-gradient(135deg, #ff7e8a, #ffa85a);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  flex-shrink: 0;
}

/* 平台标识 */
.platform-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1.2;
  letter-spacing: 0.5px;
}
.platform-badge.douyin { background: #000; color: #fff; }
.platform-badge.bilibili { background: #fb7299; color: #fff; }
.platform-badge.xhs { background: #ff2442; color: #fff; padding: 3px 7px; }
.platform-badge.wechat { background: #07c160; color: #fff; }

.hot-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  flex: 1;
}

.hot-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-sub);
  margin-bottom: 10px;
}

.hot-plan {
  background: linear-gradient(135deg, #f3eaf6 0%, #fbeaf3 100%);
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.hp-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--purple-deep);
  margin-bottom: 6px;
}

.hp-item {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.7;
}

.hp-item b {
  color: var(--purple-deep);
  margin-right: 2px;
}

/* ========== 健身 ========== */
.fitness-dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.fd-card {
  background: #fff;
  border-radius: 14px;
  padding: 12px 6px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--purple-light);
}

.fd-card.highlight {
  background: linear-gradient(135deg, var(--purple-main), var(--pink-main));
  border: none;
  color: #fff;
}

.fd-card.highlight .fd-label {
  color: rgba(255,255,255,0.85);
}

.fd-label {
  font-size: 11px;
  color: var(--text-sub);
  margin-bottom: 4px;
}

.fd-num {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
}

.fd-num span {
  font-size: 10px;
  font-weight: 400;
}

/* 消耗拆分卡片 */
.burn-breakdown {
  padding: 14px 16px;
}

.bb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.bb-row.total {
  background: linear-gradient(135deg, #f3eaf6 0%, #fbeaf3 100%);
  margin: 4px -16px -14px;
  padding: 12px 16px;
  border-radius: 0 0 var(--radius) var(--radius);
}

.bb-info {
  flex: 1;
}

.bb-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.bb-desc {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
}

.bb-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--purple-deep);
  white-space: nowrap;
}

.bb-num span {
  font-size: 11px;
  font-weight: 400;
}

.bb-divider {
  height: 1px;
  background: var(--purple-light);
  margin: 2px 0;
}

/* 运动空状态 */
.ex-empty {
  text-align: center;
  padding: 24px 12px;
  font-size: 13px;
  color: var(--text-light);
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px dashed var(--purple-light);
}

/* 运动记录删除按钮 */
.ex-item {
  position: relative;
}

.ex-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-light);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.ex-delete:hover {
  background: #ff7e8a;
  color: #fff;
}

.ai-coach {
  background: linear-gradient(135deg, #f3eaf6 0%, #fbeaf3 100%);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--purple-light);
}

.ai-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--purple-deep);
  margin-bottom: 8px;
}

.ai-item {
  font-size: 12px;
  color: var(--text-main);
  line-height: 1.8;
}

.exercise-list {
  margin-bottom: 6px;
}

.ex-item {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--purple-light);
}

.ex-info {
  flex: 1;
}

.ex-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.ex-meta {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
}

.ex-kcal {
  font-size: 14px;
  font-weight: 700;
  color: var(--purple-deep);
}

.week-stat {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
  margin-bottom: 14px;
}

.ws-item {
  background: var(--bg-secondary);
  padding: 10px;
  border-radius: 10px;
}

.ws-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--purple-deep);
  line-height: 1.1;
}

.ws-label {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 3px;
}

.week-bar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.wb-item {
  text-align: center;
  font-size: 11px;
  padding: 8px 0;
  background: var(--bg-secondary);
  border-radius: 8px;
  color: var(--text-light);
}

.wb-item.done {
  background: var(--purple-light);
  color: var(--purple-deep);
  font-weight: 600;
}

.wb-item.active {
  background: linear-gradient(135deg, var(--purple-main), var(--pink-main));
  color: #fff;
  font-weight: 600;
}

/* ========== ID搜索栏 & 账号信息 ========== */
.id-search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.id-search-input {
  flex: 1;
  border: 1.5px solid var(--purple-light);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.id-search-input:focus {
  border-color: var(--purple-main);
}

.id-search-btn {
  background: linear-gradient(135deg, var(--purple-main), var(--pink-main));
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(180, 140, 217, 0.35);
  flex-shrink: 0;
}

.id-search-btn:active {
  transform: scale(0.96);
}

.account-info {
  background: linear-gradient(135deg, #f3eaf6 0%, #fbeaf3 100%);
  border: 1px solid var(--purple-light);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-main), var(--pink-main));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #fff;
  font-weight: 600;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: var(--shadow);
}

.account-detail {
  flex: 1;
  min-width: 0;
}

.account-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.account-desc {
  font-size: 11px;
  color: var(--text-sub);
  margin-top: 2px;
  line-height: 1.4;
}

.account-badge {
  font-size: 10px;
  background: var(--purple-soft);
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  flex-shrink: 0;
}

/* ========== 公众号 ========== */
.wc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.article-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  border: 1px solid var(--purple-light);
  position: relative;
}

.ac-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 6px;
  padding-right: 60px;
}

.ac-meta {
  display: flex;
  gap: 12px;
  font-size: 11px;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.ac-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10px;
  background: var(--purple-soft);
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
}

.ac-tag.warn {
  background: #ffd6a5;
  color: #b86b00;
}

.ac-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.review-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  text-align: center;
}

.rr-num {
  font-size: 15px;
  font-weight: 700;
  color: var(--purple-deep);
  line-height: 1.1;
}

.rr-label {
  font-size: 10px;
  color: var(--text-sub);
  margin-top: 3px;
}

/* ========== 小红书 ========== */
.xhs-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.calendar-mini {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.cm-day {
  background: #fff;
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--purple-light);
}

.cm-day.active {
  background: linear-gradient(135deg, var(--purple-main), var(--pink-main));
  border: none;
  color: #fff;
}

.cm-day.active .cm-tag {
  color: rgba(255,255,255,0.9);
}

.cm-d {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.1;
}

.cm-tag {
  font-size: 10px;
  color: var(--purple-deep);
  margin-top: 3px;
  font-weight: 500;
}

.cm-tag.empty {
  color: var(--text-light);
}

.xhs-card {
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
  border: 1px solid var(--purple-light);
}

.xhs-cover {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--purple-light), var(--pink-soft));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--purple-deep);
  font-weight: 600;
  flex-shrink: 0;
}

.xhs-info {
  flex: 1;
  min-width: 0;
}

.xhs-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.xhs-meta {
  font-size: 11px;
  color: var(--text-sub);
}

.xhs-review {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  text-align: center;
  margin-bottom: 10px;
}

.xr-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--purple-deep);
  line-height: 1.1;
}

.xr-label {
  font-size: 10px;
  color: var(--text-sub);
  margin-top: 3px;
}

/* ========== 手机端响应式 ========== */
@media (max-width: 480px) {
  .sidebar {
    width: 180px;
    transform: translateX(-180px);
  }

  /* 手机端默认收起，通过 .show 类展开 */
  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
    padding: 40px 12px 80px 12px;
  }

  .sidebar-toggle {
    top: 32px;
    z-index: 160;
  }

  .greet-time {
    font-size: 44px;
  }

  .stat-row {
    gap: 8px;
  }

  .creation-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .ci-num {
    font-size: 18px;
  }

  .ins-actions,
  .ac-actions {
    flex-wrap: wrap;
  }

  .btn-primary, .btn-line {
    font-size: 11px;
    padding: 7px 10px;
  }

  .section-title {
    font-size: 14px;
  }

  .page-title {
    font-size: 19px;
  }

  .calendar-mini {
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
  }

  .cm-day {
    padding: 6px 2px;
  }

  .cm-d {
    font-size: 12px;
  }

  .cm-tag {
    font-size: 9px;
  }

  /* 手机端底部固定导航栏 */
  .bottom-nav {
    display: flex;
  }
}

/* ========== 底部固定导航栏（手机端专用） ========== */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--purple-light);
  z-index: 130;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
  box-shadow: 0 -2px 12px rgba(180, 140, 217, 0.12);
}

.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--text-sub);
  cursor: pointer;
  padding: 4px 2px;
  transition: color 0.2s;
}

.bn-item .bn-icon {
  font-size: 18px;
  margin-bottom: 2px;
}

.bn-item.active {
  color: var(--purple-deep);
  font-weight: 600;
}

.bn-item.active .bn-icon {
  transform: scale(1.15);
  transition: transform 0.2s;
}

@media (max-width: 360px) {
  .meal-progress {
    grid-template-columns: repeat(2, 1fr);
  }

  .creation-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
