:root {
  color-scheme: dark;
  --bg: #07110f;
  --panel: #0e1d1a;
  --panel-strong: #142823;
  --text: #f3fbf7;
  --muted: #9db7ae;
  --line: rgba(186, 236, 214, 0.16);
  --accent: #56e6a5;
  --accent-strong: #23c77d;
  --accent-text: #03110b;
  --error: #ff8b8b;
  --success: #72f0b3;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 16%, rgba(86, 230, 165, 0.14), transparent 32rem),
    linear-gradient(135deg, #06100d 0%, #0b1b17 52%, #122420 100%);
}

button,
input,
select {
  font: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.faucet-panel {
  width: min(100%, 560px);
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(14, 29, 26, 0.88);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.network-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.88rem;
}

.language-picker select {
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel-strong);
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

.intro {
  margin-top: 34px;
}

.coin-logo {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: 22px;
  border-radius: 50%;
  box-shadow: 0 14px 34px rgba(86, 230, 165, 0.16);
}

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

h1 {
  margin: 0;
  font-size: clamp(2.5rem, 10vw, 5rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.lede {
  max-width: 34rem;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.65;
}

.claim-form {
  margin-top: 34px;
}

label {
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input {
  min-width: 0;
  height: 52px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.24);
  outline: none;
}

input:focus {
  border-color: rgba(86, 230, 165, 0.75);
  box-shadow: 0 0 0 4px rgba(86, 230, 165, 0.12);
}

button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 800;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

#claim-button {
  color: var(--accent-text);
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.message {
  min-height: 46px;
  margin-top: 20px;
  padding: 13px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.message:empty {
  display: none;
}

.message.success {
  border-color: rgba(114, 240, 179, 0.28);
  color: var(--success);
}

.message.error {
  border-color: rgba(255, 139, 139, 0.28);
  color: var(--error);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 22px;
}

.secondary-button {
  color: var(--text);
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.explorer-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.explorer-link:focus,
.explorer-link:hover {
  text-decoration: underline;
}

.contract-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin-top: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.contract-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contract-address {
  color: var(--text);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.45;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contract-address:hover,
.contract-address:focus {
  color: var(--accent);
}

.icon-button {
  min-height: 42px;
  padding: 0 14px;
  color: var(--accent-text);
  background: var(--accent);
}

.credit {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 620px) {
  .shell {
    align-items: stretch;
    padding: 14px;
  }

  .faucet-panel {
    min-height: calc(100vh - 28px);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .input-row,
  .actions,
  .contract-box,
  .topbar {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .network-pill {
    justify-content: center;
  }

  .explorer-link {
    text-align: center;
    padding: 10px 0;
  }
}
