/* ===== ME搭子 全局样式 (HTML版) ===== */
/* rpx 已转换为 px (÷2) */

:root {
  --primary: #1989fa;
  --primary-light: rgba(25, 137, 250, 0.12);
  --primary-gradient: linear-gradient(150deg, #69b1ff 0%, #1989fa 48%, #126edf 100%);
  --success: #07c160;
  --danger: #ee0a24;
  --warning: #ff9800;
  --text-primary: #111;
  --text-regular: #333;
  --text-secondary: #646566;
  --text-muted: #999;
  --text-muted2: #969799;
  --bg-page: #f5f6f7;
  --bg-white: #fff;
  --border-light: #f0f0f0;
  --border-lighter: #ebedf0;
  --chip-bg: #f7f8fa;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-elevated: 0 8px 32px rgba(0, 0, 0, 0.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-page);
  font-size: 14px;
  color: var(--text-regular);
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  max-width: 450px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input, textarea, select { font-family: inherit; outline: none; }

/* ===== 通用组件 ===== */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 12px;
  margin: 12px;
  box-shadow: var(--shadow-card);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  font-size: 14px;
  padding: 10px 24px;
  border: none;
  font-weight: 500;
  transition: opacity 0.2s;
}
.btn-primary:active { opacity: 0.85; }

.btn-primary-sm {
  background: var(--primary);
  color: #fff;
  border-radius: 20px;
  font-size: 12px;
  padding: 6px 16px;
  border: none;
  font-weight: 500;
}

.text-muted {
  color: var(--text-muted);
  font-size: 12px;
}

.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: #fff;
}
.badge-upcoming { background: var(--primary); }
.badge-ongoing { background: var(--success); }
.badge-ended { background: var(--text-muted2); }

/* ===== 底部 TabBar ===== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 450px;
  height: 50px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  z-index: 1000;
  padding-bottom: var(--safe-bottom);
}

.tab-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  color: #666;
  font-size: 10px;
  transition: color 0.2s;
  text-decoration: none;
}

.tab-bar-item.active {
  color: var(--primary);
}

.tab-bar-item .tab-icon {
  width: 24px;
  height: 24px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.tab-bar-item .tab-text {
  font-size: 10px;
  line-height: 1.2;
}

/* 页面底部 TabBar 占位 */
.tab-bar-placeholder {
  height: calc(50px + var(--safe-bottom));
}

/* ===== 页面头部导航 ===== */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.nav-header .nav-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.nav-header .nav-back {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--text-primary);
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  padding: 4px 8px;
}

/* ===== 通用区块标题 ===== */
.section { margin-top: 14px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 12px 10px;
  padding: 0 2px;
}

.section-head-left {
  display: flex;
  align-items: center;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.section-more {
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
}

/* 标题左侧图标 */
.head-ico {
  width: 22px;
  height: 22px;
  background: var(--primary);
  border-radius: 6px;
  margin-right: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 24px;
  font-size: 13px;
}

/* ===== 筛选 chips ===== */
.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 34px;
  padding: 0 16px;
  margin-right: 8px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  line-height: 1.25;
  color: var(--text-secondary);
  background: var(--chip-bg);
  border: 1px solid var(--border-lighter);
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-chip--on {
  background: var(--primary-light);
  color: var(--primary);
  border-color: rgba(25, 137, 250, 0.45);
  font-weight: 500;
}

/* ===== 模态框 ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  background: #fff;
  border-radius: 16px;
  width: 85%;
  max-width: 340px;
  padding: 24px;
  text-align: center;
}
.modal-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.modal-content {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}
.modal-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 10px 32px;
  font-size: 14px;
  cursor: pointer;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 3000;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.toast.show { opacity: 1; }

/* ===== 通用列表单元格 ===== */
.cell {
  display: flex;
  align-items: center;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}
.cell:last-child { border-bottom: none; }

.cell-title {
  flex: 1;
  font-size: 15px;
  color: #323233;
}

.chev {
  flex-shrink: 0;
  font-size: 20px;
  color: #c8c9cc;
  font-weight: 300;
  line-height: 1;
  padding-left: 6px;
}

.num-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  line-height: 18px;
  text-align: center;
  font-size: 11px;
  color: #fff;
  background: var(--danger);
  border-radius: 9px;
  margin-right: 4px;
  box-sizing: border-box;
}

