/* 全局样式 - 拾味甄选H5版本 */
:root {
  --color-primary: #FF6B00;
  --color-secondary: #FFD700;
  --color-gradient: linear-gradient(135deg, #FF6B00 0%, #FFD700 100%);
  --color-success: #00B894;
  --color-warning: #FDCB6E;
  --color-danger: #FF3B5C;
  --color-info: #74B9FF;
  
  --bg-page: #F5F6FA;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8F9FC;
  
  --text-title: #1A1A2E;
  --text-body: #4A4A68;
  --text-muted: #8E8EA0;
  --text-placeholder: #B8B8C8;
  
  --border-color: #E8E8F0;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg-page);
  color: var(--text-body);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 70px;
}

/* 底部导航栏 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 8px 0;
  transition: all 0.3s;
}

.nav-item .nav-icon {
  font-size: 22px;
  margin-bottom: 2px;
  transition: all 0.3s;
}

.nav-item .nav-text {
  font-size: 10px;
  color: var(--text-muted);
  transition: all 0.3s;
}

.nav-item.active .nav-icon {
  transform: scale(1.1);
}

.nav-item.active .nav-text {
  color: var(--color-primary);
  font-weight: 600;
}

/* 通用卡片 */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

/* 通用按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-gradient);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255,107,0,0.3);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* 通用section */
.section {
  padding: 0 16px;
  margin-bottom: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-title);
}

.section-more {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state .empty-text {
  font-size: 14px;
}

/* Toast提示 */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  max-width: 80%;
  text-align: center;
}

.toast.show {
  opacity: 1;
}

/* 加载中 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 隐藏滚动条 */
::-webkit-scrollbar {
  display: none;
}

/* 安全区域 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }
}
