/* ========== 基础重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: #f5f7fa; color: #333; line-height: 1.5; overflow-x: hidden; }
.page { min-height: 100vh; width: 100%; max-width: 480px; margin: 0 auto; background: #f5f7fa; position: relative; }
.hidden { display: none !important; }

/* ========== 登录页 ========== */
#login-page { background: linear-gradient(135deg, #2d7d46 0%, #4caf50 100%); display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-box { background: #fff; border-radius: 20px; padding: 40px 30px; width: 100%; max-width: 360px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.logo-area { text-align: center; margin-bottom: 30px; }
.logo-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 10px; border: 3px solid #4caf50; }
.logo-area h1 { font-size: 24px; color: #2d7d46; font-weight: 700; }
.logo-area p { font-size: 14px; color: #666; margin-top: 5px; }
.form-group { margin-bottom: 20px; }
.form-group input { width: 100%; padding: 14px 16px; border: 1px solid #e0e0e0; border-radius: 12px; font-size: 16px; outline: none; transition: border 0.3s; }
.form-group input:focus { border-color: #4caf50; }
.code-group { display: flex; gap: 10px; }
.code-group input { flex: 1; }
.code-group button { padding: 14px 16px; border: none; border-radius: 12px; background: #4caf50; color: #fff; font-size: 14px; white-space: nowrap; cursor: pointer; }
.code-group button:disabled { background: #ccc; }
.btn-primary { width: 100%; padding: 16px; border: none; border-radius: 12px; background: linear-gradient(135deg, #2d7d46, #4caf50); color: #fff; font-size: 18px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 12px rgba(45,125,70,0.3); }
.tip { text-align: center; font-size: 12px; color: #999; margin-top: 15px; }

/* ========== Banner ========== */
.banner { background: linear-gradient(135deg, #1e88e5 0%, #42a5f5 50%, #90caf9 100%); color: #fff; padding: 0 0 30px; position: relative; overflow: hidden; }
.banner::before { content: ''; position: absolute; top: -50%; right: -20%; width: 300px; height: 300px; background: rgba(255,255,255,0.1); border-radius: 50%; }
.banner-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; position: relative; z-index: 2; }
.back-btn, .more-btn { font-size: 20px; cursor: pointer; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.banner-header h2 { font-size: 16px; font-weight: 500; }
.banner-body { padding: 20px 20px 0; position: relative; z-index: 2; }
.banner-badge { display: inline-block; background: #ff9800; color: #fff; padding: 4px 12px; border-radius: 20px; font-size: 12px; margin-bottom: 10px; font-weight: 600; }
.banner-title { font-size: 32px; font-weight: 800; margin-bottom: 8px; text-shadow: 2px 2px 4px rgba(0,0,0,0.1); }
.banner-sub { font-size: 15px; opacity: 0.95; margin-bottom: 20px; }
.great-tag { display: inline-block; background: #fff; color: #1e88e5; padding: 6px 14px; border-radius: 20px; font-size: 14px; font-weight: 700; margin-bottom: 15px; }
.banner-buttons { display: flex; gap: 10px; margin-top: 10px; }
.btn-rule, .btn-record { padding: 8px 16px; border-radius: 20px; border: none; font-size: 13px; cursor: pointer; }
.btn-rule { background: #ff7043; color: #fff; }
.btn-record { background: rgba(255,255,255,0.25); color: #fff; }

/* ========== 倒计时 ========== */
.countdown-card { background: #fff; margin: -20px 15px 15px; border-radius: 16px; padding: 20px; display: flex; align-items: center; gap: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); position: relative; z-index: 3; }
.countdown-icon { font-size: 36px; }
.countdown-text { flex: 1; }
.countdown-text p { font-size: 14px; color: #666; margin-bottom: 8px; }
.countdown-numbers { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.countdown-numbers .num { display: inline-block; background: #fff3e0; color: #e65100; padding: 6px 10px; border-radius: 8px; font-size: 22px; font-weight: 700; min-width: 36px; text-align: center; }
.countdown-numbers em { font-size: 13px; color: #666; font-style: normal; margin-right: 8px; }

/* ========== 步骤 ========== */
.steps-section { background: #fff; margin: 0 15px 15px; border-radius: 16px; padding: 25px 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.steps-section h3 { font-size: 18px; text-align: center; margin-bottom: 20px; color: #333; }
.steps { display: flex; align-items: center; justify-content: center; gap: 15px; }
.step { text-align: center; flex: 1; max-width: 140px; }
.step-tag { display: inline-block; background: #e8f5e9; color: #2d7d46; padding: 4px 10px; border-radius: 12px; font-size: 12px; margin-bottom: 10px; }
.step-icon { font-size: 40px; margin-bottom: 8px; }
.step p { font-size: 13px; color: #555; line-height: 1.6; }
.step-arrow { font-size: 28px; color: #ff7043; font-weight: 700; }

/* ========== 海报轮播 ========== */
.poster-section { background: #fff; margin: 0 15px 15px; border-radius: 16px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.poster-section h3 { font-size: 16px; margin-bottom: 15px; color: #333; }
.poster-carousel { overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; position: relative; }
.poster-carousel::-webkit-scrollbar { display: none; }
.poster-track { display: flex; gap: 12px; padding: 0 calc((100% - 260px) / 2); }
.poster-item { min-width: 260px; flex-shrink: 0; scroll-snap-align: center; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.1); position: relative; }
.poster-item img { width: 100%; height: 360px; object-fit: cover; display: block; }
.poster-item.selected { box-shadow: 0 0 0 3px #4caf50; }
.poster-select-badge { position: absolute; top: 10px; right: 10px; background: #4caf50; color: #fff; padding: 4px 10px; border-radius: 12px; font-size: 12px; }
.poster-dots { display: flex; justify-content: center; gap: 8px; margin-top: 15px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #ddd; cursor: pointer; transition: all 0.3s; }
.dot.active { background: #4caf50; width: 20px; border-radius: 4px; }
.poster-tip { text-align: center; font-size: 12px; color: #999; margin-top: 10px; }

/* ========== 上传区域 ========== */
.upload-section { background: #fff; margin: 0 15px 15px; border-radius: 16px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.upload-section h3 { font-size: 16px; margin-bottom: 15px; color: #333; }
.upload-box { width: 100%; height: 200px; border: 2px dashed #ddd; border-radius: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; overflow: hidden; background: #fafafa; }
.upload-box:active { border-color: #4caf50; background: #f1f8e9; }
.upload-placeholder { text-align: center; color: #999; }
.upload-placeholder .plus { font-size: 48px; display: block; line-height: 1; margin-bottom: 5px; }
#upload-preview { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.upload-require { margin-top: 15px; padding: 15px; background: #fff8e1; border-radius: 10px; }
.upload-require p { font-size: 14px; font-weight: 600; color: #f57c00; margin-bottom: 8px; }
.upload-require ul { padding-left: 18px; }
.upload-require li { font-size: 13px; color: #666; margin-bottom: 5px; }

/* ========== 记录统计 ========== */
.record-section { background: #fff; margin: 0 15px 15px; border-radius: 16px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.record-section h3 { font-size: 16px; text-align: center; margin-bottom: 20px; color: #333; }
.record-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.record-item { text-align: center; padding: 15px; background: #f5f7fa; border-radius: 12px; }
.record-num { font-size: 32px; color: #ff7043; font-weight: 700; }
.record-item em { font-size: 14px; color: #666; font-style: normal; }
.record-item p { font-size: 13px; color: #888; margin-top: 5px; }

/* ========== 任务进度 ========== */
.task-progress { background: #fff; margin: 0 15px 15px; border-radius: 16px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.task-progress h3 { font-size: 16px; margin-bottom: 15px; color: #333; }
.progress-bar { height: 12px; background: #e0e0e0; border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #4caf50, #8bc34a); border-radius: 6px; transition: width 0.5s ease; width: 0%; }
.task-progress p { font-size: 14px; color: #666; text-align: center; }
.task-progress span { color: #ff7043; font-weight: 700; }

/* ========== 积分卡片 ========== */
.points-card { background: linear-gradient(135deg, #ff7043, #ffab91); margin: 0 15px 15px; border-radius: 16px; padding: 20px; display: flex; align-items: center; color: #fff; box-shadow: 0 4px 15px rgba(255,112,67,0.3); cursor: pointer; }
.points-icon { font-size: 40px; margin-right: 15px; }
.points-info { flex: 1; }
.points-info p { font-size: 14px; opacity: 0.9; }
.points-info h2 { font-size: 36px; font-weight: 800; }
.points-arrow { font-size: 28px; opacity: 0.8; }

/* ========== 页面头部 ========== */
.page-header { display: flex; align-items: center; padding: 12px 15px; background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 100; }
.page-header h2 { flex: 1; text-align: center; font-size: 18px; font-weight: 600; margin-right: 36px; }

/* ========== 记录列表 ========== */
.record-list { padding: 15px; }
.record-card { background: #fff; border-radius: 12px; padding: 15px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.record-card-header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.record-card-header span { font-size: 14px; color: #666; }
.record-status { padding: 4px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; }
.status-pending { background: #fff3e0; color: #e65100; }
.status-approved { background: #e8f5e9; color: #2d7d46; }
.status-rejected { background: #ffebee; color: #c62828; }
.record-card img { width: 100%; border-radius: 8px; margin-top: 10px; max-height: 300px; object-fit: cover; }
.record-points { margin-top: 10px; font-size: 14px; color: #ff7043; font-weight: 600; }

/* ========== 积分页面 ========== */
.points-header { background: linear-gradient(135deg, #1b5e20, #2d7d46, #4caf50); padding: 50px 20px 40px; text-align: center; color: #fff; border-radius: 0 0 30px 30px; }
.points-big { font-size: 72px; font-weight: 800; line-height: 1; }
.points-big p { font-size: 16px; opacity: 0.9; margin-top: 5px; }
.points-history { padding: 15px; }
.points-history-item { background: #fff; border-radius: 10px; padding: 15px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 5px rgba(0,0,0,0.05); }
.points-history-item .ph-left { font-size: 14px; }
.points-history-item .ph-right { font-size: 18px; font-weight: 700; }
.ph-positive { color: #4caf50; }
.ph-negative { color: #ff7043; }
.gift-list { padding: 0 15px 30px; }
.gift-card { background: #fff; border-radius: 12px; padding: 15px; margin-bottom: 12px; display: flex; gap: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.gift-card img { width: 80px; height: 80px; border-radius: 10px; object-fit: cover; background: #f5f5f5; cursor: pointer; transition: transform 0.2s; }
.gift-card img:hover { transform: scale(1.05); }
.gift-info { flex: 1; }
.gift-info h4 { font-size: 16px; margin-bottom: 5px; }
.gift-info p { font-size: 13px; color: #666; margin-bottom: 8px; }
.gift-points { color: #ff7043; font-weight: 700; font-size: 16px; }
.gift-btn { padding: 8px 16px; border: none; border-radius: 20px; background: #4caf50; color: #fff; font-size: 13px; cursor: pointer; white-space: nowrap; }
.gift-btn:disabled { background: #ccc; }

/* ========== 底部导航 ========== */
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; display: flex; border-top: 1px solid #eee; padding: 8px 0; z-index: 999; box-shadow: 0 -2px 10px rgba(0,0,0,0.05); }
.nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; border: none; background: none; font-size: 12px; color: #666; cursor: pointer; padding: 5px; }
.nav-btn.nav-primary { background: linear-gradient(135deg, #ff7043, #ff8a65); color: #fff; border-radius: 24px; margin: 0 10px; padding: 8px 0; box-shadow: 0 4px 12px rgba(255,112,67,0.3); }
.nav-icon { font-size: 20px; }

/* ========== 弹窗 ========== */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1000; display: flex; align-items: flex-end; justify-content: center; }
.modal-content { background: #fff; width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; max-height: 85vh; overflow-y: auto; animation: slideUp 0.3s ease; }
.share-modal-content { border-radius: 20px; margin: 20px; max-height: 80vh; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #eee; position: sticky; top: 0; background: #fff; z-index: 10; }
.modal-header h3 { font-size: 18px; }
.close-btn { font-size: 24px; cursor: pointer; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; }
.modal-body { padding: 20px; }
.modal-body h4 { font-size: 15px; color: #2d7d46; margin: 15px 0 8px; }
.modal-body p { font-size: 14px; color: #555; line-height: 1.8; }
#share-poster-img { width: 100%; border-radius: 12px; margin-bottom: 20px; }
.share-actions { display: flex; gap: 15px; margin-bottom: 15px; }
.share-actions button { flex: 1; padding: 14px; border: none; border-radius: 12px; font-size: 15px; cursor: pointer; font-weight: 600; }
.btn-save { background: #e3f2fd; color: #1976d2; }
.btn-wechat { background: #e8f5e9; color: #2d7d46; }
.share-tip { text-align: center; font-size: 13px; color: #999; }

/* ========== Toast ========== */
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.8); color: #fff; padding: 14px 24px; border-radius: 24px; font-size: 15px; z-index: 2000; pointer-events: none; }

/* ========== 响应式 ========== */
@media (max-width: 360px) {
  .banner-title { font-size: 26px; }
  .countdown-numbers .num { font-size: 18px; padding: 4px 8px; }
  .poster-item { min-width: 220px; flex-shrink: 0; scroll-snap-align: center; }
  .poster-item img { height: 300px; }
}

/* ========== 推荐分销页面 ========== */
.referral-code-box {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: #f5f7fa;
  border-radius: 12px;
  margin-bottom: 15px;
}

.referral-code {
  flex: 1;
  font-size: 28px;
  font-weight: 700;
  color: #2d7d46;
  letter-spacing: 4px;
}

.invite-link-box {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: #f5f7fa;
  border-radius: 12px;
}

.invite-link {
  flex: 1;
  font-size: 13px;
  color: #666;
  word-break: break-all;
}

.referral-list {
  padding: 10px 0;
}

.referral-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
}

.referral-card:last-child {
  border-bottom: none;
}

.ref-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ref-name {
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.ref-time {
  font-size: 12px;
  color: #999;
}

.ref-reward {
  color: #ff7043;
  font-weight: 700;
  font-size: 16px;
}

.commission-list {
  padding: 10px 0;
}

.commission-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
}

.commission-card:last-child {
  border-bottom: none;
}

.comm-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.comm-product {
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

.comm-buyer {
  font-size: 13px;
  color: #666;
}

.comm-time {
  font-size: 12px;
  color: #999;
}

.comm-amount {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.comm-rate {
  font-size: 12px;
  color: #999;
}

.comm-value {
  color: #ff7043;
  font-weight: 700;
  font-size: 18px;
}

/* ========== 自定义创意海报 ========== */
.custom-poster-section {
  background: #fff;
  margin: 0 15px 15px;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.custom-poster-desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.6;
}

.custom-poster-upload {
  width: 100%;
  min-height: 200px;
  border: 2px dashed #ddd;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #fafafa;
  position: relative;
  overflow: hidden;
}

.custom-poster-upload:active {
  border-color: #4caf50;
  background: #f1f8e9;
}

.custom-poster-upload .upload-placeholder {
  text-align: center;
  padding: 40px 20px;
}

.custom-poster-upload .plus {
  font-size: 48px;
  display: block;
  margin-bottom: 10px;
}

.custom-poster-upload p {
  font-size: 16px;
  color: #666;
  margin-bottom: 5px;
}

.custom-poster-upload .upload-hint {
  font-size: 12px;
  color: #999;
}

.custom-poster-upload img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  border-radius: 12px;
}

.custom-poster-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.custom-poster-actions button {
  flex: 1;
  margin: 0;
}

.custom-poster-tips {
  margin-top: 15px;
  padding: 15px;
  background: #e8f5e9;
  border-radius: 10px;
}

.custom-poster-tips p {
  font-size: 14px;
  font-weight: 600;
  color: #2d7d46;
  margin-bottom: 8px;
}

.custom-poster-tips ul {
  padding-left: 18px;
  margin: 0;
}

.custom-poster-tips li {
  font-size: 13px;
  color: #555;
  margin-bottom: 5px;
}

/* 自定义海报在轮播中的样式 */
.custom-poster-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ff7043;
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* ========== 顶部广告条 ========== */
.top-banner {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  overflow: hidden;
}

.top-banner .banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* 登录页广告条 */
#login-page .top-banner {
  margin-bottom: 20px;
}

/* 主页面广告条 */
#main-page .top-banner {
  margin-bottom: -20px;
  position: relative;
  z-index: 2;
}

/* 邀请页广告条 */
.invite-page .top-banner {
  margin-bottom: 0;
}

/* 后台广告条 */
.top-banner-admin {
  width: 100%;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
}

.top-banner-admin .banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ========== 图片预览遮罩 ========== */
.image-preview-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.image-preview-overlay img {
  max-width: 90%;
  max-height: 85%;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}
.image-preview-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.image-preview-close:hover {
  background: rgba(255,255,255,0.4);
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ========== 用户信息栏 + 宝箱入口 ========== */
.user-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  background: #fff;
  margin: 0 15px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: relative;
  z-index: 3;
}
.user-info-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  font-size: 32px;
  line-height: 1;
}
.user-detail {
  display: flex;
  flex-direction: column;
}
.user-name {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}
.user-phone {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}
.treasure-icon {
  font-size: 18px;
}
.treasure-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  background: #f44336;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 4px rgba(244,67,54,0.4);
}

/* ========== 宝箱列表弹窗 ========== */
.treasure-modal-content {
  border-radius: 20px;
  margin: 20px;
  max-height: 80vh;
}
.treasure-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.treasure-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #f9fafb;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}
.treasure-item:active {
  background: #f0f1f3;
}
.treasure-item.unread {
  background: #fff8e1;
  border: 1px solid #ffe082;
}
.treasure-item-icon {
  font-size: 32px;
  flex-shrink: 0;
}
.treasure-item-info {
  flex: 1;
  min-width: 0;
}
.treasure-item-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.treasure-item-desc {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.treasure-item-time {
  font-size: 11px;
  color: #bbb;
  margin-top: 2px;
}
.treasure-item-arrow {
  font-size: 16px;
  color: #ccc;
  flex-shrink: 0;
}
.treasure-unread-dot {
  position: absolute;
  top: 10px;
  right: 30px;
  width: 8px;
  height: 8px;
  background: #f44336;
  border-radius: 50%;
}
.treasure-empty {
  text-align: center;
  color: #999;
  padding: 40px 0;
  font-size: 14px;
}

/* ========== 宝箱详情弹窗 ========== */
.treasure-detail-content {
  border-radius: 20px;
  margin: 20px;
  max-height: 80vh;
}
.treasure-detail-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.treasure-detail-type {
  font-size: 13px;
  color: #ff9800;
  background: #fff3e0;
  padding: 4px 12px;
  border-radius: 15px;
  margin-bottom: 15px;
}
.treasure-detail-title {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
  text-align: center;
}
.treasure-detail-desc {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.6;
}
.treasure-detail-media {
  width: 100%;
  max-width: 320px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.treasure-detail-media video,
.treasure-detail-media audio {
  width: 100%;
  border-radius: 12px;
}
.treasure-detail-media img {
  width: 100%;
  border-radius: 12px;
}
.treasure-detail-link {
  display: inline-block;
  padding: 12px 30px;
  background: linear-gradient(135deg, #2d7d46, #4caf50);
  color: #fff;
  border-radius: 25px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(45,125,70,0.3);
  transition: transform 0.2s;
}
.treasure-detail-link:active {
  transform: scale(0.95);
}
.treasure-detail-pdf {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: 12px;
}

/* ========== 我的记录 - 用户信息栏 ========== */
#record-user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  margin: 0 15px 15px;
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.record-user-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.record-user-nickname {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}
.record-user-phone {
  font-size: 13px;
  color: #999;
}
.record-user-points {
  font-size: 14px;
  color: #2d7d46;
  font-weight: 500;
}
.record-user-points .points-value {
  font-size: 20px;
  font-weight: 700;
  color: #e65100;
}

/* ========== 宝箱图标 ========== */
#record-treasure-box {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
#record-treasure-box.gray {
  background: #e0e0e0;
  color: #9e9e9e;
  cursor: not-allowed;
  box-shadow: none;
}
#record-treasure-box.active {
  background: linear-gradient(135deg, #ff9800, #ffc107);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255,152,0,0.4);
  animation: treasure-glow 2s ease-in-out infinite;
}
#record-treasure-box.active:active {
  transform: scale(0.9);
}
@keyframes treasure-glow {
  0%, 100% { box-shadow: 0 4px 15px rgba(255,152,0,0.4); }
  50% { box-shadow: 0 4px 25px rgba(255,152,0,0.7); }
}
#record-treasure-box .treasure-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: #f44336;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}