/* ===== 表单 ===== */
.form-group {
  padding: 12px;
  background: #fff;
  margin-bottom: 8px;
}
.form-label {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: block;
  font-weight: 500;
}
.form-input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border-lighter);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text-regular);
  background: var(--chip-bg);
}
.form-input:read-only {
  color: var(--text-muted);
}
.form-textarea {
  width: 100%;
  min-height: 100px;
  border: 1px solid var(--border-lighter);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text-regular);
  background: var(--chip-bg);
  resize: vertical;
}
.form-picker {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border-lighter);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  color: var(--text-regular);
  background: var(--chip-bg);
  appearance: auto;
}

/* ===== 页面容器 ===== */
.page-container {
  min-height: 100vh;
  padding-bottom: 24px;
  background: var(--bg-page);
}

.page-with-tab {
  padding-bottom: calc(50px + var(--safe-bottom) + 12px);
}

/* ===== news.html 资讯列表 ===== */
.news-page {
  padding: 10px 12px;
  background: var(--bg-page);
  min-height: 100vh;
}

.news-row {
  display: flex;
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.15s;
}
.news-row:active { transform: scale(0.985); }

.news-cover {
  width: 100px;
  height: 80px;
  border-radius: 6px;
  flex-shrink: 0;
  object-fit: cover;
}

.news-main {
  flex: 1;
  margin-left: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.news-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.news-summary {
  font-size: 12px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  margin-top: 4px;
}

.news-meta {
  display: flex;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted2);
  margin-top: 6px;
  gap: 6px;
}

.news-meta-dot::before {
  content: '·';
  margin: 0 2px;
}

.news-category-tag {
  display: inline-block;
  font-size: 10px;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: var(--radius-pill);
  padding: 1px 8px;
  margin-top: 4px;
  align-self: flex-start;
}

.news-footer {
  text-align: center;
  padding: 16px 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== news-detail.html 资讯详情 ===== */
.news-detail-page {
  background: var(--bg-page);
  min-height: 100vh;
  padding-bottom: 24px;
}

.news-hero {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.news-body-card {
  margin: -12px 12px 0;
  position: relative;
  background: #fff;
  border-radius: 10px 10px 0 0;
  padding: 14px;
  box-shadow: var(--shadow-card);
}

.news-body-card .news-category-tag {
  margin-bottom: 8px;
}

.news-detail-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 10px;
}

.news-detail-meta {
  font-size: 12px;
  color: var(--text-muted2);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.news-author-line {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.news-article-body p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-regular);
  margin-bottom: 14px;
}

/* ===== alumni.html 校友列表 ===== */
.alumni-page {
  padding: 10px 12px;
  background: var(--bg-page);
  min-height: 100vh;
}

.alumni-search-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 20px;
  padding: 8px 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
}

.alumni-search-bar .search-icon {
  font-size: 16px;
  color: var(--text-muted);
  margin-right: 8px;
  flex-shrink: 0;
}

.alumni-search-bar input {
  flex: 1;
  border: none;
  font-size: 14px;
  color: var(--text-regular);
  background: transparent;
}

.alumni-search-bar .clear-btn {
  font-size: 16px;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0 4px;
  display: none;
}
.alumni-search-bar .clear-btn.visible { display: block; }

.alumni-row {
  display: flex;
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.15s;
}
.alumni-row:active { transform: scale(0.985); }

.alumni-avatar {
  width: 100px;
  height: 80px;
  border-radius: 6px;
  flex-shrink: 0;
  object-fit: cover;
}

.alumni-main {
  flex: 1;
  margin-left: 10px;
  min-width: 0;
}

.alumni-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.alumni-summary {
  font-size: 12px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 3px;
}

.alumni-meta {
  font-size: 11px;
  color: var(--text-muted2);
  margin-top: 4px;
}

