/* 全局重置 */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #f5f6f8;
  color: #333;
  font-size: 14px;
  padding-bottom: 60px;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 600px; margin: 0 auto; min-height: 100vh; background: #f5f6f8; }

/* 通用头部 */
.header { background: #fff; padding: 12px 15px; display: flex; align-items: center; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 99; }
.header .back { width: 30px; font-size: 20px; cursor: pointer; color: #333; }
.header .title { flex: 1; text-align: center; font-size: 16px; font-weight: bold; }
.header .right { width: 30px; text-align: right; font-size: 13px; color: #999; cursor: pointer; }

/* 通用卡片 */
.card { background: #fff; border-radius: 10px; margin: 10px; padding: 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.03); }
.card-title { font-size: 15px; font-weight: bold; color: #333; margin-bottom: 12px; }

/* 通用按钮 */
.btn { display: inline-block; padding: 10px 20px; border-radius: 22px; border: none; font-size: 15px; cursor: pointer; background: #ee0a24; color: #fff; font-weight: bold; }
.btn:disabled { background: #ccc; cursor: not-allowed; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-primary { background: #3b82f6; }
.btn-gold { background: linear-gradient(135deg, #d4b06a, #b8935a); }
.btn-plain { background: #f5f5f5; color: #666; }

/* 输入框 */
.input { width: 100%; border: 1px solid #eee; border-radius: 8px; padding: 10px 12px; font-size: 14px; outline: none; background: #fafafa; }
.input:focus { border-color: #ee0a24; background: #fff; }
.form-group { margin-bottom: 15px; }
.form-label { font-size: 13px; color: #666; margin-bottom: 6px; display: block; }

/* 底部导航栏 */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; max-width: 600px; margin: 0 auto; height: 55px; background: #fff; border-top: 1px solid #eee; display: flex; justify-content: space-around; align-items: center; z-index: 100; }
.tabbar a { flex: 1; text-align: center; text-decoration: none; color: #999; font-size: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.tabbar a.active { color: #ee0a24; font-weight: bold; }
.tabbar .icon { font-size: 20px; margin-bottom: 2px; }

/* 价格 */
.price { color: #ee0a24; font-weight: bold; }
.price::before { content: '¥'; font-size: 0.8em; }

/* 空状态 */
.empty { text-align: center; padding: 60px 20px; color: #999; font-size: 14px; }
.empty::before { content: '📭'; display: block; font-size: 40px; margin-bottom: 10px; opacity: 0.6; }

/* 加载中 */
.loading { text-align: center; padding: 40px 20px; color: #999; font-size: 14px; }
.loading::before { content: ''; display: inline-block; width: 20px; height: 20px; border: 2px solid #eee; border-top-color: #ee0a24; border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 8px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.8); color: #fff; padding: 12px 22px; border-radius: 8px; font-size: 14px; z-index: 9999; max-width: 80%; text-align: center; }

/* Modal 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 999; padding: 20px; }
.modal-content { background: #fff; border-radius: 12px; padding: 20px; width: 100%; max-width: 340px; max-height: 85vh; overflow-y: auto; }

/* 徽标 */
.badge { display: inline-block; padding: 2px 6px; border-radius: 6px; font-size: 10px; color: #fff; margin-left: 4px; vertical-align: middle; }
.badge-NORMAL { background: #909399; }
.badge-JINCAO { background: #07c160; }
.badge-XIANCAO { background: #ff8c00; }
.badge-JINXI { background: #ee0a24; }