:root {
  /* ================= 大厂极简高级：天空蓝 + 纯白设计系统 ================= */
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #f0f9ff;
  --primary-subtle: #e0f2fe;
  --primary-border: #bae6fd;

  --bg-main: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #ffffff;

  --border-light: #e2e8f0;
  --border-subtle: #f1f5f9;

  --text-main: #0f172a;
  --text-regular: #334155;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 12px -2px rgba(2, 132, 199, 0.08), 0 2px 6px -2px rgba(0, 0, 0, 0.04);

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Noto Sans SC', 'Segoe UI', Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #ffffff;
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(at 50% 0%, #f0f9ff 0%, #ffffff 60%);
  background-attachment: fixed;
}

/* 微妙的环境渐变 */
.bg-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  filter: blur(140px);
  border-radius: 50%;
  opacity: 0.45;
}

.blob-1 {
  top: -15%;
  left: 20%;
  width: 500px;
  height: 500px;
  background: #bae6fd;
}

.blob-2 {
  bottom: 5%;
  right: 15%;
  width: 450px;
  height: 450px;
  background: #e0f2fe;
}

/* 页面容器（最大宽度收窄，更紧凑精炼） */
.app-container {
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

/* 顶部导航 */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  padding: 0.6rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  box-shadow: var(--shadow-xs);
  white-space: nowrap;
  flex-wrap: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary-hover);
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-text {
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-svg {
  color: var(--primary);
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

/* 专业大厂规范按钮 */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-ghost:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-border);
}

/* Hero 区域 */
.hero {
  text-align: center;
  padding: 0.75rem 0 1.75rem;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--primary-hover);
  margin-bottom: 0.85rem;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.6);
  animation: pulseAnim 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulseAnim {
  to {
    box-shadow: 0 0 0 8px rgba(2, 132, 199, 0);
  }
}

.hero-title {
  font-size: clamp(1.6rem, 3.8vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.hero-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 1.25rem;
  line-height: 1.5;
}

/* ================= 跑马灯播报（彻底解决重叠、超慢匀速、悬停暂停） ================= */
.ticker-wrapper {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  padding: 0.3rem 0.35rem 0.3rem 0.4rem;
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.ticker-badge {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--primary-light);
  color: var(--primary-hover);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  z-index: 2;
}

.ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 15px, black calc(100% - 15px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15px, black calc(100% - 15px), transparent);
  margin-left: 0.5rem;
}

.ticker-content {
  display: inline-block;
  white-space: nowrap;
  font-size: 0.84rem;
  color: var(--text-regular);
  /* 超慢 60s 舒适滚动 */
  animation: tickerSlide 60s linear infinite;
  padding-left: 100%;
}

.ticker-wrapper:hover .ticker-content {
  animation-play-state: paused;
}

@keyframes tickerSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* 统计看板（扁平紧凑大厂风） */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.2s ease;
}

.stat-card:hover {
  border-color: var(--primary-border);
}

.stat-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
}

.stat-info {
  min-width: 0;
}

.stat-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Tab 切换栏 */
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tab-group {
  display: flex;
  background: rgba(255, 255, 255, 0.8);
  padding: 0.2rem;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.tab-btn.active {
  background: var(--bg-surface);
  color: var(--primary-hover);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.refresh-indicator {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.refresh-spinner {
  width: 10px;
  height: 10px;
  border: 2px solid var(--primary-subtle);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ================= 紧凑大厂风【列表条目】 ================= */
.donations-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* 单条列表行 (高度适中，精致细腻) */
.donation-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.donation-row:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
  background: #ffffff;
}

/* 排名高亮微质感 */
.donation-row.rank-1 {
  border-left: 3px solid var(--primary);
  background: linear-gradient(to right, #f0f9ff 0%, #ffffff 60%);
}

.donation-row.rank-2 {
  border-left: 3px solid #64748b;
  background: linear-gradient(to right, #f8fafc 0%, #ffffff 60%);
}

.donation-row.rank-3 {
  border-left: 3px solid #94a3b8;
  background: linear-gradient(to right, #f8fafc 0%, #ffffff 60%);
}

.row-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.row-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.row-avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-hover);
  font-weight: 600;
  font-size: 0.85rem;
}

.row-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.row-name-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.donor-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-badge {
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  line-height: 1.2;
}

.rank-1-badge { background: var(--primary-light); color: var(--primary-hover); border: 1px solid var(--primary-border); }
.rank-2-badge { background: #ffffff; color: #475569; border: 1px solid var(--border-light); }
.rank-3-badge { background: #ffffff; color: #64748b; border: 1px solid var(--border-light); }

.donor-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.platform-pill {
  background: #ffffff;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
  font-size: 0.68rem;
}

.row-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.amount-num {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-hover);
  font-variant-numeric: tabular-nums;
}

/* 留言寄语条 (纯白背景 + 微蓝边框) */
.row-message {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-left: 2px solid var(--primary);
  border-radius: 4px;
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
  color: var(--text-regular);
  word-break: break-all;
}

/* 紧凑倒计时状态条 */
.row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border-subtle);
}

.expiry-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-faint);
}

.expiry-time-text {
  font-weight: 500;
  color: var(--primary);
}

.expiry-bar-bg {
  flex: 1;
  max-width: 140px;
  height: 3px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.expiry-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 1s linear;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-light);
  border-radius: 12px;
}

