/* ========== 修行工作台 · 禅意风格 ========== */

:root {
  --primary: #7B6B8A;
  --primary-light: #9B8DAB;
  --primary-dark: #5F5070;
  --gold: #C9A96E;
  --gold-light: #DCC090;
  --bg: #F5F2ED;
  --bg-gradient: linear-gradient(180deg, #FAF8F5 0%, #F0EDE8 100%);
  --card-bg: #FFFFFF;
  --text-primary: #3A3340;
  --text-secondary: #8A8295;
  --text-light: #B5AFC0;
  --border: #E8E3DC;
  --success: #7BA87B;
  --danger: #C97B7B;
  --shadow: 0 2px 12px rgba(123, 107, 138, 0.08);
  --shadow-lg: 0 8px 32px rgba(123, 107, 138, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --nav-height: 64px;
  --max-width: 480px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Source Han Sans CN", sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

.hidden { display: none !important; }

/* ========== 登录页 ========== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-gradient);
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 360px;
  text-align: center;
}

.auth-logo {
  font-size: 64px;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 12px rgba(123, 107, 138, 0.3));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.auth-title {
  font-size: 28px;
  font-weight: 300;
  color: var(--primary);
  letter-spacing: 4px;
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 2px;
  margin-bottom: 32px;
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(123, 107, 138, 0.08);
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s;
}

.auth-tab.active {
  background: var(--primary);
  color: #fff;
}

.auth-form input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  margin-bottom: 12px;
  background: #fff;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.3s;
}

.auth-form input:focus {
  border-color: var(--primary-light);
}

.auth-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s;
  letter-spacing: 2px;
}

.auth-btn:active {
  background: var(--primary-dark);
  transform: scale(0.98);
}

.auth-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 12px;
  min-height: 20px;
}

/* ========== 主应用布局 ========== */
.app {
  min-height: 100vh;
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom));
}

.page {
  min-height: 100vh;
  padding: 16px 16px 20px;
}

/* ========== 通用组件 ========== */
.page-header {
  margin-bottom: 20px;
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
}

.page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ========== 今日修行页 ========== */
.today-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.today-date {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.today-lunar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.today-lunar-text {
  font-size: 12px;
  color: var(--text-light);
}

.today-lunar-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.today-lunar-badge.festival {
  color: #C97B5E;
  background: rgba(201, 123, 94, 0.1);
}

.today-lunar-badge.zhai {
  color: var(--gold);
  background: rgba(201, 169, 110, 0.12);
}

.today-streak-badge {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(201, 169, 110, 0.3);
}

/* 目标进度卡片 */
.goal-progress-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(123, 107, 138, 0.25);
  position: relative;
  overflow: hidden;
}

.goal-progress-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.goal-progress-card.completed {
  background: linear-gradient(135deg, var(--success) 0%, #5A8A5A 100%);
  box-shadow: 0 8px 24px rgba(123, 168, 123, 0.25);
}

.goal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  position: relative;
}

.goal-card-title {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.goal-card-percent {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.goal-card-percent.done {
  color: #fff;
}

.goal-progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
}

.goal-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  border-radius: 4px;
  transition: width 0.8s ease;
  box-shadow: 0 0 8px rgba(201, 169, 110, 0.5);
}

.goal-progress-fill.done {
  background: linear-gradient(90deg, #9BC99B, #B5DDB5);
  box-shadow: 0 0 8px rgba(155, 201, 155, 0.5);
}

.goal-progress-numbers {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 8px;
  position: relative;
}

.goal-completed {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.goal-separator {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.5);
}

.goal-target {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.goal-countdown {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
  position: relative;
}

.countdown-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-light);
}

.countdown-unit {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.countdown-divider {
  color: rgba(255, 255, 255, 0.3);
  margin: 0 4px;
}

.countdown-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.goal-countdown.urgent {
  color: #FFD4A8;
  font-weight: 600;
}

.goal-countdown.overdue {
  color: rgba(255, 200, 200, 0.7);
}

.goal-motivation {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  font-style: italic;
  position: relative;
}

/* 汇总小卡片（三列） */
.today-summary-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.summary-mini-card {
  flex: 1;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 14px 8px;
  text-align: center;
  box-shadow: var(--shadow);
}

.summary-mini-icon {
  font-size: 18px;
  margin-bottom: 4px;
}

.summary-mini-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.summary-mini-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* 今日功课标题 */
.today-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  padding-left: 4px;
}

.today-section-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
}

.today-items {
  margin-bottom: 16px;
}

.today-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.today-item:active {
  transform: scale(0.98);
}

.today-item.completed {
  border-color: rgba(123, 168, 123, 0.15);
}

.item-icon {
  font-size: 24px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(123, 107, 138, 0.08);
  border-radius: 12px;
  flex-shrink: 0;
}

