* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: #FFF8E7;
  min-height: 100vh;
  color: #333;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: #FFF8E7;
}

/* 登录页 */
.login-page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #E64A19 0%, #E64A19 100%);
}

.login-page h1 {
  color: white;
  font-size: 28px;
  margin-bottom: 10px;
}

.login-page .subtitle {
  color: rgba(255,255,255,0.8);
  margin-bottom: 40px;
}

.login-box {
  background: white;
  padding: 30px;
  border-radius: 16px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-box input {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  border: 2px solid #E8DDD5;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 20px;
}

.login-box input:focus {
  outline: none;
  border-color: #E64A19;
}

.login-box button {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  background: linear-gradient(135deg, #E64A19 0%, #E64A19 100%);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
}

/* 首页 - 孩子选择 */
.home-page {
  padding: 20px;
}

.header {
  text-align: center;
  padding: 20px 0;
}

.header h1 {
  color: #333;
  font-size: 24px;
}

.kids-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 30px;
}

.kid-card {
  background: white;
  border-radius: 20px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s;
}

.kid-card:active {
  transform: scale(0.98);
}

.kid-card .avatar {
  font-size: 60px;
  margin-bottom: 10px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.kid-card .avatar img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.kid-card .name {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 5px;
}

.kid-card .points {
  font-size: 28px;
  color: #E64A19;
  font-weight: bold;
}

.kid-card .points-label {
  font-size: 12px;
  color: #8D7B6C;
}

/* 空状态 - 没有小朋友 */
.no-kid-state {
  text-align: center;
  padding: 40px 0 60px;
  margin-top: 20px;
}

.no-kid-illustration {
  font-size: 72px;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.no-kid-title {
  font-size: 22px;
  font-weight: bold;
  color: #333;
  margin-bottom: 8px;
}

.no-kid-desc {
  font-size: 14px;
  color: #8D7B6C;
  line-height: 1.6;
  margin-bottom: 28px;
  padding: 0 20px;
}

.join-family-section {
  margin: 0 auto;
  max-width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

.invite-code-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.invite-code-input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 2px solid #E8DDD5;
  border-radius: 12px;
  padding: 0 16px;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 4px;
  text-align: center;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.2s;
  background: #fff;
}

.invite-code-input:focus {
  border-color: #E64A19;
}

.invite-code-input::placeholder {
  letter-spacing: 1px;
  font-weight: normal;
  font-size: 14px;
  color: #C4B8AD;
}

.join-family-btn {
  height: 48px;
  padding: 0 14px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #E64A19 0%, #E64A19 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.join-family-btn:active {
  opacity: 0.85;
}

.join-family-msg {
  margin-top: 10px;
  font-size: 13px;
  min-height: 20px;
}

.join-msg-error {
  color: #f44336;
}

.join-msg-loading {
  color: #E64A19;
}

.no-kid-divider {
  display: flex;
  align-items: center;
  margin: 28px 40px;
  gap: 12px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: #E8DDD5;
}

.divider-text {
  font-size: 13px;
  color: #bbb;
}

.create-first-kid-btn {
  background: none;
  border: 2px dashed #C4B8AD;
  border-radius: 12px;
  padding: 14px 28px;
  font-size: 15px;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
}

.create-first-kid-btn:active {
  border-color: #E64A19;
  color: #E64A19;
  background: rgba(102, 126, 234, 0.05);
}

/* 孩子详情页 */
.kid-detail-page {
  background: #FFF8E7;
  min-height: 100vh;
}

.kid-header {
  background: linear-gradient(135deg, #E64A19 0%, #E64A19 100%);
  padding: 30px 20px;
  text-align: center;
  color: white;
  position: relative;
}

.back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease;
}

.back-btn:active {
  background: rgba(255,255,255,0.5);
}

.kid-header .avatar {
  font-size: 80px;
  margin-bottom: 10px;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.kid-header .avatar img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.3);
}

.kid-header .name {
  font-size: 24px;
  font-weight: bold;
}

.kid-header .total-points {
  font-size: 48px;
  font-weight: bold;
  margin-top: 10px;
}

.kid-header .points-label {
  font-size: 14px;
  opacity: 0.9;
}

/* 顶部孩子信息栏 */
.kid-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: linear-gradient(135deg, #FFAB91 0%, #4DB6AC 100%);
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.kid-header-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kid-header-main .avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.kid-header-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kid-header-name {
  font-size: 18px;
  font-weight: 600;
  color: white;
}

.kid-header-points {
  font-size: 20px;
  font-weight: 700;
  color: #ffe066;
  background: rgba(0,0,0,0.25);
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
}

.kid-switcher-dropdown {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: rgba(255,255,255,0.2);
  border-radius: 20px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.kid-switcher-dropdown:hover {
  background: rgba(255,255,255,0.3);
}

.kid-switcher-dropdown .dropdown-arrow {
  font-size: 10px;
}

/* 全局设置头部 */
.global-header-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 20px;
  background: linear-gradient(135deg, #FFAB91 0%, #4DB6AC 100%);
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.global-header-title {
  font-size: 20px;
  font-weight: 600;
  color: white;
}

/* 小朋友切换模态框 */
.kid-switcher-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  padding: 10px 0;
}

.kid-switcher-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 15px;
  border-radius: 16px;
  background: #FFFBF5;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  border: 2px solid transparent;
}

.kid-switcher-card:hover {
  background: #F5EDE5;
  transform: translateY(-2px);
}

.kid-switcher-card.active {
  background: linear-gradient(135deg, #FFAB91 0%, #4DB6AC 100%);
  border-color: #FFAB91;
  box-shadow: 0 4px 15px rgba(255, 138, 101, 0.4);
}

.kid-switcher-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.kid-switcher-card.active .kid-switcher-avatar {
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.kid-switcher-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.kid-switcher-card.active .kid-switcher-name {
  color: white;
}

.kid-switcher-stars {
  font-size: 14px;
  color: #E64A19;
  font-weight: 500;
}

.kid-switcher-card.active .kid-switcher-stars {
  color: #ffe066;
}

.current-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ffe066;
  color: #333;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
}

/* 功能菜单 */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  padding: 20px;
}

.menu-item {
  background: white;
  border-radius: 16px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  cursor: pointer;
}

.menu-item .icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.menu-item .label {
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

/* 任务列表页 */
.page-header {
  background: linear-gradient(135deg, #FFAB91 0%, #4DB6AC 100%);
  padding: 12px 16px;
  color: white;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 8px;
}

.page-header h2 {
  text-align: center;
  font-size: 17px;
  font-weight: 600;
}

/* 任务类别标签 */
.category-tabs {
  display: flex;
  gap: 8px;
  padding: 15px 15px 5px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  background: #FFF5EB;
  z-index: 10;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: white;
  border-radius: 20px;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.category-tab.active {
  border-color: var(--category-color, #E64A19);
  background: var(--category-color, #E64A19);
  color: white;
}

.category-tab .cat-icon {
  font-size: 16px;
}

.category-tab .cat-name {
  font-size: 13px;
  font-weight: 500;
}

.task-list {
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.task-card {
  background: white;
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.15s, box-shadow 0.15s;
}

.task-card:active {
  transform: scale(0.96);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.task-card-icon {
  font-size: 30px;
  margin-bottom: 6px;
}

.task-card-name {
  font-size: 13px;
  font-weight: 500;
  color: #333;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-card-points {
  font-size: 12px;
  color: #E64A19;
  font-weight: 600;
}

/* 日期选择栏 */
.task-date-section {
  display: flex;
  justify-content: center;
  padding: 10px 15px 0;
}

.task-date-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  width: 100%;
}

.date-nav-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.06);
  border: none;
  font-size: 14px;
  color: #555;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.date-nav-btn:active {
  background: rgba(0,0,0,0.12);
}
.date-nav-btn.invisible {
  visibility: hidden;
  pointer-events: none;
}

.task-date-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.task-date-display {
  font-size: 16px;
  color: #333;
  font-weight: 600;
  white-space: nowrap;
}

.task-date-weekday {
  font-size: 13px;
  color: #8D7B6C;
  font-weight: 400;
  white-space: nowrap;
}

.task-date-hint {
  font-size: 11px;
  color: #ff9800;
  font-weight: 600;
}

/* 任务分组（按类别） */
.task-all-categories {
  padding: 10px 15px;
}

.task-category-group {
  margin-bottom: 12px;
}

.task-category-header {
  font-size: 14px;
  font-weight: 600;
  padding: 6px 0 8px;
  border-left: 3px solid;
  padding-left: 10px;
}

.task-category-group .task-list {
  padding: 0;
}

.task-item {
  background: white;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.task-item .task-icon {
  font-size: 32px;
}

.task-item .task-info {
  flex: 1;
}

.task-item .task-name {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 3px;
}

.task-item .task-points {
  font-size: 13px;
  color: #E64A19;
}

.task-item .complete-btn {
  background: linear-gradient(135deg, #E64A19 0%, #E64A19 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
}

/* 完成任务弹窗 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal-content {
  background: white;
  border-radius: 16px;
  max-width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal {
  background: white;
  border-radius: 20px;
  padding: 25px;
  width: 90%;
  max-width: 350px;
}

.modal h3 {
  text-align: center;
  margin-bottom: 20px;
}

.modal .form-group {
  margin-bottom: 15px;
}

.modal label {
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
  color: #666;
}

.modal input, .modal textarea, .modal select {
  width: 100%;
  padding: 12px;
  border: 2px solid #E8DDD5;
  border-radius: 10px;
  font-size: 16px;
  box-sizing: border-box;
}

.modal select {
  background: white;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.modal select:focus {
  border-color: #E64A19;
  outline: none;
}

.modal textarea {
  resize: none;
  height: 80px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions button {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

.modal-actions .cancel {
  background: #F5EDE5;
  color: #666;
}

.modal-actions .confirm {
  background: linear-gradient(135deg, #E64A19 0%, #E64A19 100%);
  color: white;
}

/* 存折页 */
.passbook-list {
  padding: 15px;
}

.passbook-date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0 6px;
}

.passbook-date {
  font-size: 14px;
  font-weight: 600;
  color: #666;
}

.passbook-date-summary {
  font-size: 13px;
  font-weight: 600;
  color: #E64A19;
}

.passbook-day-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 8px;
}

.passbook-item {
  background: white;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.passbook-item .type-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.passbook-item.income .type-icon {
  background: #e8f5e9;
}

.passbook-item.expense .type-icon {
  background: #ffebee;
}

.passbook-item .info {
  flex: 1;
}

.passbook-item .desc {
  font-size: 15px;
  margin-bottom: 3px;
}

.passbook-item .note {
  font-size: 12px;
  color: #E64A19;
  margin-bottom: 3px;
  background: #FFF5EB;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

.passbook-item .date {
  font-size: 12px;
  color: #8D7B6C;
}

.passbook-item .amount {
  font-size: 18px;
  font-weight: bold;
}

.passbook-item.income .amount {
  color: #4caf50;
}

.passbook-item.expense .amount {
  color: #f44336;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #8D7B6C;
}

.empty-state .icon {
  font-size: 60px;
  margin-bottom: 15px;
}

/* 奖励列表 */
.reward-list {
  padding: 15px;
}

.reward-item {
  background: white;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.reward-item .reward-icon {
  font-size: 36px;
}

.reward-item .reward-info {
  flex: 1;
}

.reward-item .reward-name {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 3px;
}

.reward-item .reward-points {
  font-size: 13px;
  color: #f44336;
}

.reward-item .redeem-btn {
  background: linear-gradient(135deg, #ff9800 0%, #f44336 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
}

.reward-item .redeem-btn:disabled {
  background: #C4B8AD;
  cursor: not-allowed;
}

/* 添加按钮 */
.add-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #E64A19 0%, #E64A19 100%);
  color: white;
  border: none;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 底部导航 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -1px 0 rgba(0,0,0,0.08), 0 -4px 16px rgba(0,0,0,0.06);
  max-width: 480px;
  margin: 0 auto;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 0 6px;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease;
}

.nav-item:active {
  transform: scale(0.9);
}

/* 图标容器 */
.nav-icon-wrap {
  width: 44px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  transition: background 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.nav-item .nav-icon {
  font-size: 22px;
  display: block;
  line-height: 1;
  /* 统一让 emoji 以灰度呈现（通过叠加灰色）*/
  filter: grayscale(1) opacity(0.45);
  transition: filter 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item .nav-label {
  font-size: 11px;
  font-weight: 500;
  color: #aaa;
  margin-top: 2px;
  transition: color 0.25s ease, font-weight 0.1s;
  letter-spacing: 0.3px;
}

/* ── 选中态 ── */
.nav-item.active .nav-icon-wrap {
  background: rgba(102, 126, 234, 0.12);
  transform: translateY(-2px);
}

.nav-item.active .nav-icon {
  filter: grayscale(0) opacity(1);
  transform: scale(1.15);
}

.nav-item.active .nav-label {
  color: #E64A19;
  font-weight: 700;
}

/* 选中顶部指示线（小圆点） */
.nav-item.active .nav-icon-wrap::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #E64A19, #E64A19);
  animation: navIndicator 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes navIndicator {
  from { width: 0; opacity: 0; }
  to   { width: 18px; opacity: 1; }
}

/* 页面内容区域（有底部导航时） */
.page-content {
  padding-bottom: 70px;
}

/* 无底部导航时，移除底部间距 */
.no-bottom-nav .page-content {
  padding-bottom: 20px;
}

/* 隐藏 */
.hidden {
  display: none !important;
}

/* 成功提示 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 16px;
  z-index: 200;
}

/* 设置按钮 */
.settings-btn {
  position: absolute;
  right: 20px;
  top: 20px;
  background: rgba(255,255,255,0.9);
  border: none;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
}

/* ========== 设置页（新设计） ========== */
.settings-page {
  padding: 15px;
}

/* 用户卡片 */
.settings-user-card {
  background: linear-gradient(135deg, #FFAB91 0%, #4DB6AC 100%);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  cursor: pointer;
}

.settings-user-avatar {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.settings-user-info {
  flex: 1;
  margin-left: 16px;
}

.settings-user-name {
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
}

.settings-user-phone {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}

.settings-user-arrow {
  font-size: 20px;
  color: rgba(255,255,255,0.8);
}

/* 分组 */
.settings-group {
  margin-bottom: 16px;
}

.settings-group-title {
  font-size: 12px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 4px 8px;
}

/* 卡片 */
.settings-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

/* 条目 */
.settings-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.settings-item:hover { background: #FAFAFA; }
.settings-item:active { background: #F0F0F0; }

.settings-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.settings-item-info {
  flex: 1;
  margin-left: 12px;
}

.settings-item-title {
  font-size: 15px;
  font-weight: 500;
  color: #333;
  margin-bottom: 2px;
}

.settings-item-desc {
  font-size: 12px;
  color: #999;
}

.settings-item-arrow {
  font-size: 22px;
  color: #DDD;
  font-weight: 300;
}

.settings-divider {
  height: 1px;
  background: #F0F0F0;
  margin: 0 16px;
}

/* 退出登录 */
.settings-logout {
  text-align: center;
  color: #FF6B6B;
  font-size: 14px;
  padding: 14px;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 12px;
  margin-top: 8px;
}

.settings-logout:hover { background: #FFF5F5; }
.settings-logout:active { background: #FFE5E5; }

/* 账户设置表单 */
.settings-account-form {
  padding: 15px;
}

.settings-account-form .form-group {
  background: white;
  border-radius: 12px;
  padding: 12px 15px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.settings-account-form label {
  font-size: 13px;
  color: #8D7B6C;
  display: block;
  margin-bottom: 8px;
}

.settings-account-form input {
  width: 100%;
  padding: 10px 0;
  border: none;
  font-size: 16px;
  outline: none;
  background: transparent;
  box-sizing: border-box;
}

.settings-account-form input:disabled {
  background: transparent;
}

.settings-account-form .form-divider {
  height: 15px;
}

.settings-account-form .save-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(255,165,0,0.3);
  cursor: pointer;
}

/* 小朋友管理 */
.settings-kid-list {
  padding: 15px;
}

.settings-kid-item {
  background: white;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer;
}

.settings-kid-item .avatar {
  font-size: 40px;
  width: 60px;
  height: 60px;
  background: #FFF8E7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.settings-kid-item .avatar img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.settings-kid-item .info {
  flex: 1;
}

.settings-kid-item .name {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 3px;
}

.settings-kid-item .points {
  font-size: 14px;
  color: #E64A19;
}

.settings-kid-item .edit-btn {
  background: #F5EDE5;
  border: none;
  padding: 8px 16px;
  border-radius: 16px;
  font-size: 14px;
  color: #666;
}

/* 任务/奖励管理 */
.task-categories-container {
  padding: 15px;
}

.task-category-section {
  margin-bottom: 16px;
}

.category-header .cat-name {
  font-size: 15px;
  font-weight: 600;
  flex: 1;
}

.category-header .cat-count {
  font-size: 12px;
  color: #666;
}

.category-header .add-cat-task {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-task-list {
  padding: 0;
}

.settings-task-item {
  background: white;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.settings-task-item .icon {
  font-size: 28px;
  width: 45px;
  height: 45px;
  background: #FFF8E7;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.settings-task-item .info {
  flex: 1;
}

.settings-task-item .name {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 3px;
}

.settings-task-item .points {
  font-size: 13px;
  color: #E64A19;
}

.settings-task-item .actions {
  display: flex;
  gap: 8px;
}

.settings-task-item .actions button {
  border: none;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 13px;
  cursor: pointer;
  background: #F5EDE5;
  color: #666;
}

.settings-task-item .actions button.danger {
  background: #ffebee;
  color: #f44336;
}

/* 系统预设模板样式 */
.settings-task-item.system-template {
  opacity: 0.85;
  background: #fafafa;
}

.readonly-badge {
  font-size: 11px;
  color: #8D7B6C;
  background: #eee;
  padding: 3px 8px;
  border-radius: 10px;
}

/* 模板库布局（方案A：整齐网格卡片） */
.template-section {
  margin-bottom: 20px;
}

.template-section .section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* 居中分类标题样式 */
.template-section .section-header.cat-header {
  justify-content: center;
  background: #FFF8E7;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.template-section .section-header.cat-header .section-icon {
  font-size: 18px;
}

.template-section .section-header.cat-header .section-title {
  font-size: 15px;
  color: #555;
}

.template-section .section-icon {
  font-size: 16px;
}

.template-section .section-title {
  font-size: 15px;
  color: #333;
  font-weight: 600;
}

.template-section .section-count {
  font-size: 12px;
  color: #8D7B6C;
  background: #F5EDE5;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}

/* 网格卡片布局 */
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* 模板卡片 */
.template-card {
  background: white;
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: all 0.2s;
  position: relative;
  cursor: pointer;
}

.template-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.template-card.system-card {
  background: #f8f8f8;
  cursor: pointer;
}

.template-card.system-card:hover {
  transform: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* 选中状态 */
.template-card.system-card.selected {
  background: #e0e0e0;
  opacity: 0.75;
}

.template-card.system-card.selected .tc-name,
.template-card.system-card.selected .tc-icon,
.template-card.system-card.selected .tc-points {
  opacity: 0.6;
}

/* 选中勾勾 */
.template-card .tc-check {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: #4CAF50;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.template-card .tc-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.template-card .tc-name {
  font-size: 13px;
  color: #333;
  font-weight: 500;
  margin-bottom: 4px;
  line-height: 1.3;
}

.template-card.system-card .tc-name {
  color: #666;
}

.template-card .tc-points {
  font-size: 14px;
  color: #E64A19;
  font-weight: 600;
}

.template-card.system-card .tc-points {
  color: #8b9aff;
}

.template-card .tc-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  color: #8D7B6C;
  background: #e8e8e8;
  padding: 2px 6px;
  border-radius: 8px;
}

/* 心愿卡片特殊样式 */
.template-card.wish-card .tc-points {
  color: #f59e0b;
}

.template-card.wish-card.system-card .tc-points {
  color: #fbbf24;
}

/* 原有样式兼容 */
.template-section .section-title {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  padding-left: 4px;
  font-weight: 500;
}

/* 快捷加分按钮 */
/* 分数步进器（+/-按钮） */
.points-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: #FFF8E7;
  border-radius: 12px;
  padding: 6px 12px;
}

.stepper-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.stepper-btn.minus {
  background: #ffebee;
  color: #e53935;
}

.stepper-btn.plus {
  background: #e8f5e9;
  color: #43a047;
}

.stepper-btn:active {
  transform: scale(0.9);
}

.stepper-btn.minus:active {
  background: #ffcdd2;
}

.stepper-btn.plus:active {
  background: #c8e6c9;
}

.stepper-value {
  min-width: 60px;
  text-align: center;
}

.stepper-value span {
  font-size: 28px;
  font-weight: 700;
  color: #333;
}

.quick-points {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.quick-points button {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #E64A19;
  background: white;
  color: #E64A19;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-points button:hover {
  background: #E64A19;
  color: white;
}

/* 添加按钮（在header里） */
.page-header .add-btn {
  position: static;
  width: auto;
  height: auto;
  padding: 8px 16px;
  border-radius: 16px;
  font-size: 14px;
  box-shadow: none;
}

/* 表情选择器 */
.emoji-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: #FFF8E7;
  border-radius: 12px;
}

.emoji-option {
  font-size: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.emoji-option:hover {
  background: #E8DDD5;
}

.emoji-option.selected {
  background: #E64A19;
  transform: scale(1.1);
}

/* 文件上传样式 */
input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 2px dashed #C4B8AD;
  border-radius: 10px;
  background: #fafafa;
  cursor: pointer;
}

input[type="file"]:hover {
  border-color: #E64A19;
  background: #FFF5EB;
}

.current-avatar-preview {
  text-align: center;
  padding: 15px;
  background: #FFF8E7;
  border-radius: 12px;
  margin-bottom: 10px;
}

.current-avatar-preview img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #E64A19;
}

.current-avatar-preview div {
  font-size: 60px;
}

/* 头像裁剪器 */
.cropper-container {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto;
  background: #F5EDE5;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
}

.cropper-mask {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1;
  pointer-events: none;
}

.cropper-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 999px rgba(0,0,0,0.5);
  border: 2px solid white;
}

#cropper-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  max-width: none;
  max-height: none;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-drag: none;
}

#cropper-img:active {
  cursor: grabbing;
}

.cropper-controls {
  margin-top: 15px;
  padding: 0 20px;
}

.cropper-controls input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: #E8DDD5;
  outline: none;
}

.cropper-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #E64A19;
  cursor: pointer;
}

.cropper-controls input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #E64A19;
  cursor: pointer;
  border: none;
}

/* 设置页面标签切换 */
.settings-tabs {
  display: flex;
  gap: 10px;
  padding: 15px;
  background: white;
  border-bottom: 1px solid #eee;
}

.settings-tabs button {
  flex: 1;
  padding: 12px;
  border: none;
  background: #FFF8E7;
  border-radius: 10px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.settings-tabs button.active {
  background: #E64A19;
  color: white;
}

/* 底部导入操作栏 */
.system-template-page {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.template-scroll-area {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.import-action-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: white;
  border-top: 1px solid #eee;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

.import-action-bar .selected-count {
  flex: 1;
  font-size: 14px;
  color: #666;
}

.import-action-bar .btn-cancel,
.import-action-bar .btn-import {
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
}

.import-action-bar .btn-cancel {
  background: #f0f0f0;
  color: #666;
}

.import-action-bar .btn-import {
  background: #E64A19;
  color: white;
}

/* 心愿导入模态框容器 */
.wish-import-container {
  max-height: 400px;
  overflow-y: auto;
}

/* 心愿分类区块 */
.wish-category-section {
  margin-bottom: 16px;
}

.wish-category-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-align: center;
  padding: 8px 0;
  border-bottom: 1px dashed #eee;
  margin-bottom: 10px;
}

/* 心愿圆形网格（3列） */
.wish-circles-grid-3col {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  padding: 0 4px 12px;
}

/* 心愿圆形块 */
.wish-circle {
  width: calc(33.333% - 8px);
  min-width: 80px;
  padding: 10px 4px;
  border-radius: 10px;
  background: linear-gradient(135deg, #FFF8E7 0%, #FFE4C4 100%);
  border: 2px solid #FFDAB9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  box-sizing: border-box;
  overflow: visible;
}

.wish-circle:active {
  transform: scale(0.95);
}

.wish-circle.selected {
  background: #E8F5E9;
  border-color: #81C784;
}

.wish-circle.selected::after {
  content: '✓';
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background: #4CAF50;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.wish-circle.imported {
  background: #f0f0f0;
  border-color: #ddd;
  cursor: default;
  opacity: 0.6;
}

.wish-circle.imported::before {
  content: '已导入';
  position: absolute;
  bottom: 4px;
  font-size: 9px;
  color: #999;
}

.wish-circle-icon {
  font-size: 24px;
  line-height: 1;
}

.wish-circle-name {
  font-size: 11px;
  color: #333;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wish-circle-points {
  font-size: 10px;
  color: #ff9800;
  font-weight: 600;
}

/* 纯展示的圆形块（系统预设库用） */
.wish-circle-view {
  width: calc(33.333% - 8px);
  min-width: 80px;
  padding: 10px 4px;
  border-radius: 10px;
  background: linear-gradient(135deg, #FFF8E7 0%, #FFE4C4 100%);
  border: 2px solid #FFDAB9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-sizing: border-box;
}

/* ============ 任务圆形块样式 ============ */

/* 任务圆形网格（3列） */
.task-circles-grid-3col {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  padding: 0 4px 12px;
}

/* 任务圆形块 */
.task-circle {
  width: calc(33.333% - 8px);
  min-width: 80px;
  padding: 10px 4px;
  border-radius: 10px;
  background: linear-gradient(135deg, #FFF8E7 0%, #FFE4C4 100%);
  border: 2px solid #FFDAB9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  box-sizing: border-box;
  overflow: visible;
}

.task-circle:active {
  transform: scale(0.95);
}

.task-circle.selected {
  background: #E8F5E9;
  border-color: #4CAF50;
}

.task-circle.selected::after {
  content: '✓';
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background: #4CAF50;
  border-radius: 50%;
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.task-circle.imported {
  background: #f0f0f0;
  border-color: #ddd;
  cursor: default;
  opacity: 0.6;
}

.task-circle.imported::before {
  content: '已导入';
  position: absolute;
  bottom: 4px;
  font-size: 9px;
  color: #999;
}

.task-circle.add-new {
  background: #f5f5f5;
  border: 2px dashed #ccc;
  color: #666;
}

.task-circle.add-new:hover {
  border-color: #81C784;
  color: #4CAF50;
}

.task-circle.empty {
  background: transparent;
  border: 2px dashed #81C784;
  color: #81C784;
}

.task-circle-icon {
  font-size: 24px;
  line-height: 1;
}

.task-circle-name {
  font-size: 11px;
  color: #333;
  text-align: center;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-circle-points {
  font-size: 10px;
  color: #ff9800;
  font-weight: 600;
}

/* 删除按钮 */
.task-circle-delete {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  background: rgba(244, 67, 54, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}

.task-circle:hover .task-circle-delete {
  opacity: 1;
}

/* 任务分类区块 */
.task-category-section {
  margin-bottom: 16px;
}

.task-category-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-align: center;
  padding: 8px 0;
  border-bottom: 1px dashed #eee;
  margin-bottom: 10px;
}

/* 任务导入弹窗容器 */
.task-import-container {
  max-height: 400px;
  overflow-y: auto;
  padding: 5px;
}

/* 标题栏多个按钮 */
.header-actions {
  display: flex;
  gap: 8px;
}

.header-actions .add-btn {
  padding: 6px 12px;
  font-size: 13px;
  background: #26A69A;
  color: white;
  border: none;
  border-radius: 15px;
}

/* 模板列表 */
.template-list {
  padding: 10px;
}

.template-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: #FFFBF5;
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.template-item:hover {
  background: #F5EDE5;
  transform: translateX(5px);
}

.template-item .icon {
  font-size: 28px;
  width: 45px;
  height: 45px;
  background: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.template-item .info {
  flex: 1;
}

.template-item .name {
  font-size: 15px;
  font-weight: 500;
  color: #333;
  margin-bottom: 3px;
}

.template-item .points {
  font-size: 13px;
  color: #E64A19;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #8D7B6C;
  font-size: 14px;
}

/* 底部管理区域 */
.manage-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  margin: 15px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: all 0.2s;
}

.manage-section:active {
  transform: scale(0.98);
  background: #FFFBF5;
}

.manage-section .manage-icon {
  font-size: 20px;
}

.manage-section .manage-text {
  flex: 1;
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.manage-section .manage-arrow {
  font-size: 18px;
  color: #C4B8AD;
}

/* 导入选择列表 */
.template-item.import-selectable {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  background: white;
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.template-item.import-selectable:hover {
  background: #FFFBF5;
}

.template-item.import-selectable.selected {
  background: #e8f5e9;
  border-color: #4caf50;
}

.template-item.import-selectable .checkbox {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.template-item.import-selectable .check-icon {
  font-size: 20px;
  color: #666;
}

.template-item.import-selectable.selected .check-icon {
  color: #4caf50;
}

.template-item.import-selectable .icon {
  font-size: 28px;
  width: 40px;
  text-align: center;
}

.template-item.import-selectable .info {
  flex: 1;
}

.template-item.import-selectable .name {
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

.template-item.import-selectable .points {
  font-size: 13px;
  color: #8D7B6C;
}

.import-summary {
  text-align: center;
}

/* 心愿兑换历史 */
.redemption-list {
  padding: 15px;
}

.redemption-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  background: white;
  border-radius: 12px;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.redemption-item .redemption-icon {
  font-size: 28px;
  width: 40px;
  text-align: center;
}

.redemption-item .redemption-info {
  flex: 1;
}

.redemption-item .redemption-name {
  font-size: 15px;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
}

.redemption-item .redemption-date {
  font-size: 13px;
  color: #8D7B6C;
}

.redemption-item .redemption-points {
  font-size: 16px;
  font-weight: 600;
  color: #dc3545;
}

/* 次级管理按钮 */
.manage-section.secondary {
  background: #FFFBF5;
  box-shadow: none;
  border: 1px solid #F5EDE5;
}

.manage-section.secondary .manage-text {
  color: #666;
  font-weight: 400;
}

/* 导出页面 */
.export-section {
  margin-bottom: 10px;
}

.export-label {
  font-size: 14px;
  color: #666;
}

.export-btn {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  padding: 15px;
  background: white;
  border-radius: 12px;
  border: 2px solid #F5EDE5;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 10px;
}

.export-btn:active {
  transform: scale(0.98);
  border-color: #E64A19;
  background: #FFF5EB;
}

.export-btn .export-icon {
  font-size: 28px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFF8E7;
  border-radius: 12px;
}

.export-btn .export-info {
  flex: 1;
  text-align: left;
}

.export-btn .export-name {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 3px;
}

.export-btn .export-desc {
  font-size: 13px;
  color: #8D7B6C;
}

/* ========== 页面过渡动画 ========== */
#main-content {
  transition: opacity 0.15s ease;
}

#main-content.page-exit {
  opacity: 0;
}

#main-content.page-enter {
  animation: pageSlideIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* ========== 新版登录页样式 ========== */
.login-page-new {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
  background: #FFF8E7;
  position: relative;
  overflow: hidden;
}

/* 背景装饰 */
.bg-decorations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.cloud {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0.6;
  animation: float 20s ease-in-out infinite;
}

.cloud::before, .cloud::after {
  content: '';
  position: absolute;
  background: white;
  border-radius: 50%;
}

.cloud-1 {
  width: 100px;
  height: 40px;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}
.cloud-1::before { width: 50px; height: 50px; top: -25px; left: 15px; }
.cloud-1::after { width: 35px; height: 35px; top: -15px; left: 50px; }

.cloud-2 {
  width: 120px;
  height: 45px;
  top: 15%;
  right: 15%;
  animation-delay: -5s;
}
.cloud-2::before { width: 60px; height: 60px; top: -30px; left: 20px; }
.cloud-2::after { width: 40px; height: 40px; top: -20px; left: 60px; }

.cloud-3 {
  width: 80px;
  height: 35px;
  top: 25%;
  left: 50%;
  animation-delay: -10s;
}
.cloud-3::before { width: 40px; height: 40px; top: -20px; left: 10px; }
.cloud-3::after { width: 30px; height: 30px; top: -12px; left: 40px; }

@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-10px) translateX(5px); }
  50% { transform: translateY(-5px) translateX(-5px); }
  75% { transform: translateY(-15px) translateX(3px); }
}

.star {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #FFD54F;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  animation: twinkle 2s ease-in-out infinite;
}

.star:nth-child(4) { top: 20%; left: 20%; animation-delay: 0s; }
.star:nth-child(5) { top: 30%; right: 25%; animation-delay: 0.5s; width: 6px; height: 6px; }
.star:nth-child(6) { bottom: 30%; left: 15%; animation-delay: 1s; width: 10px; height: 10px; }
.star:nth-child(7) { bottom: 40%; right: 20%; animation-delay: 1.5s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Logo 区域 */
.logo-section {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 30px;
  animation: fadeInDown 0.8s ease-out;
  width: 100%;
}

.logo-wrapper {
  width: 120px;
  height: 120px;
  margin: 0 auto 24px;
  position: relative;
}

.logo-svg {
  width: 120px;
  height: 120px;
}

.app-name {
  font-size: 38px;
  font-weight: 700;
  color: #E64A19;
  letter-spacing: 4px;
  margin-bottom: 8px;
  text-shadow: 2px 2px 0 #FFAB91;
}

/* 副标题轮换 */
.tagline-container {
  height: 32px;
  position: relative;
  overflow: hidden;
}

.tagline {
  position: absolute;
  width: 100%;
  text-align: center;
  font-size: 18px;
  color: #26A69A;
  font-weight: 400;
  letter-spacing: 2px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  white-space: nowrap;
  left: 0;
}

.tagline.active {
  opacity: 1;
  transform: translateY(0);
}

/* 登录表单 */
.login-form {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  background: white;
  border-radius: 24px;
  padding: 30px 24px;
  box-shadow: 0 20px 60px rgba(255, 138, 101, 0.15), 0 8px 25px rgba(0,0,0,0.05);
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.input-group {
  margin-bottom: 16px;
}

.input-field {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #F5F0EB;
  border-radius: 14px;
  font-size: 15px;
  color: #5D4037;
  background: #FFFBF8;
  transition: all 0.3s ease;
  outline: none;
  font-family: inherit;
}

.input-field:focus {
  border-color: #FFAB91;
  background: white;
  box-shadow: 0 0 0 4px rgba(255, 138, 101, 0.1);
}

.input-field::placeholder {
  color: #BDB0A8;
}

.password-toggle {
  position: relative;
}

.toggle-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.toggle-btn:hover {
  opacity: 1;
}

.login-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #FF8A65 0%, #E64A19 100%);
  border: none;
  border-radius: 14px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(255, 138, 101, 0.4);
  margin-top: 8px;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(255, 138, 101, 0.5);
}

.login-btn:active {
  transform: translateY(0);
}

.login-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.register-toggle {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px dashed #E8E0D8;
  text-align: center;
  font-size: 14px;
  color: #8D6E63;
}

.register-toggle a {
  color: #FF8A65;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.register-toggle a:hover {
  text-decoration: underline;
}

.invite-hint {
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(38, 166, 154, 0.1) 0%, rgba(38, 166, 154, 0.05) 100%);
  border-radius: 12px;
  font-size: 13px;
  color: #26A69A;
  margin-bottom: 16px;
  display: none;
}

.invite-hint.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

.invite-hint strong {
  display: block;
  margin-bottom: 4px;
}

.error-msg {
  background: #FFF3F0;
  color: #E53935;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
  animation: shake 0.5s ease;
}

.error-msg.show {
  display: block;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
