:root {
  --background: #f8fafc;
  --foreground: #0f172a;
  --button: #1768d8;
  --button-hover: #0f56ba;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(23, 104, 216, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(16, 185, 129, 0.1), transparent 38%),
    var(--background);
  color: var(--foreground);
  font-family: Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

.donate-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.donate-box {
  display: grid;
  width: min(100%, 680px);
  justify-items: center;
}

.language-switch {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 22px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 4px;
}

.language-switch__button {
  min-width: 48px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
}

.language-switch__button--active {
  background: var(--button);
  color: #ffffff;
}

.donate-kicker {
  margin: 0 0 14px;
  color: var(--button);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-transform: uppercase;
}

.donate-title {
  margin: 0;
  max-width: 640px;
  color: var(--foreground);
  font-size: 44px;
  font-weight: 800;
  line-height: 1.08;
}

.donate-text {
  margin: 22px 0 16px;
  max-width: 560px;
  color: #475569;
  font-size: 20px;
  line-height: 1.6;
}

.donate-thanks {
  margin: 0 0 34px;
  max-width: 520px;
  color: #0f766e;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.5;
}

.donate-form {
  display: grid;
  width: min(100%, 520px);
  justify-items: center;
  gap: 18px;
}

.wallet-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.wallet-button {
  position: relative;
  display: flex;
  min-height: 132px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.92)),
    #ffffff;
  color: #0f172a;
  cursor: pointer;
  padding: 14px;
  text-align: left;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.wallet-button::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #1768d8, #10b981);
  opacity: 0.72;
}

.wallet-button__badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 8px;
  background: #e0f2fe;
  color: #075985;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  padding: 8px 10px;
}

.wallet-button__content {
  display: grid;
  gap: 7px;
}

.wallet-button__hint {
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
}

.wallet-button strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.wallet-button:hover,
.wallet-button--active {
  border-color: var(--button);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(239, 246, 255, 0.96)),
    #ffffff;
  box-shadow: 0 16px 34px rgba(23, 104, 216, 0.18);
  transform: translateY(-1px);
}

.wallet-button--active::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 14px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.12);
}

.wallet-button--active .wallet-button__badge {
  background: var(--button);
  color: #ffffff;
}