.alumni-first-tag {
  display: inline-block;
  font-size: 10px;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: var(--radius-pill);
  padding: 1px 8px;
  margin-top: 4px;
}

.alumni-footer {
  text-align: center;
  padding: 16px 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== alumni-detail.html 校友详情 ===== */
.alumni-detail-page {
  background: var(--bg-page);
  min-height: 100vh;
  padding-bottom: 24px;
}

.alumni-hero {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

.alumni-sheet {
  margin: -16px 12px 0;
  position: relative;
  background: #fff;
  border-radius: 12px 12px 0 0;
  padding: 16px 14px;
  box-shadow: var(--shadow-card);
}

.alumni-sheet-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.alumni-sheet-meta {
  font-size: 13px;
  color: var(--text-muted2);
  margin-top: 4px;
}

.alumni-sheet-city {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.alumni-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.alumni-tag-pill {
  display: inline-block;
  font-size: 11px;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
}

.alumni-summary-box {
  background: #f7f8fa;
  border-left: 3px solid var(--primary);
  border-radius: 0 6px 6px 0;
  padding: 10px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.alumni-intro {
  margin-top: 16px;
}

.alumni-intro p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-regular);
  margin-bottom: 14px;
}

.alumni-disclaimer {
  background: #f7f8fa;
  border-radius: 6px;
  padding: 10px;
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== message.html 消息中心 ===== */
.message-page {
  background: var(--bg-page);
  min-height: 100vh;
  padding-bottom: 24px;
}

.message-tabs {
  display: flex;
  background: #fff;
  padding: 8px;
  gap: 6px;
}

.message-tab {
  padding: 4px 10px;
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.message-tab.active {
  background: var(--primary);
  color: #fff;
}

.message-card {
  background: #fff;
  border-radius: 8px;
  margin: 12px;
  padding: 12px;
  box-shadow: var(--shadow-card);
  position: relative;
}

.message-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.message-card-content {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  line-height: 1.5;
}

.message-card-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}

.message-unread-dot {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--danger);
  font-size: 11px;
}

.message-empty {
  text-align: center;
  padding: 48px 24px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== heatmap.html 资源热力图 ===== */
.heatmap-page {
  background: var(--bg-page);
  min-height: 100vh;
  padding-bottom: 24px;
}

.heatmap-tabs {
  display: flex;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.heatmap-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.heatmap-tab.active {
  color: var(--primary);
  font-weight: 600;
  border-bottom-color: var(--primary);
}

.heatmap-chart {
  background: #fff;
  border-radius: 8px;
  margin: 12px;
  padding: 12px;
  min-height: 260px;
  box-shadow: var(--shadow-card);
}

.heatmap-bar-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.heatmap-bar-label {
  width: 80px;
  font-size: 12px;
  color: var(--text-regular);
  flex-shrink: 0;
  text-align: right;
  padding-right: 10px;
}

.heatmap-bar-track {
  flex: 1;
  height: 22px;
  background: #f0f2f5;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.heatmap-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
  display: flex;
  align-items: center;
  padding-left: 6px;
  font-size: 11px;
  color: #fff;
  font-weight: 500;
  min-width: 30px;
}

.heatmap-bar-value {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 8px;
  flex-shrink: 0;
  width: 70px;
}

.heatmap-meta {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 8px 12px;
}

.heatmap-list-card {
  background: #fff;
  border-radius: 8px;
  margin: 0 12px 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.heatmap-list-name {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.heatmap-list-stat {
  font-size: 12px;
  color: var(--primary);
}

/* ===== login.html 登录页 ===== */
.login-page {
  background: var(--bg-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.login-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
  padding-left: 24px;
  padding-right: 24px;
}

.login-logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.login-agreement {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.login-agreement input[type="checkbox"] {
  margin-right: 6px;
  accent-color: var(--primary);
}

.login-agreement a {
  color: var(--primary);
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  max-width: 320px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 22px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.login-btn:active { opacity: 0.85; }
.login-btn:disabled {
  background: #c8c9cc;
  cursor: not-allowed;
}

.login-footer {
  text-align: center;
  padding: 24px;
  font-size: 11px;
  color: var(--text-muted);
}
