:root {
  color-scheme: light;
  --bg-start: #f7f3ff;
  --bg-end: #eef6ff;
  --card-bg: rgba(255, 255, 255, 0.9);
  --text-main: #1f2937;
  --text-muted: #5b6475;
  --accent: #5b4bff;
  --accent-hover: #4839eb;
  --accent-soft: rgba(91, 75, 255, 0.12);
  --border: rgba(135, 146, 170, 0.24);
  --shadow: 0 24px 60px rgba(93, 96, 151, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
  background: linear-gradient(160deg, var(--bg-start), var(--bg-end));
}

button {
  font: inherit;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.donate-card {
  width: min(100%, 440px);
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  text-align: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  line-height: 1.15;
}

.lead {
  margin: 14px 0 24px;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.qr-button {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 24px;
  background: var(--accent-soft);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qr-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(91, 75, 255, 0.18);
}

.qr-image {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  border-radius: 18px;
}

.tip {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

.notice {
  margin-top: 24px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  text-align: left;
}

.notice p {
  margin: 0;
  line-height: 1.7;
}

.notice p + p {
  margin-top: 8px;
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.primary-button,
.secondary-button,
.modal-close {
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.primary-button,
.secondary-button {
  padding: 14px 16px;
  font-weight: 600;
}

.primary-button {
  color: #fff;
  background: var(--accent);
}

.primary-button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.secondary-button {
  color: var(--accent);
  background: rgba(91, 75, 255, 0.1);
}

.secondary-button:hover {
  background: rgba(91, 75, 255, 0.16);
  transform: translateY(-1px);
}

.feedback {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--accent);
  font-size: 0.95rem;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.64);
}

.modal-content {
  position: relative;
  width: min(100%, 520px);
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  color: #fff;
  background: rgba(31, 41, 55, 0.72);
  font-size: 1.6rem;
  line-height: 1;
}

.modal-close:hover {
  transform: scale(1.04);
  background: rgba(31, 41, 55, 0.88);
}

.modal-image {
  display: block;
  width: 100%;
  border-radius: 18px;
}

@media (max-width: 520px) {
  .page {
    padding: 16px;
  }

  .donate-card {
    padding: 24px 18px;
    border-radius: 24px;
  }

  .actions {
    grid-template-columns: 1fr;
  }

  .notice {
    padding: 16px;
  }
}
