/* style.css - 命运外卖员网页版全局样式 */

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; }
body {
  --primary-color: #FF6B35;
  --secondary-color: #FF8C42;
  --accent-color: #FFD166;
  --dark-color: #2D3436;
  --light-color: #F5F5F5;
  --text-color: #333333;
  --text-light: #666666;
  --success-color: #00B894;
  --warning-color: #FDCB6E;
  --danger-color: #E17055;
  --card-bg: #ffffff;
  --input-bg: #F9F9F9;
  --border-color: #eeeeee;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-color);
  background-color: var(--light-color);
  min-height: 100vh;
  overflow-x: hidden;
}

/* === 主题皮肤 === */
body.theme-purple {
  --primary-color: #6C5CE7; --secondary-color: #A29BFE; --accent-color: #DFE6E9;
  --dark-color: #2D3436; --light-color: #1E1E2E; --text-color: #E0E0E0; --text-light: #A0A0B0;
  --success-color: #55EFC4; --warning-color: #FFEAA7; --danger-color: #FF7675;
  --card-bg: #2A2A3E; --input-bg: #33334A; --border-color: #3A3A50;
}
body.theme-pink {
  --primary-color: #FD79A8; --secondary-color: #FDCB6E; --accent-color: #FFEAA7;
  --dark-color: #2D3436; --light-color: #FFF0F5; --text-color: #4A4A4A; --text-light: #888888;
  --success-color: #00B894; --warning-color: #FDCB6E; --danger-color: #E17055;
  --card-bg: #ffffff; --input-bg: #FFF5F8; --border-color: #FFE0E8;
}
body.theme-green {
  --primary-color: #00B894; --secondary-color: #55EFC4; --accent-color: #FFEAA7;
  --dark-color: #2D3436; --light-color: #F0FFF4; --text-color: #333333; --text-light: #666666;
  --success-color: #00CEC9; --warning-color: #FDCB6E; --danger-color: #E17055;
  --card-bg: #ffffff; --input-bg: #F5FFF8; --border-color: #E0F5E8;
}

/* === App Shell === */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--light-color);
}

/* === Nav Bar === */
.nav-bar {
  position: sticky; top: 0; z-index: 200;
  background: linear-gradient(135deg, #FF6B35, #FF6B35dd);
  color: #fff; text-align: center;
  padding: 12px 16px;
  font-size: 17px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: background 0.3s ease;
}
.nav-bar .back-btn {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #fff; font-size: 20px;
  cursor: pointer; padding: 4px 8px;
}

/* === Tab Bar === */
.tab-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: flex; background: var(--card-bg);
  border-top: 1px solid #eee; z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0);
  --tab-active-color: #FF6B35;
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 6px 0 4px; cursor: pointer; color: var(--text-light);
  transition: color 0.2s; text-decoration: none;
}
.tab-item.active { color: var(--tab-active-color); }
.tab-icon { font-size: 22px; margin-bottom: 2px; }
.tab-label { font-size: 11px; }

/* === Page Container === */
#page-container {
  padding-bottom: 60px; /* tab bar height */
}

/* === Container === */
.container {
  padding: 16px;
  padding-bottom: 80px;
  min-height: calc(100vh - 110px);
}

