/*!
 * MeTenk — sponsor page
 * ---------------------------------------------------------------------------
 * A calm, premium tipping page: dark canvas, soft blue glow, hairline cards,
 * compact radii. QR codes stay on plain white so cameras lock on instantly.
 */

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

:root {
  --sp-bg: #07080c;
  --sp-surface: rgba(255, 255, 255, 0.035);
  --sp-line: rgba(255, 255, 255, 0.08);
  --sp-text: #f4f5f7;
  --sp-muted: #99a1b0;
  --sp-accent: #4361ee;
  --sp-accent-soft: #7f9bff;
}

body.sponsor-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(820px 420px at 18% -8%, rgba(67, 97, 238, 0.18), transparent 70%),
    radial-gradient(700px 380px at 88% 4%, rgba(240, 180, 41, 0.08), transparent 72%),
    var(--sp-bg);
  color: var(--sp-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans',
    'Microsoft YaHei', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Back link ---------- */

.sponsor-back {
  position: absolute;
  top: 22px;
  left: 22px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border: 1px solid var(--sp-line);
  border-radius: 8px;
  background: rgba(10, 11, 16, 0.72);
  color: #cfd4dd;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  backdrop-filter: blur(12px);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.sponsor-back:hover {
  color: #ffffff;
  border-color: rgba(127, 155, 255, 0.4);
  background: rgba(67, 97, 238, 0.14);
}

/* ---------- Shell ---------- */

.sponsor-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 84px 24px 44px;
}

/* Images below carry a large intrinsic width — keep grid items shrinkable. */
.donate-card,
.qr-card,
.qr-frame {
  min-width: 0;
}

/* ---------- Hero ---------- */

.sponsor-hero {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 44px;
}

.sponsor-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 5px 12px;
  border: 1px solid rgba(240, 180, 41, 0.24);
  border-radius: 6px;
  background: rgba(240, 180, 41, 0.07);
  color: #f2ce7d;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sponsor-eyebrow::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f0b429;
  box-shadow: 0 0 8px rgba(240, 180, 41, 0.8);
}

.sponsor-logo {
  width: 58px;
  height: 58px;
  display: block;
  margin: 0 auto 16px;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(67, 97, 238, 0.32));
}

.sponsor-title {
  margin-bottom: 14px;
  font-size: clamp(34px, 5vw, 50px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.14;
  background: linear-gradient(150deg, #ffffff 18%, #9aa6c4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sponsor-lede {
  color: var(--sp-muted);
  font-size: 15.5px;
  line-height: 1.75;
}

.sponsor-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  margin-top: 26px;
  padding: 0;
  list-style: none;
}

.sponsor-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 92px;
}

.sponsor-stat + .sponsor-stat {
  padding-left: 26px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.sponsor-stat strong {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.sponsor-stat span {
  font-size: 11.5px;
  color: #8b93a2;
  letter-spacing: 0.01em;
}

/* ---------- Donation cards ---------- */

.donate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 18px;
  align-items: stretch;
}

.donate-card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--sp-line);
  border-radius: 12px;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.018) 62%, rgba(67, 97, 238, 0.045) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.donate-head {
  margin-bottom: 20px;
}

.donate-title {
  margin-bottom: 5px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.donate-sub {
  color: var(--sp-muted);
  font-size: 13px;
  line-height: 1.6;
}

/* ---------- QR codes ---------- */

.qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: auto;
}

.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.qr-card:hover {
  transform: translateY(-2px);
  border-color: rgba(127, 155, 255, 0.28);
  background: rgba(67, 97, 238, 0.06);
}

.qr-frame {
  width: 100%;
  max-width: 176px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.qr-frame img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

.qr-fallback {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #525a6b;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.qr-fallback span {
  font-size: 26px;
}

.qr-meta {
  margin-top: 12px;
  text-align: center;
}

.qr-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #f0f2f6;
}

.qr-hint {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: #828a99;
}

/* ---------- Online payment ---------- */

.pay-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.pay-perks {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 18px 0 20px;
  padding: 0;
  list-style: none;
}

.pay-perks li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #b6bdc9;
  font-size: 12.5px;
  line-height: 1.5;
}

.pay-perks svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--sp-accent-soft);
}

.pay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid rgba(127, 155, 255, 0.32);
  border-radius: 9px;
  background: linear-gradient(180deg, #4f6cf3 0%, #3a55e0 100%);
  box-shadow: 0 10px 26px rgba(67, 97, 238, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.pay-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 14px 34px rgba(67, 97, 238, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pay-btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.pay-btn .pay-arrow {
  margin-left: 2px;
  opacity: 0.8;
}

.pay-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #838b9a;
  font-size: 11.5px;
  text-align: center;
}

.pay-note svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.pay-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 16px;
  color: #6f7787;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pay-divider::before,
.pay-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
}

/* ---------- Thank-you ---------- */

.thanks-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 18px;
  padding: 24px 26px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
}

.thanks-heart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(240, 180, 41, 0.24);
  background: rgba(240, 180, 41, 0.09);
  color: #f0b429;
}

.thanks-heart svg {
  width: 18px;
  height: 18px;
}

.thanks-body {
  min-width: 0;
}

.thanks-title {
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
}

.thanks-text {
  color: var(--sp-muted);
  font-size: 13.5px;
  line-height: 1.72;
}

.thanks-text a {
  color: var(--sp-accent-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(127, 155, 255, 0.3);
}

.thanks-text a:hover {
  color: #ffffff;
}

/* ---------- Footer ---------- */

.sponsor-footer {
  padding: 26px 24px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #6f7787;
  font-size: 12px;
  text-align: center;
}

.sponsor-footer .i18n-footer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .sponsor-main {
    justify-content: flex-start;
    padding: 92px 20px 56px;
  }

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

  .pay-block {
    margin-top: 4px;
  }
}

@media (max-width: 620px) {
  .sponsor-main {
    padding: 84px 16px 48px;
  }

  .sponsor-hero {
    margin-bottom: 30px;
  }

  .sponsor-logo {
    width: 48px;
    height: 48px;
  }

  .sponsor-stats {
    gap: 18px;
    margin-top: 22px;
  }

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

  .sponsor-stat + .sponsor-stat {
    padding-left: 18px;
  }

  .sponsor-stat strong {
    font-size: 18px;
  }

  .sponsor-stat span {
    font-size: 10.5px;
  }

  .donate-card {
    padding: 20px 16px;
  }

  .qr-grid {
    gap: 10px;
  }

  .qr-card {
    padding: 12px 10px 12px;
  }

  .qr-frame {
    max-width: 132px;
    padding: 7px;
  }

  .qr-name {
    font-size: 13px;
  }

  .qr-hint {
    font-size: 10.5px;
  }

  .thanks-card {
    padding: 20px 18px;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .qr-card,
  .pay-btn,
  .sponsor-back {
    transition: none;
  }
}
