/* ========== 登录页 ========== */
.login-page {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 20px;
  position: relative; overflow: hidden;
}
.login-bg {
  position: absolute; inset: 0; background-size: cover;
  background-position: center; filter: brightness(0.6); z-index: 0;
}
.login-canvas { position: absolute; inset: 0; z-index: 1; }
.login-content {
  position: relative; z-index: 2; width: 100%; max-width: 360px;
  text-align: center;
}
.login-quote {
  font-size: 16px; color: #fff; margin-bottom: 32px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3); line-height: 1.6;
  min-height: 52px;
}
.login-form { display: flex; flex-direction: column; gap: 12px; }
.login-form .input-field {
  background: rgba(255,255,255,0.9); border: none; height: 48px;
  border-radius: 24px; padding: 0 20px; font-size: 15px;
}
.login-form .btn { height: 48px; border-radius: 24px; font-size: 16px; font-weight: 600; }
.login-form .btn-guest {
  background: transparent; border: 1.5px solid rgba(255,255,255,0.6);
  color: #fff; border-radius: 24px; height: 48px;
}

/* ========== 首页 ========== */
.home-banner {
  background: var(--gradient); color: #fff; padding: 24px 16px;
  text-align: center; border-radius: 0 0 24px 24px; margin-bottom: 16px;
  position: relative; overflow: hidden;
}
.home-banner .love-days { font-size: 28px; font-weight: 700; margin-bottom: 4px; }
.home-banner .love-label { font-size: 14px; opacity: 0.9; }
.home-banner-bg {
  position: absolute; inset: 0; background-size: cover;
  background-position: center; z-index: 0;
}
.home-banner > *:not(.home-banner-bg) { position: relative; z-index: 1; }

.checkin-status {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 12px; font-size: 14px;
}
.checkin-fire { font-size: 20px; }

.quick-actions {
  display: flex; gap: 12px; padding: 0 12px; margin-bottom: 16px;
}
.quick-btn {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 16px 8px; border-radius: var(--radius);
  background: var(--card-bg); box-shadow: var(--shadow); cursor: pointer;
  transition: transform 0.2s;
}
.quick-btn:active { transform: scale(0.95); }
.quick-btn .q-icon { font-size: 28px; margin-bottom: 6px; }
.quick-btn .q-label { font-size: 12px; color: var(--text-secondary); }

.timeline-item {
  display: flex; gap: 12px; padding: 8px 0; position: relative;
}
.timeline-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--primary);
  margin-top: 5px; flex-shrink: 0; position: relative; z-index: 1;
}
.timeline-line {
  position: absolute; left: 4px; top: 18px; bottom: -8px;
  width: 2px; background: var(--border);
}
.timeline-date { font-size: 12px; color: var(--text-secondary); }
.timeline-content { font-size: 14px; }
.timeline-countdown { font-size: 12px; color: var(--primary); margin-top: 2px; }

