/* ─── 全局基础样式 ─── */
/* rem 适配：1rem = 1rpx（375px设备上 = 0.5px） */
html {
  font-size: calc(100vw / 750);
}

/* CSS 变量 */
:root {
  /* 主题色 */
  --color-primary: #66BB6A;
  --color-primary-light: #81C784;
  --color-primary-lighter: #C8E6C9;
  --color-primary-dark: #2D8A50;
  --color-primary-darker: #1B5E20;

  /* 背景色 */
  --bg-dark: #050510;
  --bg-green-overlay: rgba(30,90,40,0.65);
  --bg-green-overlay2: rgba(46,110,55,0.65);
  --bg-card: rgba(255,255,255,0.9);
  --bg-overlay: rgba(0,0,0,0.6);

  /* 文字色 */
  --text-white: #FFFFFF;
  --text-light-green: #C8E6C9;
  --text-muted-green: #5A7A5E;
  --text-dark-green: #2A6A30;

  /* 功能色 */
  --color-gold: #FFD97D;
  --color-gold-bg: #FFE0B2;
  --color-success: #A5D6A7;
  --color-border: #C8E6C9;

  /* 间距 */
  --tabbar-height: 110rem;
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* 字体 */
  --font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: linear-gradient(180deg, var(--bg-green-overlay) 0%, var(--bg-green-overlay2) 100%);
  color: var(--text-white);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

/* 图片默认设置 */
img {
  border: 0;
  vertical-align: middle;
}

/* 按钮重置 */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  -webkit-appearance: none;
}

/* 链接重置 */
a {
  text-decoration: none;
  color: inherit;
}

/* 页面容器 */
.page {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(180deg, var(--bg-green-overlay) 0%, var(--bg-green-overlay2) 100%);
  position: relative;
  overflow: hidden;
}

/* TabBar 页面底部留白 */
#page-home,
#page-brand,
#page-changtaihua {
  padding-bottom: calc(var(--safe-bottom) + var(--tabbar-height));
}

/* 背景图通用 */
.bg-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  object-fit: cover;
}

/* 主滚动区通用 */
.main-scroll {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 10;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* 隐藏滚动条 */
.main-scroll::-webkit-scrollbar {
  display: none;
}

.main-scroll {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