.item-icon.done {
  background: rgba(123, 168, 123, 0.12);
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.item-done-tag {
  font-size: 10px;
  color: var(--success);
  background: rgba(123, 168, 123, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.item-progress-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.item-progress-bar {
  height: 4px;
  background: rgba(123, 107, 138, 0.1);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.item-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 2px;
  transition: width 0.5s ease;
}

.item-progress-fill.done {
  background: linear-gradient(90deg, var(--success), #9BC99B);
}

.item-count-badge {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  padding: 4px 10px;
  background: rgba(123, 107, 138, 0.08);
  border-radius: 12px;
  flex-shrink: 0;
}

.item-count-badge.done {
  color: var(--success);
  background: rgba(123, 168, 123, 0.12);
}

/* ========== 日历视图 ========== */
.calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.calendar-nav button {
  background: var(--card-bg);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.calendar-nav button:active {
  transform: scale(0.95);
}

.calendar-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.calendar-grid {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 8px;
}

.calendar-weekday {
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  padding: 4px;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}

.calendar-day:hover {
  background: rgba(123, 107, 138, 0.06);
}

.calendar-day.empty {
  cursor: default;
}

.calendar-day.other-month {
  color: var(--text-light);
  opacity: 0.4;
}

.calendar-day.today {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.calendar-day.has-practice {
  font-weight: 600;
}

.calendar-dots {
  display: flex;
  gap: 2px;
  margin-top: 2px;
  height: 4px;
}

.calendar-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.calendar-dot.mantra { background: #7B6B8A; }
.calendar-dot.sutra { background: #C9A96E; }
.calendar-dot.other { background: #7BA87B; }

.calendar-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* 节日 + 十斋日标注 */
.calendar-festival-label {
  font-size: 9px;
  color: #C97B5E;
  line-height: 1.2;
  margin-top: 1px;
  font-weight: 600;
}

.calendar-zhai-mark {
  font-size: 9px;
  color: var(--gold);
  line-height: 1.2;
  margin-top: 1px;
  font-weight: 600;
}

/* 节日日格背景 */
.calendar-day.festival {
  background: rgba(201, 123, 94, 0.08);
}

.calendar-day.festival.today {
  background: var(--primary);
}

.calendar-day.festival.today .calendar-festival-label {
  color: rgba(255, 255, 255, 0.85);
}

/* 十斋日格背景 */
.calendar-day.zhai {
  background: rgba(201, 169, 110, 0.06);
}

.calendar-day.zhai.today {
  background: var(--primary);
}

.calendar-day.zhai.today .calendar-zhai-mark {
  color: rgba(255, 255, 255, 0.75);
}

/* 图例中的节日/斋日标记 */
.legend-festival-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 9px;
  color: #C97B5E;
  background: rgba(201, 123, 94, 0.12);
  border-radius: 3px;
  font-weight: 600;
}

.legend-zhai-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  font-size: 9px;
  color: var(--gold);
  background: rgba(201, 169, 110, 0.12);
  border-radius: 3px;
  font-weight: 600;
}

/* ========== 统计页 ========== */
.stats-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-icon {
  font-size: 24px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bar-label {
  width: 80px;
  font-size: 13px;
  color: var(--text-primary);
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-track {
  flex: 1;
  height: 24px;
  background: rgba(123, 107, 138, 0.06);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
}

.bar-fill.mantra { background: linear-gradient(90deg, #7B6B8A, #9B8DAB); }
.bar-fill.sutra { background: linear-gradient(90deg, #C9A96E, #DCC090); }
.bar-fill.other { background: linear-gradient(90deg, #7BA87B, #9BC99B); }

.bar-value {
  font-size: 12px;
  color: #fff;
  font-weight: 600;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(53, 1frfr);
  gap: 2px;
  overflow-x: auto;
  padding: 8px 0;
}

.heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: rgba(123, 107, 138, 0.06);
}

.heatmap-cell.l1 { background: rgba(123, 107, 138, 0.25); }
.heatmap-cell.l2 { background: rgba(123, 107, 138, 0.45); }
.heatmap-cell.l3 { background: rgba(123, 107, 138, 0.65); }
.heatmap-cell.l4 { background: rgba(123, 107, 138, 0.85); }

.trend-chart {
  height: 120px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 8px 0;
}

.trend-bar {
  flex: 1;
  min-width: 2px;
  background: linear-gradient(180deg, var(--primary-light), var(--primary));
  border-radius: 2px 2px 0 0;
  position: relative;
  min-height: 2px;
  transition: height 0.4s ease;
}

.trend-bar:hover::after {
  content: attr(data-value);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ========== 设置页 ========== */
.settings-section {
  margin-bottom: 16px;
}

.settings-section-title {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-left: 4px;
}

/* 设置页 - 修行目标卡片 */
.goal-setting-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.goal-setting-row {
  margin-bottom: 16px;
}

.goal-setting-row label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.goal-setting-row input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  color: var(--text-primary);
  background: #fff;
  outline: none;
  transition: border-color 0.3s;
}

.goal-setting-row input:focus {
  border-color: var(--primary-light);
}

.goal-setting-hint {
  font-size: 13px;
  color: var(--gold);
  background: rgba(201, 169, 110, 0.08);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}

.goal-setting-hint strong {
  font-size: 16px;
  font-weight: 700;
}

.goal-save-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s;
}

.goal-save-btn:active {
  background: var(--primary-dark);
  transform: scale(0.98);
}

/* 按项目目标卡片 */
.goal-item-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.goal-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.goal-item-header .item-icon {
  font-size: 20px;
}

.goal-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* 今日页 - 多目标卡片列表 */
.goal-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.goal-cards-list .goal-progress-card {
  margin-bottom: 0;
}

.settings-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 8px;
}

.settings-item:active {
  transform: scale(0.98);
}

.settings-item .item-icon {
  width: 36px;
  height: 36px;
  font-size: 22px;
}

.settings-item-info {
  flex: 1;
}

.settings-item-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-item-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.settings-item-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  background: rgba(123, 107, 138, 0.08);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:active {
  transform: scale(0.92);
}

.icon-btn.danger {
  background: rgba(201, 123, 123, 0.1);
}

.add-btn {
  width: 100%;
  padding: 14px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: transparent;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s;
}

.add-btn:active {
  border-color: var(--primary-light);
  color: var(--primary);
}

/* ========== 弹窗 ========== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 0;
  animation: slideUp 0.3s ease;
  max-height: 85vh;
  overflow-y: auto;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 12px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 12px 20px 20px;
}

.modal-btn-cancel {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 15px;
  color: var(--text-secondary);
  cursor: pointer;
}

.modal-btn-confirm {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  font-size: 15px;
  color: #fff;
  cursor: pointer;
}

.modal-btn-confirm:active {
  background: var(--primary-dark);
}

/* 记录弹窗内容 */
.record-item-name {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.record-count-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.count-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(123, 107, 138, 0.1);
  font-size: 24px;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.count-btn:active {
  transform: scale(0.9);
  background: rgba(123, 107, 138, 0.2);
}

.count-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.count-display input {
  width: 80px;
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  border: none;
  outline: none;
  background: transparent;
  -moz-appearance: textfield;
}

.count-display input::-webkit-outer-spin-button,
.count-display input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.count-unit {
  font-size: 14px;
  color: var(--text-secondary);
}

.quick-counts {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.quick-btn {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
}

.quick-btn:active {
  background: rgba(123, 107, 138, 0.08);
}

.record-date-row,
.record-note-row {
  margin-bottom: 12px;
}

.record-date-row label,
.record-note-row label,
.form-row label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.record-date-row input,
.record-note-row textarea,
.form-row input,
.form-row select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text-primary);
  background: #fff;
  outline: none;
}

.record-date-row input:focus,
.record-note-row textarea:focus,
.form-row input:focus,
.form-row select:focus {
  border-color: var(--primary-light);
}

.record-note-row textarea {
  resize: none;
  font-family: inherit;
}

.form-row {
  margin-bottom: 16px;
}

.icon-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-option {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 2px solid var(--border);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-option.active {
  border-color: var(--primary);
  background: rgba(123, 107, 138, 0.08);
}

/* 日历日期详情 */
.day-detail-empty {
  text-align: center;
  padding: 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.day-detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.day-detail-item:last-child {
  border-bottom: none;
}

.day-detail-icon {
  font-size: 20px;
}

.day-detail-info {
  flex: 1;
}

.day-detail-name {
  font-size: 14px;
  font-weight: 600;
}

.day-detail-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.day-detail-count {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
}

/* 日历详情 - 佛教信息 */
.day-detail-buddhist {
  background: linear-gradient(135deg, rgba(201, 123, 94, 0.08), rgba(201, 169, 110, 0.08));
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 14px;
  text-align: center;
}

.day-detail-lunar {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.day-detail-festival {
  font-size: 15px;
  font-weight: 600;
  color: #C97B5E;
  margin-bottom: 4px;
}

.day-detail-zhai-tag {
  display: inline-block;
  font-size: 11px;
  color: var(--gold);
  background: rgba(201, 169, 110, 0.15);
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 600;
}

.day-detail-lunar-only {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  padding: 8px 0;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(58, 51, 64, 0.92);
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 2000;
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -40%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* ========== 底部导航 ========== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  padding: 8px 16px;
  transition: all 0.2s;
}

.nav-icon {
  font-size: 22px;
  transition: transform 0.2s;
}

.nav-text {
  font-size: 11px;
  color: var(--text-light);
}

.nav-item.active .nav-icon {
  transform: scale(1.15);
}

.nav-item.active .nav-text {
  color: var(--primary);
  font-weight: 600;
}

/* ========== 莲花绽放动画 ========== */
.lotus-bloom {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 80px;
  z-index: 3000;
  pointer-events: none;
  animation: bloom 1.2s ease forwards;
}

@keyframes bloom {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.3) rotate(-30deg); }
  30% { opacity: 1; transform: translate(-50%, -50%) scale(1.2) rotate(10deg); }
  60% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5) rotate(0deg); }
}

/* ========== 空状态 ========== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 14px;
}

/* ========== 响应式 ========== */
@media (min-width: 481px) {
  body {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.04);
  }
}