/* ========== 任务页 ========== */
.task-card {
  background: var(--card-bg); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); margin: 0 12px 12px;
}
.task-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.task-title { font-size: 15px; font-weight: 600; }
.task-points { font-size: 13px; color: var(--primary); font-weight: 600; }
.task-meta { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.task-status {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 500;
}
.status-pending { background: #FFF3E0; color: #F57C00; }
.status-in_progress { background: #E3F2FD; color: #1976D2; }
.status-submitted { background: #F3E5F5; color: #7B1FA2; }
.status-approved { background: #E8F5E9; color: #388E3C; }
.status-rejected { background: #FFEBEE; color: #D32F2F; }
.task-actions { display: flex; gap: 8px; margin-top: 8px; }

/* ========== 心情日历 ========== */
.mood-calendar { padding: 0 12px; }
.calendar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
}
.calendar-header h3 { font-size: 16px; font-weight: 600; }
.calendar-nav { display: flex; gap: 8px; }
.calendar-nav button {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: var(--card-bg); box-shadow: var(--shadow); cursor: pointer;
  font-size: 16px; display: flex; align-items: center; justify-content: center;
}
.calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.calendar-weekday {
  text-align: center; font-size: 12px; color: var(--text-secondary);
  padding: 4px 0; font-weight: 500;
}
.calendar-day {
  aspect-ratio: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; border-radius: 8px;
  font-size: 13px; cursor: pointer; position: relative;
  transition: background 0.2s;
}
.calendar-day:hover { background: rgba(255,107,138,0.08); }
.calendar-day.today { border: 1.5px solid var(--primary); }
.calendar-day.other-month { color: var(--text-light); }
.calendar-day .mood-emoji { font-size: 16px; }
.calendar-day .mood-heart {
  position: absolute; bottom: 1px; right: 1px; font-size: 8px; color: var(--primary);
}
.mood-colors {
  happy: #FFF3E0, calm: #E8F5E9, sad: #E3F2FD, angry: #FFEBEE, sweet: #FCE4EC
}
.calendar-day[data-mood="happy"] { background: rgba(255,243,224,0.6); }
.calendar-day[data-mood="calm"] { background: rgba(232,245,233,0.6); }
.calendar-day[data-mood="sad"] { background: rgba(227,242,253,0.6); }
.calendar-day[data-mood="angry"] { background: rgba(255,235,238,0.6); }
.calendar-day[data-mood="sweet"] { background: rgba(252,228,236,0.6); }

.mood-selector {
  display: flex; justify-content: space-around; padding: 16px 0;
}
.mood-option {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; padding: 8px; border-radius: 12px; transition: all 0.2s;
}
.mood-option:hover, .mood-option.selected { background: rgba(255,107,138,0.1); }
.mood-option .mood-emoji { font-size: 32px; }
.mood-option .mood-label { font-size: 12px; color: var(--text-secondary); }

.mood-stats-card {
  display: flex; gap: 12px; padding: 12px 0; flex-wrap: wrap;
}
.mood-stat-item {
  flex: 1; min-width: 80px; text-align: center; padding: 8px;
  background: rgba(255,107,138,0.05); border-radius: 8px;
}
.mood-stat-value { font-size: 18px; font-weight: 600; color: var(--primary); }
.mood-stat-label { font-size: 11px; color: var(--text-secondary); }

/* ========== 我的页面 ========== */
.profile-header {
  text-align: center; padding: 24px 16px; background: var(--gradient);
  color: #fff; border-radius: 0 0 24px 24px; margin-bottom: 16px;
}
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%; border: 3px solid #fff;
  margin: 0 auto 8px; object-fit: cover; background: rgba(255,255,255,0.3);
}
.profile-name { font-size: 18px; font-weight: 600; }
.profile-points { font-size: 14px; opacity: 0.9; margin-top: 4px; }

.menu-list { padding: 0 12px; }
.menu-item {
  display: flex; align-items: center; padding: 14px 16px;
  background: var(--card-bg); border-radius: var(--radius-sm);
  margin-bottom: 8px; cursor: pointer; gap: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.menu-item:active { background: rgba(255,255,255,0.8); }
.menu-icon { font-size: 20px; width: 28px; text-align: center; }
.menu-label { flex: 1; font-size: 14px; }
.menu-arrow { color: var(--text-light); font-size: 14px; }
.menu-badge {
  background: #FF3B30; color: #fff; font-size: 10px; padding: 1px 6px;
  border-radius: 8px; margin-right: 4px;
}

/* ========== 相册 ========== */
.photo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; padding: 2px;
}
.photo-item {
  aspect-ratio: 1; overflow: hidden; position: relative; cursor: pointer;
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-like-btn {
  position: absolute; bottom: 4px; right: 4px; background: rgba(0,0,0,0.4);
  color: #fff; border-radius: 12px; padding: 2px 6px; font-size: 11px;
  display: flex; align-items: center; gap: 2px;
}

.lightbox {
  position: fixed; inset: 0; z-index: 300; background: #000;
  display: flex; align-items: center; justify-content: center;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 16px; right: 16px; color: #fff;
  font-size: 28px; cursor: pointer; z-index: 1;
}

/* ========== 留言板 ========== */
.message-item {
  display: flex; gap: 10px; padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.message-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.message-body { flex: 1; }
.message-nick { font-size: 13px; font-weight: 600; }
.message-location { font-size: 11px; color: var(--text-light); margin-left: 6px; }
.message-text { font-size: 14px; margin-top: 4px; line-height: 1.5; }
.message-time { font-size: 11px; color: var(--text-light); margin-top: 4px; }
.message-del { font-size: 12px; color: var(--primary); cursor: pointer; margin-left: 8px; }

/* ========== 恋爱清单 ========== */
.todo-progress { padding: 16px; text-align: center; }
.todo-progress-text { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; }
.todo-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.todo-check {
  width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: all 0.2s;
}
.todo-check.checked { background: var(--primary); border-color: var(--primary); color: #fff; }
.todo-title { font-size: 14px; flex: 1; }
.todo-title.done { text-decoration: line-through; color: var(--text-light); }
.todo-category {
  font-size: 11px; color: var(--text-light); background: rgba(255,107,138,0.08);
  padding: 1px 6px; border-radius: 4px;
}

/* ========== 积分榜 ========== */
.points-rank {
  display: flex; gap: 16px; padding: 20px; justify-content: center;
}
.rank-item {
  text-align: center; flex: 1; max-width: 140px;
}
.rank-avatar { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 8px; object-fit: cover; }
.rank-name { font-size: 14px; font-weight: 600; }
.rank-points { font-size: 24px; font-weight: 700; color: var(--primary); margin-top: 4px; }

/* ========== 成就 ========== */
.achievement-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 12px;
}
.achievement-item {
  text-align: center; padding: 8px; border-radius: 12px;
  background: var(--card-bg); box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.achievement-icon { font-size: 28px; margin-bottom: 4px; }
.achievement-name { font-size: 11px; font-weight: 500; }
.achievement-locked { opacity: 0.3; filter: grayscale(1); }
.achievement-progress { font-size: 10px; color: var(--text-light); margin-top: 2px; }

/* ========== 私聊 ========== */
.chat-container { display: flex; flex-direction: column; height: 100%; }
.chat-messages { padding: 12px; }
.chat-bubble {
  max-width: 75%; padding: 10px 14px; border-radius: 16px;
  margin-bottom: 8px; font-size: 14px; line-height: 1.5; position: relative;
  word-break: break-word;
}
.chat-bubble.sent {
  background: #FFE4E1; margin-left: auto; border-bottom-right-radius: 4px;
}
.chat-bubble.received {
  background: #f0f0f0; margin-right: auto; border-bottom-left-radius: 4px;
}
.chat-time { font-size: 10px; color: var(--text-light); margin-top: 2px; }
.chat-read { font-size: 10px; color: var(--primary); }
.chat-input-bar {
  display: flex; gap: 8px; padding: 8px 12px; background: #fff;
  border-top: 1px solid var(--border); align-items: flex-end;
}
.chat-input {
  flex: 1; border: 1px solid var(--border); border-radius: 20px;
  padding: 8px 14px; font-size: 14px; outline: none; resize: none;
  max-height: 80px; min-height: 36px;
}
.chat-send {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: var(--gradient); color: #fff; font-size: 16px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}

/* ========== 兑换商城 ========== */
.voucher-card {
  background: var(--card-bg); border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow); margin: 0 12px 12px;
}
.voucher-title { font-size: 15px; font-weight: 600; }
.voucher-desc { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.voucher-cost { font-size: 14px; color: var(--primary); font-weight: 600; margin-top: 8px; }
.voucher-remaining { font-size: 12px; color: var(--text-light); }

/* ========== 每日任务 ========== */
.daily-task-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.daily-task-check {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.daily-task-check.done { background: #4CAF50; border-color: #4CAF50; color: #fff; }
.daily-task-info { flex: 1; }
.daily-task-name { font-size: 14px; font-weight: 500; }
.daily-task-desc { font-size: 12px; color: var(--text-secondary); }
.daily-task-reward { font-size: 13px; color: var(--primary); font-weight: 600; }

/* ========== 宝箱 ========== */
.chest-card {
  background: var(--gradient); color: #fff; border-radius: var(--radius);
  padding: 20px; margin: 0 12px 12px; text-align: center;
  cursor: pointer; transition: transform 0.2s;
}
.chest-card:active { transform: scale(0.97); }
.chest-card .chest-emoji { font-size: 48px; margin-bottom: 8px; }
.chest-card .chest-label { font-size: 16px; font-weight: 600; }

/* ========== 验证码 ========== */
.captcha-row {
  display: flex; align-items: center; gap: 8px;
}
.captcha-question {
  font-size: 16px; font-weight: 600; color: var(--primary);
  white-space: nowrap;
}