.quick-amounts {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quick-amount {
  min-height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.quick-amount:hover,
.quick-amount--active {
  border-color: var(--button);
  background: #eff6ff;
  color: var(--button);
  box-shadow: 0 10px 24px rgba(23, 104, 216, 0.13);
  transform: translateY(-1px);
}

.rate-note {
  margin: -4px 0 0;
  width: 100%;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.custom-amount,
.admin-field {
  display: grid;
  width: 100%;
  gap: 8px;
  color: #334155;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}

.custom-amount input,
.admin-field input,
.admin-field textarea {
  min-height: 54px;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  font-size: 18px;
  outline: none;
  padding: 0 16px;
}

.admin-field textarea {
  line-height: 1.5;
  min-height: 120px;
  padding: 14px 16px;
  resize: vertical;
}

.custom-amount input:focus,
.admin-field input:focus,
.admin-field textarea:focus {
  border-color: var(--button);
  box-shadow: 0 0 0 4px rgba(23, 104, 216, 0.12);
}

.form-error {
  margin: 0;
  width: 100%;
  border-radius: 8px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  padding: 12px 14px;
  text-align: left;
}

.support-message {
  margin: -4px 0 0;
  width: 100%;
  border-radius: 8px;
  background: #dcfce7;
  color: #166534;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.4;
  padding: 12px 14px;
  text-align: center;
}

.extra-methods {
  display: grid;
  width: min(100%, 520px);
  gap: 14px;
  justify-items: stretch;
  margin-top: 28px;
  text-align: left;
}

.extra-methods h2 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  line-height: 1.2;
  text-align: center;
}

.extra-methods__grid {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr;
  gap: 10px;
  justify-items: stretch;
}

.extra-methods__grid:empty {
  display: none;
}

.method-card {
  display: grid;
  min-height: 78px;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: #0f172a;
  cursor: pointer;
  padding: 14px;
  text-align: left;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.method-card:hover {
  border-color: var(--button);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.method-card__content {
  display: grid;
  gap: 5px;
}

.method-card span {
  font-size: 16px;
  font-weight: 900;
}

.method-card strong {
  color: #2563eb;
  font-size: 14px;
  font-weight: 800;
}

.method-card small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.admin-check {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: #334155;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
}

.admin-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--button);
}

.help-button,
.admin-save,
.admin-reset,
.admin-link {
  border-radius: 8px;
}

.help-button {
  display: inline-flex;
  min-height: 72px;
  min-width: 220px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background: var(--button);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 18px 45px rgba(23, 104, 216, 0.28);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  transition:
    transform 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.help-button:hover {
  background: var(--button-hover);
  box-shadow: 0 22px 52px rgba(23, 104, 216, 0.34);
  transform: translateY(-2px);
}

.help-button:focus-visible,
.admin-save:focus-visible,
.admin-reset:focus-visible,
.admin-link:focus-visible,
.wallet-button:focus-visible,
.quick-amount:focus-visible,
.language-switch__button:focus-visible {
  outline: 3px solid rgba(23, 104, 216, 0.34);
  outline-offset: 5px;
}

.help-button__icon {
  font-size: 30px;
  line-height: 1;
}

.admin-page {
  min-height: 100vh;
  padding: 32px 20px;
}

.admin-page--login {
  display: grid;
  place-items: center;
}

.admin-panel {
  display: grid;
  width: min(100%, 860px);
  gap: 22px;
  margin: 0 auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  padding: 28px;
}

.admin-login-card {
  width: min(100%, 420px);
}

.admin-panel--locked {
  display: none !important;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-title {
  margin: 0;
  color: var(--foreground);
  font-size: 34px;
  line-height: 1.15;
}

.admin-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  padding: 0 16px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-wallets {
  display: grid;
  gap: 14px;
  border-top: 1px solid #e2e8f0;
  padding-top: 22px;
}

.admin-visits {
  display: grid;
  gap: 14px;
  border-top: 1px solid #e2e8f0;
  padding-top: 22px;
}

.admin-visits h2,
.admin-wallets h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.admin-visits__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-visit-card {
  display: grid;
  gap: 8px;
  min-height: 96px;
  align-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.92);
  padding: 14px;
}

.admin-visit-card span {
  color: #64748b;
  font-size: 14px;
  font-weight: 800;
}

.admin-visit-card strong {
  color: #0f172a;
  font-size: 34px;
  line-height: 1;
}

.admin-wallet-row {
  display: grid;
  gap: 12px;
  grid-template-columns: 180px 1fr;
}

.admin-field--wide {
  grid-column: 1 / -1;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-save,
.admin-reset {
  min-height: 48px;
  border: 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  padding: 0 22px;
}

.admin-save {
  background: var(--button);
  color: #ffffff;
}

.admin-reset {
  background: #e2e8f0;
  color: #0f172a;
}

.admin-note {
  margin: 0;
  color: #64748b;
  font-size: 15px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .donate-page {
    padding: 20px;
  }

  .donate-kicker {
    font-size: 13px;
  }

  .donate-title {
    font-size: 32px;
  }

  .donate-text {
    margin: 18px 0 14px;
    font-size: 17px;
  }

  .donate-thanks {
    margin-bottom: 28px;
    font-size: 15px;
  }

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

  .quick-amounts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .help-button {
    width: 100%;
    min-height: 64px;
    min-width: min(100%, 220px);
    font-size: 24px;
  }

  .admin-panel {
    padding: 20px;
  }

  .admin-header {
    display: grid;
  }

  .admin-title {
    font-size: 28px;
  }

  .admin-visits__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-wallet-row {
    grid-template-columns: 1fr;
  }
}