/* === 动画 === */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes cardReveal {
  from { opacity: 0; transform: scale(0.9) translateY(15px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}
@keyframes coinSpin {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.8); }
  70% { opacity: 1; transform: scale(1.05); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

.animate-slideUp { animation: slideUp 0.5s ease-out both; }
.animate-cardReveal { animation: cardReveal 0.6s ease-out both; }
.animate-popIn { animation: popIn 0.4s ease-out both; }

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.10s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.20s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.30s; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.40s; }

/* === Pressable === */
.pressable { transition: transform 0.15s ease, opacity 0.15s ease; cursor: pointer; }
.pressable:active { transform: scale(0.96); opacity: 0.85; }

/* === Skeleton === */
.skeleton {
  background: linear-gradient(90deg, var(--border-color) 25%, #E0E0E0 50%, var(--border-color) 75%);
  background-size: 400px 100%; animation: shimmer 1.5s infinite; border-radius: 5px;
}

/* ====================================================================
   首页 (index)
   ==================================================================== */
.index-container {
  padding: 16px;
  padding-bottom: 100px;
  background: linear-gradient(180deg, #FFF5F0 0%, var(--light-color) 30%);
  min-height: calc(100vh - 50px);
}

/* 顶部标题 */
.header { text-align: center; padding: 20px 0 15px; }
.header .title { font-size: 24px; font-weight: bold; color: var(--primary-color); display: block; margin-bottom: 5px; }
.header .subtitle { font-size: 13px; color: var(--text-light); }

/* 命运外卖柜 */
.cabinet {
  width: 200px; height: 200px; margin: 20px auto;
  position: relative;
}
.cabinet-door {
  width: 100%; height: 100%;
  background: linear-gradient(145deg, var(--secondary-color), var(--primary-color));
  border-radius: 15px; overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
  transform-origin: left center;
}
.cabinet-door.open {
  transform: perspective(600px) rotateY(-55deg);
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.2);
}
.cabinet-inner {
  width: 100%; height: 100%;
  display: flex; justify-content: center; align-items: center;
  font-size: 80px;
}
.cabinet-light {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  width: 30px; height: 30px;
  background: var(--accent-color); border-radius: 50%;
  box-shadow: 0 0 15px var(--accent-color);
  animation: pulse 2s ease-in-out infinite;
}
.cabinet-glow {
  position: absolute; top: 10%; left: 10%; width: 80%; height: 80%;
  background: radial-gradient(circle, rgba(255, 209, 102, 0.6) 0%, transparent 70%);
  border-radius: 10px; opacity: 0;
  transition: opacity 0.8s ease 0.3s; pointer-events: none;
}
.cabinet-glow.show { opacity: 1; }

/* 外卖分类 */
.categories { margin: 20px 0; }
.category-title { font-size: 16px; font-weight: bold; color: var(--text-color); margin-bottom: 10px; text-align: center; }
.category-grid { display: flex; flex-direction: column; gap: 10px; }
.category-item-row { display: flex; gap: 10px; }
.category-item {
  flex: 1; background: var(--card-bg); border-radius: 10px;
  padding: 15px 10px; text-align: center;
  transition: transform 0.3s, border-color 0.3s, background 0.3s, box-shadow 0.3s;
  border: 2px solid transparent; box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  cursor: pointer;
}
.category-item.selected {
  border-color: var(--primary-color); background: #FFF5F0;
  transform: scale(1.03); box-shadow: 0 3px 10px rgba(255, 107, 53, 0.2);
}
.category-item:active { transform: scale(0.97); }
.category-icon { font-size: 30px; margin-bottom: 8px; }
.category-name { font-size: 15px; font-weight: bold; color: var(--text-color); display: block; margin-bottom: 4px; }
.category-desc { font-size: 11px; color: var(--text-light); }

/* 签到入口 */
.sign-entry {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #FFF8F0, var(--card-bg));
  border-radius: 10px; padding: 12px 15px; margin: 10px 0;
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.15);
  cursor: pointer;
}
.sign-entry-left { display: flex; align-items: center; flex: 1; }
.sign-icon { font-size: 24px; margin-right: 10px; }
.sign-info { display: flex; flex-direction: column; }
.sign-title { font-size: 15px; font-weight: bold; color: var(--text-color); margin-bottom: 3px; }
.sign-desc { font-size: 12px; color: var(--text-light); }
.sign-desc.signed { color: #00B894; }
.sign-btn-mini {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff; font-size: 13px; font-weight: bold;
  padding: 6px 15px; border-radius: 15px; border: none;
  box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
  cursor: pointer;
}
.sign-btn-mini.signed {
  background: linear-gradient(135deg, #00B894, #55EFC4);
  box-shadow: 0 2px 6px rgba(0, 184, 148, 0.3);
}

/* 烦恼输入框 */
.worry-input {
  background: var(--card-bg); border-radius: 10px;
  padding: 0 15px; margin: 0;
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}
.worry-input.show {
  max-height: 200px; opacity: 1; padding: 15px; margin: 10px 0;
}
.input-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.input-label { font-size: 14px; font-weight: bold; color: var(--text-color); }
.input-count { font-size: 12px; color: var(--text-light); }
.worry-textarea {
  width: 100%; min-height: 50px; font-size: 14px; color: var(--text-color);
  padding: 8px; background: var(--input-bg); border-radius: 5px;
  border: 1px solid var(--border-color); resize: none; outline: none;
  font-family: inherit;
}
.worry-textarea:focus { border-color: var(--primary-color); }

/* 命运币显示 */
.coins-display {
  display: flex; align-items: center; justify-content: center;
  padding: 10px; margin: 10px 0;
}
.coins-icon { font-size: 20px; margin-right: 5px; }
.coin-spin { display: inline-block; animation: coinSpin 0.5s ease-out; }
.coins-text { font-size: 15px; font-weight: bold; color: var(--primary-color); }

/* 下单按钮 */
.order-section {
  position: fixed; bottom: 56px; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  padding: 15px 16px;
  background: linear-gradient(transparent, var(--light-color) 30%);
  z-index: 100;
}
.order-btn {
  width: 100%; height: 50px;
  background: linear-gradient(135deg, #FF6B35, #FF8C42);
  color: #fff; border-radius: 25px; border: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
  cursor: pointer; font-family: inherit;
  transition: transform 0.15s, opacity 0.15s;
}
.order-btn:active:not(.disabled) { transform: scale(0.96); }
.order-btn.disabled { background: linear-gradient(135deg, #CCC, #999); box-shadow: none; cursor: not-allowed; }
.order-btn.ordering { opacity: 0.8; pointer-events: none; }
.order-btn .btn-text { font-size: 18px; font-weight: bold; }
.order-btn .btn-sub { font-size: 11px; opacity: 0.8; margin-top: 2px; }
.order-tip { display: block; text-align: center; font-size: 12px; color: var(--text-light); margin-top: 8px; }

/* 创建/商城入口 */
.create-entry, .shop-entry {
  display: flex; align-items: center;
  background: var(--card-bg); border-radius: 10px; padding: 15px;
  margin: 15px 0; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: background 0.2s;
}
.shop-entry {
  background: linear-gradient(135deg, #FFF8F0, var(--card-bg));
  border: 1px solid rgba(255, 107, 53, 0.1);
}
.create-entry:active, .shop-entry:active { background: #F9F9F9; }
.create-icon, .shop-icon { font-size: 24px; margin-right: 10px; }
.create-info, .shop-info { flex: 1; display: flex; flex-direction: column; }
.create-title, .shop-title { font-size: 15px; font-weight: bold; color: var(--text-color); margin-bottom: 3px; }
.shop-title { color: var(--primary-color); }
.create-desc, .shop-desc { font-size: 12px; color: var(--text-light); }
.create-arrow, .shop-arrow { font-size: 20px; color: var(--text-light); }
.shop-arrow { color: var(--primary-color); }

/* 底部提示 */
.footer-tip { text-align: center; padding: 15px 0; font-size: 13px; color: var(--text-light); }

/* 签到弹窗 */
.sign-modal-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 1000;
  display: flex; justify-content: center; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.sign-modal-mask.show { opacity: 1; pointer-events: auto; }
.sign-modal {
  width: 90%; max-width: 360px; background: var(--card-bg); border-radius: 15px;
  padding: 20px 18px; position: relative; max-height: 85vh; overflow-y: auto;
}
.sign-modal-close {
  position: absolute; top: 10px; right: 12px;
  font-size: 18px; color: var(--text-light); cursor: pointer; padding: 5px;
}
.sign-success { text-align: center; padding: 10px 0 15px; }
.sign-success-icon { font-size: 40px; margin-bottom: 8px; }
.sign-success-title { display: block; font-size: 18px; font-weight: bold; color: var(--text-color); margin-bottom: 5px; }
.sign-success-reward { display: block; font-size: 14px; color: var(--primary-color); font-weight: bold; }

/* 7天进度条 */
.sign-progress { padding: 10px 0 15px; }
.progress-days { display: flex; justify-content: space-between; margin-bottom: 8px; }
.progress-day { display: flex; flex-direction: column; align-items: center; flex: 1; }
.progress-dot {
  width: 24px; height: 24px; border-radius: 50%;
  background: #F0F0F0; color: var(--text-light); font-size: 11px; font-weight: bold;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 4px; transition: all 0.3s;
}
.progress-day.done .progress-dot {
  background: linear-gradient(135deg, #FF6B35, #FF8C42); color: #fff;
  box-shadow: 0 2px 6px rgba(255, 107, 53, 0.3);
}
.progress-day.current .progress-dot {
  background: linear-gradient(135deg, #FFD166, #FF6B35); color: #fff;
  box-shadow: 0 2px 8px rgba(255, 209, 102, 0.5);
  animation: pulse 2s ease-in-out infinite;
}
.progress-label { font-size: 10px; color: var(--text-light); }
.progress-day.done .progress-label { color: var(--primary-color); }
.progress-bar { height: 4px; background: #F0F0F0; border-radius: 2px; overflow: hidden; }
.progress-fill {
  height: 100%; background: linear-gradient(90deg, #FF6B35, #FFD166);
  border-radius: 2px; transition: width 0.5s;
}

/* 日历 */
.sign-calendar { padding: 10px 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); }
.calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.calendar-nav { font-size: 18px; color: var(--text-light); padding: 5px 10px; cursor: pointer; user-select: none; }
.calendar-title { font-size: 14px; font-weight: bold; color: var(--text-color); }
.calendar-weekdays { display: flex; margin-bottom: 5px; }
.weekday-cell { flex: 1; text-align: center; font-size: 11px; color: var(--text-light); padding: 4px 0; }
.calendar-days { display: flex; flex-wrap: wrap; }
.day-cell {
  width: calc(100% / 7); height: 32px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-color); position: relative;
}
.day-cell.empty { visibility: hidden; }
.day-cell.today { color: var(--primary-color); font-weight: bold; }
.day-cell.signed { color: #00B894; }
.sign-mark { font-size: 8px; color: #00B894; margin-top: 1px; }

/* 统计信息 */
.sign-stats { display: flex; align-items: center; justify-content: space-around; padding: 12px 0; }
.stat-item { display: flex; flex-direction: column; align-items: center; }
.stat-value { font-size: 18px; font-weight: bold; color: var(--primary-color); margin-bottom: 3px; }
.stat-label { font-size: 11px; color: var(--text-light); }
.stat-divider { width: 1px; height: 25px; background: var(--border-color); }

/* 签到按钮 */
.sign-submit-btn {
  width: 100%; height: 44px;
  background: linear-gradient(135deg, #FF6B35, #FF8C42);
  color: #fff; border-radius: 22px; border: none;
  font-size: 16px; font-weight: bold;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
  cursor: pointer; font-family: inherit;
}
.sign-submit-btn:active:not(.disabled) { transform: scale(0.96); }
.sign-submit-btn.disabled { background: linear-gradient(135deg, #CCC, #999); box-shadow: none; cursor: not-allowed; }

/* ====================================================================
   详情页 (detail)
   ==================================================================== */
.detail-container {
  padding: 16px;
  background: linear-gradient(180deg, #FFF5F0 0%, #F5F5F5 50%);
  min-height: calc(100vh - 50px);
  padding-bottom: 30px;
}

.delivery-card {
  background: var(--card-bg); border-radius: 15px; padding: 20px;
  margin-bottom: 20px; position: relative; overflow: hidden;
  box-shadow: 0 5px 20px rgba(255, 107, 53, 0.15);
}
.category-tag {
  position: absolute; top: 10px; right: 10px;
  background: linear-gradient(135deg, #FF6B35, #FF8C42);
  color: #fff; padding: 5px 10px; border-radius: 10px;
  display: flex; align-items: center;
}
.tag-icon { font-size: 14px; margin-right: 4px; }
.tag-text { font-size: 12px; font-weight: bold; }

.section { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px dashed var(--border-color); }
.section:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.section-header { display: flex; align-items: center; margin-bottom: 10px; }
.section-icon { font-size: 18px; margin-right: 6px; }
.section-title { font-size: 15px; font-weight: bold; color: var(--text-color); }
.section-content { padding-left: 5px; }

.instruction-section { border-left: 3px solid var(--primary-color); padding-left: 12px; }
.instruction-text { font-size: 17px; color: var(--primary-color); font-weight: bold; line-height: 1.6; }

.fortune-section .section-content {
  background: linear-gradient(135deg, #FFF8E1, #FFF3CD);
  border-radius: 8px; padding: 10px;
}
.fortune-text { font-size: 14px; color: var(--text-light); line-height: 1.6; }

.note-section .section-content {
  background: #FFFEF5; border: 1px dashed #E8DCC8;
  border-radius: 6px; padding: 10px;
}
.note-text { font-size: 14px; color: var(--text-light); font-style: italic; line-height: 1.6; }

/* 装饰 */
.card-decoration { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; }
.decoration-circle { position: absolute; border-radius: 50%; opacity: 0.05; }
.circle-1 { width: 100px; height: 100px; background: #FF6B35; top: -25px; left: -25px; animation: gentleFloat 6s ease-in-out infinite; }
.circle-2 { width: 75px; height: 75px; background: #FFD166; bottom: -15px; right: -15px; animation: gentleFloat 8s ease-in-out infinite 1s; }
.circle-3 { width: 50px; height: 50px; background: #00B894; top: 50%; right: 20%; animation: gentleFloat 7s ease-in-out infinite 2s; }

/* 操作按钮 */
.action-section { display: flex; flex-direction: column; gap: 10px; }
.action-btn {
  width: 100%; height: 50px; border-radius: 25px;
  display: flex; align-items: center; justify-content: center;
  border: none; font-size: 16px; font-weight: bold;
  cursor: pointer; font-family: inherit;
  transition: transform 0.15s;
}
.action-btn:active { transform: scale(0.95); }
.complete-btn { background: linear-gradient(135deg, #00B894, #00CEC9); color: #fff; box-shadow: 0 4px 12px rgba(0, 184, 148, 0.3); }
.share-btn { background: linear-gradient(135deg, #6C5CE7, #A29BFE); color: #fff; box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3); }
.new-btn { background: var(--card-bg); color: var(--primary-color); border: 2px solid var(--primary-color); }
.square-btn { background: linear-gradient(135deg, #FFD166, #FF6B35); color: #fff; box-shadow: 0 4px 12px rgba(255, 109, 53, 0.3); }
.btn-icon { font-size: 18px; margin-right: 6px; }
.btn-reward { font-size: 11px; opacity: 0.8; margin-left: 6px; background: rgba(255,255,255,0.2); padding: 2px 6px; border-radius: 5px; }
.new-btn .btn-reward { background: rgba(255, 107, 53, 0.1); }

/* 分享弹窗 */
.share-modal-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.share-modal-mask.show { opacity: 1; pointer-events: auto; }
.share-modal {
  background: var(--card-bg); border-radius: 15px; padding: 20px;
  width: 85%; max-width: 360px; position: relative;
}
.share-modal-close { position: absolute; top: 10px; right: 15px; font-size: 18px; color: var(--text-light); cursor: pointer; }
.share-modal-title { font-size: 17px; font-weight: bold; color: var(--text-color); margin-bottom: 5px; }
.share-modal-desc { font-size: 12px; color: var(--text-light); margin-bottom: 15px; }
.share-textarea {
  width: 100%; min-height: 80px; padding: 10px;
  background: var(--input-bg); border-radius: 8px; font-size: 14px; color: var(--text-color);
  border: 1px solid var(--border-color); resize: none; outline: none; font-family: inherit;
}
.share-textarea:focus { border-color: var(--primary-color); }
.share-char-count { text-align: right; font-size: 11px; color: var(--text-light); margin-bottom: 12px; }
.share-char-count.warning { color: var(--primary-color); }
.share-submit-btn {
  width: 100%; height: 44px;
  background: linear-gradient(135deg, #FF6B35, #FF8C42);
  color: #fff; border-radius: 22px; border: none;
  font-size: 15px; font-weight: bold; cursor: pointer; font-family: inherit;
}
.share-submit-btn.disabled { background: #CCCCCC; cursor: not-allowed; }

/* ====================================================================
   历史页 (history)
   ==================================================================== */
.history-container {
  padding: 10px 16px;
  background: linear-gradient(180deg, #FFF5F0 0%, var(--light-color) 30%);
  min-height: calc(100vh - 50px);
  padding-bottom: 80px;
}

.user-card {
  background: linear-gradient(135deg, #FF6B35, #FF8C42);
  border-radius: 12px; padding: 18px;
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 15px; box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}
.user-info { display: flex; align-items: center; }
.user-avatar {
  width: 45px; height: 45px; background: rgba(255,255,255,0.3);
  border-radius: 50%; display: flex; justify-content: center; align-items: center;
  margin-right: 12px;
}
.avatar-text { font-size: 20px; color: #fff; font-weight: bold; }
.user-details { display: flex; flex-direction: column; }
.user-title { font-size: 17px; font-weight: bold; color: #fff; margin-bottom: 4px; }
.user-subtitle { font-size: 12px; color: rgba(255,255,255,0.8); }
.coins-badge {
  background: rgba(255,255,255,0.2); border-radius: 15px;
  padding: 8px 12px; display: flex; align-items: center;
}
.coins-badge .coins-icon { font-size: 16px; margin-right: 5px; }
.coins-badge .coins-value { font-size: 18px; font-weight: bold; color: #fff; }

/* 数据操作 */
.data-actions {
  display: flex; gap: 10px; margin-bottom: 15px;
}
.data-btn {
  flex: 1; height: 40px; border-radius: 10px;
  background: var(--card-bg); color: var(--text-light);
  border: 1px solid var(--border-color); font-size: 13px;
  cursor: pointer; font-family: inherit;
  transition: all 0.2s;
}
.data-btn:active { transform: scale(0.96); opacity: 0.8; }

/* 统计 */
.stats-section {
  background: var(--card-bg); border-radius: 10px; padding: 15px;
  display: flex; justify-content: space-around;
  margin-bottom: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.stats-section .stat-item { display: flex; flex-direction: column; align-items: center; }
.stats-section .stat-value { font-size: 20px; font-weight: bold; color: var(--primary-color); margin-bottom: 4px; }
.stats-section .stat-label { font-size: 11px; color: var(--text-light); }

/* 历史区域 */
.history-section {
  background: var(--card-bg); border-radius: 10px; padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-header .section-title { font-size: 16px; font-weight: bold; color: var(--text-color); }
.section-filter { font-size: 13px; color: var(--primary-color); cursor: pointer; }

/* 筛选器 */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.35s, opacity 0.25s, margin 0.35s;
  margin-bottom: 0;
}
.filter-bar.show { max-height: 60px; opacity: 1; margin-bottom: 12px; }
.filter-item {
  padding: 6px 12px; background: var(--light-color); border-radius: 12px;
  font-size: 12px; color: var(--text-light); cursor: pointer; transition: all 0.3s;
}
.filter-item.active { background: var(--primary-color); color: #fff; }

/* 外卖列表 */
.delivery-list { display: flex; flex-direction: column; gap: 10px; }
.delivery-item {
  background: var(--card-bg); border-radius: 10px; padding: 12px;
  border-left: 3px solid transparent; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.delivery-item:active { transform: scale(0.98); }
.item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.item-category { display: flex; align-items: center; }
.item-category .category-icon { font-size: 14px; margin-right: 5px; }
.item-category .category-name { font-size: 13px; font-weight: bold; color: var(--primary-color); }
.item-time { font-size: 11px; color: var(--text-light); }
.item-content { margin-bottom: 8px; }
.item-instruction {
  font-size: 14px; color: var(--text-color); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-footer { padding-top: 8px; border-top: 1px dashed var(--border-color); }
.item-fortune { font-size: 12px; color: var(--text-light); font-style: italic; }

/* 空状态 */
.empty-state { display: flex; flex-direction: column; align-items: center; padding: 30px 0; }
.empty-icon { font-size: 40px; margin-bottom: 10px; animation: gentleFloat 3s ease-in-out infinite; }
.empty-text { font-size: 15px; color: var(--text-color); margin-bottom: 5px; }
.empty-sub { font-size: 13px; color: var(--text-light); margin-bottom: 15px; }
.empty-btn {
  background: linear-gradient(135deg, #FF6B35, #FF8C42); color: #fff;
  border: none; border-radius: 15px; padding: 10px 25px; font-size: 14px;
  cursor: pointer; font-family: inherit;
}

/* 加载更多 */
.load-more { padding: 15px 0; text-align: center; }
.load-btn {
  background: var(--card-bg); color: var(--primary-color); border: 1px solid var(--primary-color);
  border-radius: 15px; padding: 8px 20px; font-size: 13px;
  cursor: pointer; font-family: inherit;
}

/* 分享按钮 */
.share-section {
  position: fixed; bottom: 56px; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  padding: 10px 16px;
  background: linear-gradient(transparent, var(--light-color) 30%);
  z-index: 100;
}
.share-section .share-btn {
  width: 100%; height: 46px;
  background: linear-gradient(135deg, #6C5CE7, #A29BFE);
  color: #fff; border-radius: 23px; border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(108, 92, 231, 0.3);
  cursor: pointer; font-family: inherit;
}
.share-section .share-icon { font-size: 18px; margin-right: 6px; }
.share-section .share-text { font-size: 16px; font-weight: bold; margin-right: 6px; }
.share-section .share-reward { font-size: 11px; opacity: 0.8; background: rgba(255,255,255,0.2); padding: 3px 8px; border-radius: 8px; }

/* 回到顶部 */
.scroll-top-btn {
  position: fixed; right: 16px; bottom: 120px;
  width: 40px; height: 40px; background: var(--card-bg); border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s; z-index: 99;
  cursor: pointer; border: none;
}
.scroll-top-btn.show { opacity: 1; transform: translateY(0); }
.scroll-top-icon { font-size: 18px; color: var(--primary-color); }

/* ====================================================================
   创建页 (create)
   ==================================================================== */
.create-container {
  padding: 16px;
  background: linear-gradient(180deg, #FFF5F0 0%, var(--light-color) 30%);
  min-height: calc(100vh - 50px);
  padding-bottom: 100px;
}
.page-header { text-align: center; padding: 20px 0 15px; }
.page-title { font-size: 20px; font-weight: bold; color: var(--primary-color); display: block; margin-bottom: 5px; }
.page-subtitle { font-size: 13px; color: var(--text-light); }

.create-section {
  background: var(--card-bg); border-radius: 10px; padding: 15px;
  margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.create-section .section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.create-section .section-title { font-size: 15px; font-weight: bold; color: var(--text-color); }
.char-count { font-size: 12px; color: var(--text-light); transition: color 0.3s; }
.char-warning { color: var(--danger-color); font-weight: bold; }

/* 分类选择器 */
.category-selector { display: flex; flex-wrap: wrap; gap: 8px; }
.category-option {
  flex: 1; min-width: 70px; padding: 10px 8px;
  background: var(--input-bg); border-radius: 8px; text-align: center;
  cursor: pointer; transition: all 0.3s; border: 2px solid transparent;
}
.category-option.selected { background: #FFF5F0; border-color: var(--primary-color); box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2); }
.category-option:active { transform: scale(0.95); }
.option-icon { font-size: 20px; display: block; margin-bottom: 5px; }
.option-name { font-size: 12px; color: var(--text-light); }
.category-option.selected .option-name { color: var(--primary-color); font-weight: bold; }

/* 输入区域 */
.input-area {
  width: 100%; min-height: 60px; font-size: 14px; color: var(--text-color);
  padding: 10px; background: var(--input-bg); border-radius: 8px;
  border: 1px solid transparent; resize: none; outline: none;
  transition: border-color 0.3s, box-shadow 0.3s; font-family: inherit;
}
.input-area:focus { border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.1); }
.input-tips { display: flex; align-items: flex-start; padding: 8px; background: #FFF8E1; border-radius: 5px; margin-top: 8px; }
.tip-icon { font-size: 14px; margin-right: 5px; }
.tip-text { font-size: 12px; color: var(--text-light); line-height: 1.5; }

/* 预览 */
.preview-section { margin-bottom: 12px; }
.preview-title { font-size: 15px; font-weight: bold; color: var(--text-color); margin-bottom: 8px; text-align: center; }
.preview-card {
  background: linear-gradient(135deg, #FF6B35, #FF8C42);
  border-radius: 12px; padding: 18px; color: #fff;
}
.preview-category { display: flex; align-items: center; margin-bottom: 10px; }
.preview-icon { font-size: 16px; margin-right: 5px; }
.preview-name { font-size: 14px; font-weight: bold; opacity: 0.9; }
.preview-instruction { font-size: 16px; font-weight: bold; margin-bottom: 10px; line-height: 1.5; }
.preview-fortune { font-size: 13px; opacity: 0.9; margin-bottom: 10px; line-height: 1.5; }
.preview-note { font-size: 13px; font-style: italic; opacity: 0.8; line-height: 1.5; }

/* 提交按钮 */
.submit-section {
  position: fixed; bottom: 56px; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  padding: 10px 16px;
  background: linear-gradient(transparent, var(--light-color) 30%);
  display: flex; gap: 10px; z-index: 100;
}
.preview-btn {
  flex: 1; height: 46px; background: var(--card-bg); color: var(--primary-color);
  border: 2px solid var(--primary-color); border-radius: 23px;
  font-size: 15px; font-weight: bold; cursor: pointer; font-family: inherit;
}
.submit-btn {
  flex: 2; height: 46px;
  background: linear-gradient(135deg, #FF6B35, #FF8C42);
  color: #fff; border: none; border-radius: 23px;
  font-size: 15px; font-weight: bold;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
  cursor: pointer; font-family: inherit;
}
.submit-btn.disabled { background: linear-gradient(135deg, #CCC, #999); box-shadow: none; cursor: not-allowed; }
.submit-btn:active:not(.disabled) { transform: scale(0.96); }

/* ====================================================================
   商城页 (shop)
   ==================================================================== */
.shop-container {
  padding: 16px;
  background: linear-gradient(180deg, #FFF5F0 0%, var(--light-color) 30%);
  min-height: calc(100vh - 50px);
  padding-bottom: 30px;
}
.balance-card {
  background: linear-gradient(135deg, #FF6B35, #FF8C42);
  border-radius: 15px; padding: 20px; color: #fff;
  margin-bottom: 20px; position: relative; overflow: hidden;
}
.balance-card::after {
  content: ''; position: absolute; top: -15px; right: -15px;
  width: 90px; height: 90px; background: rgba(255,255,255,0.1); border-radius: 50%;
}
.balance-icon { font-size: 30px; margin-bottom: 8px; }
.balance-info { display: flex; align-items: baseline; margin-bottom: 6px; }
.balance-label { font-size: 14px; opacity: 0.9; margin-right: 8px; }
.balance-value { font-size: 36px; font-weight: bold; line-height: 1; }
.balance-tip { font-size: 12px; opacity: 0.7; }

.shop-section { margin-bottom: 20px; }
.shop-section .section-title { font-size: 18px; font-weight: bold; color: var(--text-color); margin-bottom: 4px; }
.shop-section .section-desc { font-size: 13px; color: var(--text-light); margin-bottom: 12px; }

.theme-list { display: flex; flex-direction: column; gap: 10px; }
.theme-card {
  background: var(--card-bg); border-radius: 12px; padding: 15px;
  display: flex; align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05); transition: all 0.3s;
}
.theme-card.active { border: 2px solid var(--primary-color); box-shadow: 0 2px 10px rgba(255, 107, 53, 0.2); }
.theme-card.owned { border-left: 3px solid var(--success-color); }
.theme-preview {
  width: 40px; height: 40px; border-radius: 10px; margin-right: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.theme-check { color: #fff; font-size: 18px; font-weight: bold; }
.theme-info { flex: 1; min-width: 0; }
.theme-name { font-size: 15px; font-weight: bold; color: var(--text-color); display: block; margin-bottom: 3px; }
.theme-desc { font-size: 12px; color: var(--text-light); display: block; margin-bottom: 4px; }
.theme-price { display: flex; align-items: center; }
.theme-price .price-icon { font-size: 12px; margin-right: 2px; }
.theme-price .price-value { font-size: 14px; font-weight: bold; color: var(--primary-color); }
.theme-owned-tag { font-size: 11px; color: #00B894; background: rgba(0, 184, 148, 0.1); padding: 2px 6px; border-radius: 4px; }
.theme-btn {
  flex-shrink: 0; font-size: 13px; padding: 6px 14px; border-radius: 15px;
  background: var(--light-color); color: var(--text-light); border: none; cursor: pointer;
  font-family: inherit; line-height: 1.4;
}
.theme-btn.current { background: var(--primary-color); color: #fff; }
.theme-btn.buy-btn { background: linear-gradient(135deg, #FF6B35, #FF8C42); color: #fff; }

/* ====================================================================
   广场页 (square)
   ==================================================================== */
.square-container {
  padding: 16px;
  background: linear-gradient(180deg, #FFF5F0 0%, var(--light-color) 20%);
  min-height: calc(100vh - 50px);
  padding-bottom: 30px;
}
.square-header { margin-bottom: 15px; }
.square-header .header-title { font-size: 20px; font-weight: bold; color: var(--text-color); display: block; margin-bottom: 4px; }
.square-header .header-desc { font-size: 13px; color: var(--text-light); }

.post-list { display: flex; flex-direction: column; gap: 12px; }
.post-card {
  background: var(--card-bg); border-radius: 12px; padding: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.post-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.post-category-tag {
  display: flex; align-items: center; padding: 3px 8px;
  border-radius: 8px; background: #FFF0E6;
}
.post-category-tag .tag-icon { font-size: 12px; margin-right: 3px; }
.post-category-tag .tag-name { font-size: 11px; color: var(--primary-color); font-weight: bold; }
.post-time { font-size: 11px; color: var(--text-light); }

.post-instruction {
  margin-bottom: 8px; padding: 8px 10px;
  background: #FFF8F0; border-radius: 6px; border-left: 2px solid var(--primary-color);
}
.instruction-label { font-size: 11px; color: var(--text-light); display: block; margin-bottom: 3px; }
.instruction-text { font-size: 13px; color: var(--text-light); line-height: 1.5; }

.post-feeling { margin-bottom: 10px; }
.feeling-text { font-size: 15px; color: var(--text-color); line-height: 1.6; font-style: italic; }

.post-footer { display: flex; justify-content: flex-end; }
.like-btn {
  display: flex; align-items: center; padding: 4px 10px;
  border-radius: 12px; background: var(--light-color); cursor: pointer;
  transition: all 0.2s; border: none;
}
.like-btn:active { transform: scale(0.9); }
.like-btn.liked { background: #FFF0F0; }
.like-icon { font-size: 14px; margin-right: 4px; }
.like-count { font-size: 12px; color: var(--text-light); }
.like-btn.liked .like-count { color: #FF6B6B; }

.loading-more { text-align: center; padding: 20px 0; }
.loading-text { font-size: 13px; color: var(--text-light); }
.no-more { text-align: center; padding: 20px 0; }
.no-more-text { font-size: 12px; color: var(--text-light); }

.square-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; }
.square-empty .empty-icon { font-size: 50px; margin-bottom: 15px; }
.square-empty .empty-title { font-size: 16px; color: var(--text-light); margin-bottom: 6px; }
.square-empty .empty-desc { font-size: 13px; color: var(--text-light); }

/* ====================================================================
   登录页 (login)
   ==================================================================== */
.login-container {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; padding: 30px 20px;
  background: linear-gradient(180deg, #FFF5F0 0%, var(--light-color) 50%);
}
.login-header { text-align: center; margin-bottom: 30px; }
.login-logo { font-size: 60px; margin-bottom: 10px; animation: gentleFloat 3s ease-in-out infinite; }
.login-title { display: block; font-size: 24px; font-weight: bold; color: var(--primary-color); margin-bottom: 5px; }
.login-subtitle { display: block; font-size: 13px; color: var(--text-light); }

.login-form {
  width: 100%; max-width: 320px;
  background: var(--card-bg); border-radius: 15px; padding: 25px 20px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}
.form-tabs { display: flex; margin-bottom: 20px; border-bottom: 2px solid var(--border-color); }
.form-tab {
  flex: 1; padding: 10px; background: none; border: none;
  font-size: 15px; color: var(--text-light); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: all 0.3s; font-family: inherit;
}
.form-tab.active { color: var(--primary-color); border-bottom-color: var(--primary-color); font-weight: bold; }
.form-group { margin-bottom: 15px; }
.form-input {
  width: 100%; height: 44px; padding: 0 12px;
  background: var(--input-bg); border: 1px solid var(--border-color);
  border-radius: 10px; font-size: 14px; color: var(--text-color);
  outline: none; transition: border-color 0.3s; font-family: inherit;
}
.form-input:focus { border-color: var(--primary-color); }
.login-btn {
  width: 100%; height: 46px;
  background: linear-gradient(135deg, #FF6B35, #FF8C42);
  color: #fff; border: none; border-radius: 23px;
  font-size: 16px; font-weight: bold; cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
  transition: transform 0.15s; font-family: inherit;
}
.login-btn:active:not(:disabled) { transform: scale(0.96); }
.login-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.form-tip {
  text-align: center; font-size: 13px; color: var(--danger-color);
  margin-top: 12px; opacity: 0; transition: opacity 0.3s;
}
.form-tip.show { opacity: 1; }
.login-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-light); }

/* ====================================================================
   全局 UI 组件
   ==================================================================== */

/* Toast */
.toast {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 9999; pointer-events: none; opacity: 0; transition: opacity 0.3s;
}
.toast.show { opacity: 1; }
.toast-content {
  background: rgba(0,0,0,0.75); color: #fff; padding: 10px 20px;
  border-radius: 8px; font-size: 14px;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}

/* Modal */
.modal-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 9999;
  display: flex; justify-content: center; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-mask.show { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--card-bg); border-radius: 12px; padding: 20px;
  width: 80%; max-width: 320px; text-align: center;
}
.modal-title { font-size: 17px; font-weight: bold; color: var(--text-color); margin-bottom: 10px; }
.modal-content { font-size: 14px; color: var(--text-light); margin-bottom: 20px; line-height: 1.5; }
.modal-buttons { display: flex; gap: 10px; }
.modal-btn {
  flex: 1; height: 40px; border-radius: 20px; border: none;
  font-size: 15px; cursor: pointer; font-family: inherit;
}
.modal-btn.cancel { background: var(--light-color); color: var(--text-light); }
.modal-btn.confirm { background: linear-gradient(135deg, #FF6B35, #FF8C42); color: #fff; }

/* Loading */
.loading-mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3); z-index: 9999;
  display: flex; justify-content: center; align-items: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.loading-mask.show { opacity: 1; pointer-events: auto; }
.loading-box {
  background: rgba(0,0,0,0.75); color: #fff; padding: 20px 30px;
  border-radius: 12px; text-align: center;
}
.loading-spinner {
  width: 30px; height: 30px; margin: 0 auto 10px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 14px; }

/* === 响应式 === */
@media (min-width: 480px) {
  .app-shell { border-left: 1px solid #eee; border-right: 1px solid #eee; }
}