.empty-icon-wrap {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state h3 {
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.empty-state p {
  color: var(--text-muted);
  max-width: 380px;
  margin: 0 auto 1.25rem;
  font-size: 0.85rem;
}

.empty-btn {
  margin: 0 auto;
}

/* 赞赏弹窗 Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  padding: 1rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  width: 100%;
  max-width: 380px;
  padding: 1.75rem;
  position: relative;
  transform: scale(0.96);
  transition: transform 0.2s ease;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-icon-badge {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.5rem;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.modal-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.qr-tabs {
  display: flex;
  gap: 0.35rem;
  background: #ffffff;
  padding: 0.2rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border: 1px solid var(--border-light);
}

.qr-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.4rem;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.qr-tab.active {
  background: var(--primary-light);
  color: var(--primary-hover);
  font-weight: 600;
  border: 1px solid var(--primary-border);
  box-shadow: var(--shadow-xs);
}

.qr-box {
  width: 190px;
  height: 190px;
  margin: 0 auto 0.6rem;
  background: #ffffff;
  border-radius: 12px;
  padding: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.qr-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-faint);
  font-size: 0.75rem;
  text-align: center;
}

.qr-tip {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.fast-amounts {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.amount-pill {
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-hover);
}

/* 法律合规与免责提示 */
.legal-notice {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.legal-item {
  display: flex;
  align-items: flex-start;
  gap: 0.35rem;
}

.legal-item svg {
  min-width: 12px;
  margin-top: 2px;
  color: var(--primary);
}

.legal-item strong {
  color: var(--text-regular);
}

/* 页脚 */
.footer {
  text-align: center;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-faint);
  font-size: 0.78rem;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-dot {
  margin: 0 0.35rem;
  color: var(--text-faint);
}

/* 响应式适配 */
@media (max-width: 640px) {
  .app-container {
    padding: 1rem 0.85rem 3rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-title {
    font-size: 1.5rem;
  }
}

/* ==========================================================================
   🎨 活力街头艺术涂鸦墙体系 (Colorful Street Graffiti Wall Theme)
   ========================================================================== */

/* 1. 真实纯白砖墙肌理 (Realistic White Brick Wall Pattern) */
body.theme-graffiti {
  background-color: #fdfdfd;
  background-image: 
    linear-gradient(rgba(14, 165, 233, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 8% 15%, rgba(244, 63, 94, 0.18) 0%, transparent 35%),
    radial-gradient(circle at 92% 25%, rgba(56, 189, 248, 0.25) 0%, transparent 40%),
    radial-gradient(circle at 50% 85%, rgba(250, 204, 21, 0.22) 0%, transparent 45%),
    radial-gradient(circle at 85% 90%, rgba(168, 85, 247, 0.2) 0%, transparent 35%);
  background-size: 60px 30px, 60px 30px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
}

/* 涂鸦品牌标志：粉蓝波普鲜活字（紧凑自适应） */
body.theme-graffiti .brand-text {
  font-family: 'Permanent Marker', 'Rubik Doodle Shadow', 'ZCOOL KuaiLe', cursive, sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #0284c7 0%, #ec4899 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(1px 1px 0px rgba(14, 165, 233, 0.3));
  transform: rotate(-1deg);
  white-space: nowrap;
}

/* 涂鸦主标题：多重鲜明喷漆渐变（告别黑色） */
body.theme-graffiti .hero-title {
  font-family: 'ZCOOL KuaiLe', 'Permanent Marker', sans-serif;
  font-size: clamp(2.1rem, 5.2vw, 3.2rem);
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 35%, #ec4899 75%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(3px 3px 0px #fef08a) drop-shadow(4px 4px 0px rgba(2, 132, 199, 0.2));
  transform: rotate(-0.5deg);
  margin-bottom: 0.75rem;
}

body.theme-graffiti .hero-desc {
  font-family: 'Noto Sans SC', sans-serif;
  color: #334155;
}

/* 涂鸦动态状态条：荧光胶囊 */
body.theme-graffiti .badge-live {
  background: linear-gradient(135deg, #fef08a, #fed7aa);
  border: 2px solid #f59e0b;
  color: #9a3412;
  box-shadow: 2px 3px 0px #f59e0b;
  transform: rotate(-1.2deg);
}

/* ================= 2. 4个统计面板：4种完全不同的形态与多彩撞色 ================= */
body.theme-graffiti .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

/* 板块1：蔚蓝波普胶囊贴纸 (圆润胶囊形态) */
body.theme-graffiti .stat-card:nth-child(1) {
  background: #e0f2fe;
  border: 2.5px solid #0284c7;
  border-radius: 24px 8px 24px 8px;
  box-shadow: 4px 5px 0px #0284c7;
  transform: rotate(-1.5deg);
}
body.theme-graffiti .stat-card:nth-child(1) .stat-value { color: #0369a1; }
body.theme-graffiti .stat-card:nth-child(1) .stat-icon { background: #bae6fd; color: #0284c7; border: 2px solid #0284c7; }

/* 板块2：柠檬亮黄手绘菱角 (斜角不对称形态) */
body.theme-graffiti .stat-card:nth-child(2) {
  background: #fef9c3;
  border: 2.5px solid #d97706;
  border-radius: 8px 26px 8px 26px;
  box-shadow: 4px 5px 0px #d97706;
  transform: rotate(1.8deg);
}
body.theme-graffiti .stat-card:nth-child(2) .stat-value { color: #b45309; }
body.theme-graffiti .stat-card:nth-child(2) .stat-icon { background: #fde047; color: #b45309; border: 2px solid #d97706; }

/* 板块3：樱花粉酷玩邮票 (锯齿微圆形态) */
body.theme-graffiti .stat-card:nth-child(3) {
  background: #fce7f3;
  border: 2.5px solid #db2777;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 4px 5px 0px #db2777;
  transform: rotate(-1deg);
}
body.theme-graffiti .stat-card:nth-child(3) .stat-value { color: #be185d; }
body.theme-graffiti .stat-card:nth-child(3) .stat-icon { background: #fbcfe8; color: #db2777; border: 2px solid #db2777; }

/* 板块4：薄荷绿能量徽章 (大弧度切角形态) */
body.theme-graffiti .stat-card:nth-child(4) {
  background: #dcfce7;
  border: 2.5px solid #16a34a;
  border-radius: 4px 20px 20px 20px;
  box-shadow: 4px 5px 0px #16a34a;
  transform: rotate(1.2deg);
}
body.theme-graffiti .stat-card:nth-child(4) .stat-value { color: #15803d; }
body.theme-graffiti .stat-card:nth-child(4) .stat-icon { background: #bbf7d0; color: #16a34a; border: 2px solid #16a34a; }

body.theme-graffiti .stat-card:hover {
  transform: translateY(-4px) scale(1.04) rotate(0deg) !important;
  box-shadow: 6px 8px 0px rgba(0, 0, 0, 0.3) !important;
}

/* ================= 3. 涂鸦墙网格容器与多样化贴纸卡片 ================= */
body.theme-graffiti .donations-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem 1.4rem;
  padding: 1.5rem 0.5rem 3rem;
}

/* 涂鸦卡片基础结构 */
.graffiti-note {
  position: relative;
  background: #ffffff;
  padding: 1.35rem 1.25rem 1.15rem;
  transition: all 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 185px;
  overflow: visible;
}

.graffiti-note:hover {
  transform: translateY(-8px) scale(1.05) rotate(0deg) !important;
  z-index: 20;
}

/* 🎨 六种截然不同的形状与艺术涂鸦撞色 */

/* 1. 柠檬黄：斜角便签 + 暖橙投影 */
.graffiti-color-yellow {
  background: #fef08a;
  border: 2.5px solid #d97706;
  border-radius: 20px 6px 22px 8px;
  box-shadow: 5px 6px 0px #d97706;
}
.graffiti-color-yellow::before { content: '⚡ TOP CHOICE'; background: #d97706; color: #ffffff; }
.graffiti-color-yellow .graffiti-amount { color: #b45309; text-shadow: 2px 2px 0px #fef9c3; }
.graffiti-color-yellow .graffiti-avatar { background: #fef9c3; color: #b45309; border-color: #d97706; }
.graffiti-color-yellow .graffiti-bottom { border-top-color: rgba(217, 119, 6, 0.4); }

/* 2. 蔚蓝：圆润波普贴纸 + 宝蓝投影 */
.graffiti-color-blue {
  background: #bae6fd;
  border: 2.5px solid #0284c7;
  border-radius: 8px 24px 8px 24px;
  box-shadow: 5px 6px 0px #0284c7;
}
.graffiti-color-blue::before { content: '✦ SUPER STAR'; background: #0284c7; color: #ffffff; }
.graffiti-color-blue .graffiti-amount { color: #0369a1; text-shadow: 2px 2px 0px #e0f2fe; }
.graffiti-color-blue .graffiti-avatar { background: #e0f2fe; color: #0284c7; border-color: #0284c7; }
.graffiti-color-blue .graffiti-bottom { border-top-color: rgba(2, 132, 199, 0.4); }

/* 3. 樱花粉：俏皮气泡贴纸 + 玫红投影 */
.graffiti-color-pink {
  background: #fbcfe8;
  border: 2.5px solid #db2777;
  border-radius: 24px 24px 6px 24px;
  box-shadow: 5px 6px 0px #db2777;
}
.graffiti-color-pink::before { content: '♥ BIG LOVE'; background: #db2777; color: #ffffff; }
.graffiti-color-pink .graffiti-amount { color: #be185d; text-shadow: 2px 2px 0px #fce7f3; }
.graffiti-color-pink .graffiti-avatar { background: #fce7f3; color: #db2777; border-color: #db2777; }
.graffiti-color-pink .graffiti-bottom { border-top-color: rgba(219, 39, 119, 0.4); }

/* 4. 薄荷绿：能量卡片 + 翠绿投影 */
.graffiti-color-green {
  background: #bbf7d0;
  border: 2.5px solid #16a34a;
  border-radius: 16px 6px 18px 16px;
  box-shadow: 5px 6px 0px #16a34a;
}
.graffiti-color-green::before { content: '🚀 POWER UP'; background: #16a34a; color: #ffffff; }
.graffiti-color-green .graffiti-amount { color: #15803d; text-shadow: 2px 2px 0px #dcfce7; }
.graffiti-color-green .graffiti-avatar { background: #dcfce7; color: #16a34a; border-color: #16a34a; }
.graffiti-color-green .graffiti-bottom { border-top-color: rgba(22, 163, 74, 0.4); }

/* 5. 梦幻紫：街头艺术贴 + 魅紫投影 */
.graffiti-color-purple {
  background: #e9d5ff;
  border: 2.5px solid #9333ea;
  border-radius: 6px 22px 22px 6px;
  box-shadow: 5px 6px 0px #9333ea;
}
.graffiti-color-purple::before { content: '★ RESPECT'; background: #9333ea; color: #ffffff; }
.graffiti-color-purple .graffiti-amount { color: #7e22ce; text-shadow: 2px 2px 0px #f3e8ff; }
.graffiti-color-purple .graffiti-avatar { background: #f3e8ff; color: #9333ea; border-color: #9333ea; }
.graffiti-color-purple .graffiti-bottom { border-top-color: rgba(147, 51, 234, 0.4); }

/* 6. 暖橙：活力胶囊 + 焦糖橙投影 */
.graffiti-color-orange {
  background: #fed7aa;
  border: 2.5px solid #ea580c;
  border-radius: 20px 20px 20px 4px;
  box-shadow: 5px 6px 0px #ea580c;
}
.graffiti-color-orange::before { content: '🔥 AWESOME'; background: #ea580c; color: #ffffff; }
.graffiti-color-orange .graffiti-amount { color: #c2410c; text-shadow: 2px 2px 0px #ffedd5; }
.graffiti-color-orange .graffiti-avatar { background: #ffedd5; color: #ea580c; border-color: #ea580c; }
.graffiti-color-orange .graffiti-bottom { border-top-color: rgba(234, 88, 12, 0.4); }

/* 顶部便签小标牌 */
.graffiti-note::before {
  position: absolute;
  top: -11px;
  left: 18px;
  font-family: 'Permanent Marker', sans-serif;
  font-size: 0.62rem;
  padding: 0.15rem 0.55rem;
  border-radius: 4px;
  box-shadow: 1px 2px 0px rgba(0, 0, 0, 0.15);
  transform: rotate(-3deg);
  z-index: 2;
  letter-spacing: 0.06em;
}

/* 涂鸦卡片头部 */
.graffiti-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.graffiti-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.graffiti-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.05rem;
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.15);
  font-family: 'Permanent Marker', cursive;
  transform: rotate(-4deg);
}

.graffiti-name {
  font-weight: 900;
  font-size: 1.02rem;
  color: #0f172a;
  font-family: 'ZCOOL KuaiLe', 'Noto Sans SC', sans-serif;
  letter-spacing: 0.02em;
}

.graffiti-badge {
  display: inline-block;
  background: #f43f5e;
  color: #ffffff;
  border: 1.5px solid #0f172a;
  padding: 0.06rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  box-shadow: 1.5px 1.5px 0px rgba(0, 0, 0, 0.2);
  transform: rotate(-4deg);
  font-family: 'ZCOOL KuaiLe', sans-serif;
}

/* 手绘金额 */
.graffiti-amount {
  font-size: 1.65rem;
  font-weight: 900;
  font-family: 'Permanent Marker', 'Sedgwick Ave Display', cursive, sans-serif;
  transform: rotate(3deg);
  letter-spacing: -0.01em;
}

/* 涂鸦留言 */
.graffiti-msg {
  font-family: 'ZCOOL KuaiLe', 'Caveat', cursive, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.35;
  margin: 0.45rem 0 0.85rem;
  word-break: break-all;
  position: relative;
}

/* 底部状态 */
.graffiti-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding-top: 0.45rem;
  border-top: 2px dashed;
}

.graffiti-tag {
  background: #ffffff;
  border: 1.5px solid #0f172a;
  padding: 0.08rem 0.45rem;
  border-radius: 6px;
  box-shadow: 1.5px 1.5px 0px rgba(0, 0, 0, 0.15);
  font-size: 0.72rem;
  font-weight: 800;
  color: #0f172a;
}

.graffiti-time {
  font-weight: 800;
  font-family: 'Inter', sans-serif;
  color: #475569;
}

/* ==========================================================================
   📱 移动端自适应专项优化 (Mobile Responsiveness Enhancements)
   ========================================================================== */

@media (max-width: 640px) {
  /* 整体容器与留白 */
  .app-container {
    padding: 0.75rem 0.75rem 3rem;
  }

  /* 顶部导航栏微调：严格单行不换行、两端分离、不重叠 */
  .header {
    padding: 0.45rem 0.65rem;
    margin-bottom: 1.25rem;
    gap: 0.5rem;
    white-space: nowrap;
    flex-wrap: nowrap;
  }

  .brand {
    font-size: 0.85rem;
    gap: 0.35rem;
    flex-shrink: 0;
  }

  .brand-logo-svg {
    width: 26px !important;
    height: 26px !important;
    flex-shrink: 0;
  }

  .brand-text {
    white-space: nowrap;
    font-size: 0.95rem;
  }

  body.theme-graffiti .brand-text {
    font-size: 0.98rem;
    letter-spacing: 0.01em;
  }

  .header-actions {
    gap: 0.35rem;
    flex-shrink: 0;
    white-space: nowrap;
    flex-wrap: nowrap;
  }

  .btn-primary, .btn-ghost {
    padding: 0.35rem 0.55rem;
    font-size: 0.78rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Hero 区域 */
  .hero {
    padding: 0.5rem 0 1.25rem;
  }

  .hero-title {
    font-size: 1.45rem;
    line-height: 1.35;
    margin-bottom: 0.4rem;
  }

  body.theme-graffiti .hero-title {
    font-size: 1.75rem;
  }

  .hero-desc {
    font-size: 0.82rem;
    padding: 0 0.25rem;
    margin-bottom: 1rem;
  }

  .badge-live {
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
    max-width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }

  /* 跑马灯 */
  .ticker-wrapper {
    padding: 0.25rem 0.35rem;
  }

  .ticker-badge {
    padding: 0.2rem 0.5rem;
    font-size: 0.72rem;
  }

  .ticker-content {
    font-size: 0.78rem;
  }

  /* 统计卡片网格：手机端 2 列优雅排布 */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.25rem;
  }

  body.theme-graffiti .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
    margin-bottom: 1.5rem;
  }

  .stat-card {
    padding: 0.65rem 0.75rem;
    gap: 0.5rem;
  }

  .stat-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 6px;
  }

  .stat-icon svg {
    width: 16px;
    height: 16px;
  }

  .stat-value {
    font-size: 1rem;
  }

  .stat-label {
    font-size: 0.7rem;
  }

  /* 列表与 Tab */
  .content-header {
    margin-bottom: 0.65rem;
  }

  .tab-btn {
    padding: 0.3rem 0.65rem;
    font-size: 0.78rem;
  }

  /* 极简模式下的单条列表 */
  .donation-row {
    padding: 0.65rem 0.75rem;
    gap: 0.4rem;
  }

  .row-avatar {
    width: 30px;
    height: 30px;
    min-width: 30px;
    font-size: 0.8rem;
  }

  .donor-name {
    font-size: 0.85rem;
  }

  .amount-num {
    font-size: 1.05rem;
  }

  .row-message {
    padding: 0.35rem 0.5rem;
    font-size: 0.78rem;
  }

  /* 涂鸦墙模式下的便签卡片：手机端 1 列自适应充满 */
  body.theme-graffiti .donations-container {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1rem 0.25rem 2.5rem;
  }

  .graffiti-note {
    padding: 1.15rem 1rem 0.95rem;
    min-height: auto;
  }

  .graffiti-amount {
    font-size: 1.45rem;
  }

  .graffiti-msg {
    font-size: 1.05rem;
  }

  /* 弹窗适配 */
  .modal-card {
    padding: 1.35rem 1rem;
    max-width: 92vw;
  }

  .qr-box {
    width: 170px;
    height: 170px;
  }

  /* 管理后台在移动端的适配 */
  .admin-container {
    padding: 0.75rem 0.75rem 4rem;
  }

  .admin-card {
    padding: 1rem;
    border-radius: 12px;
  }

  .auth-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .auth-banner > div:last-child {
    width: 100%;
    justify-content: space-between;
  }

  .auth-banner .form-input {
    flex: 1;
  }

  /* 管理后台表格在手机端横向滚动保护 */
  .admin-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-table {
    min-width: 620px;
  }
}

/* 手机端智能防重叠 (<520px)：精简切换按钮文案，留足间距 */
@media (max-width: 520px) {
  .header {
    padding: 0.4rem 0.6rem;
  }

  #theme-text {
    display: none;
  }

  .btn-ghost.theme-toggle {
    padding: 0.35rem 0.5rem;
    font-size: 0.85rem;
  }

  .btn-primary {
    padding: 0.35rem 0.65rem;
  }
}

/* 超小屏设备适配 (<375px，如 iPhone SE) */
@media (max-width: 375px) {
  .app-container {
    padding: 0.5rem 0.5rem 2.5rem;
  }

  .brand-logo-svg {
    width: 22px !important;
    height: 22px !important;
  }

  body.theme-graffiti .brand-text {
    font-size: 0.85rem;
  }

  .stat-card {
    padding: 0.5rem 0.6rem;
  }

  .stat-value {
    font-size: 0.92rem;
  }
}
