/* ==========================================
   主页 — 完全按参考图重新设计
   ========================================== */
#home-view {
  background: var(--bg-primary);
  overflow: hidden;
}

/* ---- 顶部信息栏（白色胶囊） ---- */
.home-topbar {
  margin: 10px 12px 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 50px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  flex-shrink: 0;
  position: relative;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}

.topbar-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFE082, #FFCA28);
  border: 2px solid #FFD54F;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.topbar-name {
  font-size: 15px;
  font-weight: 700;
  color: #2C2C2C;
}

.topbar-level {
  background: #FF6B9D;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

.topbar-stars {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(0,0,0,0.05);
  padding: 3px 8px;
  border-radius: 20px;
}
.topbar-star-icon { font-size: 14px; }
.topbar-star-count { font-size: 13px; font-weight: 700; color: #333; }

.topbar-pin {
  font-size: 16px;
  opacity: 0.7;
}

.topbar-chevron {
  font-size: 10px;
  color: #999;
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
}

.topbar-right {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}

.topbar-action-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #F0F0F0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #555;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.topbar-action-btn:active { background: #E0E0E0; }

/* ---- 表扬/提醒按钮行 ---- */
.home-actions {
  display: flex;
  gap: 10px;
  padding: 10px 12px 0;
  flex-shrink: 0;
}

.action-btn {
  flex: 1;
  padding: 13px 10px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  user-select: none;
}
.action-btn:active { transform: scale(0.96); }

.action-praise {
  background: #3DC55E;
  color: #fff;
  box-shadow: 0 4px 14px rgba(61,197,94,0.45);
}
.action-remind {
  background: #7B3535;
  color: #fff;
  box-shadow: 0 4px 14px rgba(123,53,53,0.45);
}

/* ---- 目标区域 ---- */
.home-goal-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* 装饰性光晕 */
.goal-blob {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 140, 80, 0.28);
  filter: blur(28px);
  pointer-events: none;
}
.goal-blob-1 { width: 130px; height: 130px; top: 5%; left: 5%; }
.goal-blob-2 { width: 90px; height: 90px; bottom: 15%; right: 10%; }

/* 目标进度条（有目标时显示） */
.home-goal-progress {
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 10px 20px;
  text-align: center;
  z-index: 1;
  max-width: 80%;
}
.hgp-label { font-size: 13px; color: rgba(255,255,255,0.9); margin-bottom: 6px; }
.hgp-bar { height: 8px; background: rgba(255,255,255,0.3); border-radius: 4px; overflow: hidden; }
.hgp-fill { height: 100%; background: #fff; border-radius: 4px; transition: width 0.4s ease; }
.hgp-value { font-size: 12px; color: rgba(255,255,255,0.8); margin-top: 4px; }

.goal-btn {
  background: linear-gradient(135deg, #FF9842, #FF6B00);
  color: #fff;
  padding: 15px 44px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 6px 22px rgba(255,107,0,0.5);
  cursor: pointer;
  z-index: 1;
  transition: transform 0.15s;
  white-space: nowrap;
}
.goal-btn:active { transform: scale(0.96); }

/* ---- 任务卡新设计（红渐变大卡） ---- */
.task-card-wrapper {
  flex-shrink: 0;
  padding: 0 12px 12px;
}

.task-card-new {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  height: 300px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  will-change: transform;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
}
.task-card-new:active { cursor: grabbing; }

/* 不同稀有度背景 */
.rarity-bg-N   { background: linear-gradient(155deg, #5B9BD5 0%, #3A6EA8 100%); }
.rarity-bg-SR  { background: linear-gradient(155deg, #9B59B6 0%, #6C3483 100%); }
.rarity-bg-SSR { background: linear-gradient(155deg, #F39C12 0%, #D68910 100%); }
.rarity-bg-SSSR{ background: linear-gradient(155deg, #FF6B6B 0%, #C0392B 100%); }
.rarity-bg-Legend { background: linear-gradient(155deg, #FF6B9D, #9B59B6, #3498DB, #F39C12); background-size:300% 300%; animation: legendRainbow 3s linear infinite; }

/* 光斑效果 */
.tc-spotlight {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.28) 0%, transparent 68%);
  pointer-events: none;
}

/* 顶部徽章行 */
.tc-badges {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  z-index: 2;
}

.tc-star-badge {
  background: #FFB300;
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.tc-rarity-badge {
  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(6px);
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

/* 卡片主体 */
.tc-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px 10px;
  z-index: 2;
  position: relative;
}

.tc-emoji-wrap {
  font-size: 68px;
  line-height: 1;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.35));
  margin-bottom: 14px;
}

.tc-name {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
  margin-bottom: 8px;
  text-align: center;
}

.tc-freq-tag {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(6px);
  color: rgba(255,255,255,0.95);
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

/* 底部手势提示 */
.tc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: rgba(0,0,0,0.18);
  flex-shrink: 0;
  z-index: 2;
  position: relative;
}

.tc-hint {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
}

/* 无任务卡 */
.no-task-card {
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.no-task-icon { font-size: 64px; }
.no-task-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.no-task-desc { font-size: 14px; color: rgba(255,255,255,0.8); }

/* 切换孩子下拉箭头 */
.topbar-switch-arrow {
  font-size: 11px;
  color: #aaa;
  margin-left: -2px;
}
