/* ====== CSS 变量入口 ====== */
:root {
  --primary-color: #FF6B00;
  --primary-color-light: #FFF3E6;
  --gradient-start: #FF8C38;
  --gradient-end: #FF6B00;
  --header-text-color: #FFFFFF;
  --link-color: #FF6B00;
  --button-bg: #FF6B00;
  --button-text: #FFFFFF;
  --card-bg: #FFFFFF;
  --page-bg: #F5F5F5;
  --text-color: #333333;
  --text-sub: #666666;
  --text-hint: #999999;
  --border-color: #F0F0F0;
}

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

html {
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--page-bg);
  color: var(--text-color);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
  background: none;
  -webkit-appearance: none;
}

textarea {
  resize: none;
}

/* ====== 容器 ====== */
.page-container {
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--page-bg);
  padding-bottom: 60px;
}

@media (min-width: 601px) {
  .page-container {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.06);
  }
}

/* ====== 通用卡片 ====== */
.card {
  background: var(--card-bg);
  border-radius: 9px;
  padding: 14px 12px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.section-title {
  display: block;
  font-size: 15px;
  font-weight: bold;
  color: var(--text-color);
}

/* ====== 返回栏 ====== */
.top-bar {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  background: var(--card-bg);
  position: sticky;
  top: 0;
  z-index: 20;
}

.back-btn {
  font-size: 14px;
  color: var(--text-hint);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.back-btn::before {
  content: '<';
  margin-right: 4px;
}

.top-bar-title {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: bold;
  color: var(--text-color);
  padding-right: 24px;
}

/* ====== Banner 通用 ====== */
.banner {
  width: 100%;
  padding: 16px 18px;
  color: #fff;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.b-left   { display: flex; flex-direction: column; }
.b-center { display: flex; flex-direction: column; align-items: center; }
.b-right  { display: flex; flex-direction: column; align-items: flex-end; }
.b-split  { display: flex; justify-content: space-between; align-items: center; }
.b-split-left  { display: flex; flex-direction: column; }
.b-split-right { display: flex; flex-direction: column; align-items: center; }
.b-vertical    { display: flex; flex-direction: column; align-items: center; padding: 4px 0; }
.b-v-title { margin-bottom: 8px; }
.b-v-bottom { display: flex; align-items: center; }

.b-title-xl { font-size: 22px; font-weight: bold; letter-spacing: 3px; }
.b-title-lg { font-size: 18px; font-weight: bold; line-height: 1.4; }
.b-title-md { font-size: 16px; font-weight: bold; line-height: 1.4; }
.b-title-sm { font-size: 14px; font-weight: bold; line-height: 1.5; opacity: 0.9; }

.b-sub-row {
  display: flex;
  align-items: center;
  margin-top: 6px;
}
.b-sub-center { justify-content: center; }
.b-sub-right  { justify-content: flex-end; }
.b-sub {
  font-size: 12px;
  opacity: 0.9;
  margin-right: 6px;
}
.b-sub-hl { font-weight: bold; opacity: 1; }
.b-dot { margin: 0 4px; opacity: 0.6; }

.b-go {
  background: rgba(255,255,255,0.3);
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: bold;
  margin-left: 4px;
}
.b-go-sm { padding: 1px 6px; font-size: 10px; margin-left: 6px; }
.b-go-lg { padding: 6px 12px; font-size: 14px; border-radius: 14px; margin-bottom: 6px; }

/* ====== 功能宫格 ====== */
.func-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 16px 12px;
  background: var(--card-bg);
  margin-bottom: 10px;
}
.func-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 8px 0;
}
.func-icon {
  margin-bottom: 8px;
  width: 40px;
  height: 40px;
}
.func-name {
  font-size: 12px;
  color: var(--text-color);
}

/* 3 列适配（去掉缴费后剩 3 项） */
.func-grid-col3 .func-item { width: 33.33%; }
.func-grid-col3 .func-icon { width: 48px; height: 48px; }

/* 4 列保留 */
.func-grid-col4 .func-item { width: 25%; }
.func-grid-col4 .func-icon { width: 40px; height: 40px; }

/* 2 列保留 */
.func-grid-col2 .func-item { width: 50%; padding: 10px 0; }
.func-grid-col2 .func-icon { width: 48px; height: 48px; }

/* ====== 资讯列表 ====== */
.news-section { background: var(--card-bg); }
.news-item-list {
  display: flex;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-color);
}
.news-item-list:last-child { border-bottom: none; }
.news-logo {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-right: 12px;
  object-fit: cover;
}
.news-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.news-title {
  font-size: 14px;
  color: var(--text-color);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
}
.news-date, .news-read { font-size: 12px; }

/* ====== 资讯 Grid ====== */
.news-grid {
  display: flex;
  flex-wrap: wrap;
  padding: 8px;
  background: var(--page-bg);
}
.news-card {
  background: var(--card-bg);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.news-card-logo {
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.news-card-body { padding: 8px; }
.news-card-title {
  font-size: 13px;
  color: var(--text-color);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  padding: 0 8px 6px;
}

.news-grid-2 .news-card {
  width: calc(50% - 6px);
  margin-right: 8px;
}
.news-grid-2 .news-card:nth-child(2n) { margin-right: 0; }

.news-grid-3 .news-card {
  width: calc(33.33% - 6px);
  margin-right: 8px;
  padding-bottom: 6px;
}
.news-grid-3 .news-card:nth-child(3n) { margin-right: 0; }
.news-grid-3 .news-card-logo-sm { height: 75px; }
.news-grid-3 .news-card-title-sm {
  font-size: 11px;
  padding: 4px 6px 0;
  -webkit-line-clamp: 2;
}
