:root {
  color-scheme: light dark;
  font-family: system-ui, sans-serif;
}

body {
  margin: 0;
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #1a1a1a 0%, #0f0f0f 100%);
  color: #f5f5f5;
}

.container {
  width: min(420px, 90vw);
  padding: 2.5rem 2rem;
  border-radius: 18px;
  background: rgba(20, 20, 20, 0.85);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

h1 {
  margin-top: 0;
  margin-bottom: 0.625rem;
  font-size: 2rem;
  letter-spacing: 0.03em;
}

p {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: #c3c3c3;
}

.field-label {
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: #f5f5f5;
}

form {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.5rem;
  font-weight: 600;
}

input {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

.mode-group {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem 1rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.mode-group legend {
  font-size: 0.9rem;
  font-weight: 600;
  margin-right: 0.75rem;
}

.mode-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  margin: 0;
}

#amount-group {
  display: grid;
  gap: 0.75rem;
}

.quick-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quick-amounts .quick-amount {
  flex: 1 1 calc(50% - 0.5rem);
  min-width: 90px;
  padding: 0.6rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: inherit;
  font-weight: 600;
  transition: transform 0.12s ease-in-out, border-color 0.12s ease-in-out,
    background 0.12s ease-in-out;
}

.quick-amounts .quick-amount:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
}

.quick-amounts .quick-amount.is-selected,
.quick-amounts .quick-amount[aria-pressed="true"] {
  background: linear-gradient(
    135deg,
    rgba(235, 54, 120, 0.85),
    rgba(94, 23, 235, 0.85)
  );
  border-color: transparent;
  color: white;
}

.input-with-prefix {
  display: flex;
  align-items: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.input-with-prefix span {
  padding: 0.75rem 0.85rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
}

.input-with-prefix input {
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  padding-left: 0.65rem;
  background: transparent;
}

.support-hint {
  font-size: 0.85rem;
  color: #b5c0ff;
}

button {
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #eb3678, #5e17eb);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.85rem 1.25rem;
  cursor: pointer;
  transition: transform 0.15s ease-in-out;
}

button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

button:not([disabled]):hover {
  transform: translateY(-2px);
}

#reset {
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

#reset:hover {
  transform: translateY(-2px);
}

#amount-input[disabled] {
  opacity: 0.6;
}

#spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

#message {
  min-height: 1.5rem;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

#message.success {
  color: #8affc1;
}

#message.error {
  color: #ff8a9c;
}

#message.info {
  color: #b5c0ff;
}

#amount-group[data-hidden="true"] {
  display: none;
}

[data-hidden="true"] {
  display: none;
}

#status-overlay {
  display: none;
}

#status-overlay[data-hidden="false"] {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  padding: 1.5rem;
  z-index: 100;
}

.status-modal {
  width: min(420px, 80vw);
  background: rgba(16, 16, 20, 0.95);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  display: grid;
  gap: 1rem;
}

.status-modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.status-modal h2 {
  margin: 0;
  font-size: 1.3rem;
}

#modal-close {
  background: transparent;
  color: inherit;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
}

#modal-close:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.08);
}

#modal-dismiss {
  justify-self: end;
  background: rgba(255, 255, 255, 0.1);
}

#status-overlay.success h2,
#status-reference.success {
  color: #85f5bf;
}

#status-overlay.error h2,
#status-reference.error {
  color: #ff8a9c;
}

#status-overlay.info h2,
#status-reference.info {
  color: #b5c0ff;
}

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