:root {
  --green: #2E7D32;
  --green-dark: #1B5E20;
  --green-light: #4CAF50;
  --green-bg: #E8F5E9;
  --orange: #FF8F00;
  --orange-light: #FFB300;
  --red: #D32F2F;
  --blue: #1565C0;
  --text: #212121;
  --text-sec: #757575;
  --border: #E0E0E0;
  --bg: #F5F5F5;
  --white: #FFFFFF;
  --card-shadow: 0 2px 8px rgba(0,0,0,0.10);
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  background: var(--bg);
}

/* ===== 页面容器 ===== */
.page-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 60px;
  overflow: hidden;
}

.page {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  display: none;
  background: var(--bg);
  -webkit-overflow-scrolling: touch;
}
.page.active { display: block; }
.page::-webkit-scrollbar { display: none; }

/* ===== TabBar ===== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: white;
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 100;
  /* 中间凸起缺口曲线 */
  overflow: visible;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

/* SVG 图标容器 */
.tab-icon {
  width: 24px;
  height: 24px;
  color: #BDBDBD;
  transition: color 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tab-icon svg {
  width: 100%;
  height: 100%;
}

.tab-label {
  font-size: 10px;
  color: #BDBDBD;
  transition: color 0.2s;
  font-weight: 500;
}

/* 激活状态 */
.tab-item.active .tab-label { color: var(--green); font-weight: 700; }
.tab-item.active .tab-icon  { color: var(--green); transform: scale(1.1); }
.tab-item:active .tab-icon  { transform: scale(0.92); }

/* ===== 中间商城凸起按钮 ===== */
.tab-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 6px;
  cursor: pointer;
  position: relative;
  z-index: 10;
}

.tab-center-btn {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--green-light), var(--green-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(46, 125, 50, 0.45), 0 2px 6px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 3px solid white;
}
.tab-center-btn svg {
  width: 26px;
  height: 26px;
}
.tab-center:active .tab-center-btn {
  transform: translateX(-50%) scale(0.93);
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.35);
}

/* 商城激活时按钮高亮 */
.tab-center.active .tab-center-btn {
  background: linear-gradient(145deg, #66BB6A, #1B5E20);
  box-shadow: 0 6px 20px rgba(46, 125, 50, 0.55), 0 2px 8px rgba(0,0,0,0.18);
}
.tab-center .tab-label {
  margin-top: 30px; /* 给凸起按钮留出空间 */
  font-size: 10px;
  color: #BDBDBD;
  font-weight: 500;
  transition: color 0.2s;
}
.tab-center.active .tab-label {
  color: var(--green);
  font-weight: 700;
}
