:root {
  --primary: #e05a47;
  --primary-dark: #c94b39;
  --bg: #faf8f5;
  --card: #ffffff;
  --text: #333333;
  --muted: #777777;
  --border: #e6e2dd;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  --font: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
}

header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.notice {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 26px;
  color: #9a3412;
  font-size: 14px;
}

.notice:empty {
  display: none;
}

.hero {
  text-align: center;
  padding: 36px 20px;
}

.hero h1 {
  font-size: 32px;
  margin: 0 0 10px;
}

.hero p {
  color: var(--muted);
  margin: 0 0 28px;
  font-size: 15px;
}

.donate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 18px 56px;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(224, 90, 71, 0.28);
  transition: transform 0.15s ease, background 0.15s ease;
}

.donate-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.donate-btn:active {
  transform: translateY(0);
}

.stats-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.card .value {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  margin: 28px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.clear-local {
  font-size: 12px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  cursor: pointer;
}

.clear-local:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.donation-list {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.donation-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.donation-item:last-child {
  border-bottom: none;
}

.donation-item .left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.donation-item .amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}

.donation-item .time {
  font-size: 12px;
  color: var(--muted);
}

.empty {
  text-align: center;
  padding: 34px;
  color: var(--muted);
  font-size: 14px;
}

/* 弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--card);
  border-radius: var(--radius);
  width: 100%;
  max-width: 420px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-size: 18px;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
}

.form-group small {
  color: var(--muted);
  font-weight: 400;
  margin-left: 4px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.submit-btn {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}

.submit-btn:hover {
  background: var(--primary-dark);
}

.submit-btn:disabled {
  background: #d1aaa3;
  cursor: not-allowed;
}

.error-msg {
  color: #c94b39;
  font-size: 13px;
  margin-top: 10px;
  min-height: 20px;
}

@media (max-width: 520px) {
  .stats-cards {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 26px;
  }

  .donate-btn {
    width: 100%;
  }
}
