:root {
  --bg0: #06141f;
  --bg1: #0b2433;
  --ink: #f2f7f4;
  --muted: #9bb0a8;
  --accent: #18c29c;
  --accent-2: #3dd6ff;
  --warn: #ffcf5c;
  --danger: #ff6b6b;
  --panel: rgba(10, 28, 38, 0.78);
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --font-display: "Outfit", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "Outfit", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--bg0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(24, 194, 156, 0.28), transparent 60%),
    radial-gradient(700px 480px at 90% 8%, rgba(61, 214, 255, 0.22), transparent 55%),
    radial-gradient(640px 420px at 50% 110%, rgba(255, 207, 92, 0.12), transparent 50%),
    linear-gradient(165deg, #06141f 0%, #0b2433 48%, #123447 100%);
  animation: drift 16s ease-in-out infinite alternate;
}

@keyframes drift {
  from { filter: hue-rotate(0deg) saturate(1); transform: scale(1); }
  to { filter: hue-rotate(12deg) saturate(1.08); transform: scale(1.03); }
}

.shell {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 28px 18px 48px;
}

.hero {
  text-align: center;
  padding: 18px 6px 8px;
  animation: rise 0.7s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  color: var(--accent-2);
  text-indent: 0.22em;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 5.2vw, 1.9rem);
  font-weight: 800;
  line-height: 1.25;
  background: linear-gradient(105deg, #7dffc8, #3dd6ff 55%, #ffe08a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 12px 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #b8fff0;
}

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

.tab-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.tab-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.tab-btn:active {
  transform: translateY(1px) scale(0.98);
}

.tab-btn.is-active {
  color: #042018;
  border-color: transparent;
  background: linear-gradient(135deg, #2af0b8, #18c29c 55%, #0ea5e9);
  box-shadow: 0 10px 28px rgba(24, 194, 156, 0.35);
}

.tab-panel[hidden] {
  display: none !important;
}

.tab-panels {
  margin-top: 4px;
}

.energy-panel .btn-block {
  margin-top: 18px;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 28px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn-primary {
  color: #042018;
  background: linear-gradient(135deg, #2af0b8, #18c29c 55%, #0ea5e9);
  box-shadow: 0 10px 28px rgba(24, 194, 156, 0.35);
}

.btn-primary:hover {
  box-shadow: 0 14px 34px rgba(24, 194, 156, 0.45);
}

.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.btn-block {
  width: 100%;
  margin-top: 8px;
}

.panel {
  margin-top: 18px;
  padding: 20px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  animation: rise 0.8s ease both;
}

.panel-kicker {
  margin: 0 0 12px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #7de7ff;
}

.address-block {
  text-align: center;
  margin-bottom: 14px;
}

.address-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.address-value {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(61, 214, 255, 0.45);
  background: rgba(0, 0, 0, 0.28);
  color: #8dffc9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  word-break: break-all;
  text-align: left;
  cursor: pointer;
}

.copy-tag {
  flex: none;
  color: #042018;
  background: var(--accent-2);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
}

.feature-list,
.tips ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #e7f6f1;
}

.feature-list li + li,
.tips li + li {
  margin-top: 8px;
}

.rules,
.tips {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.rules h3,
.tips h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.rules p {
  margin: 0 0 8px;
}

.pill {
  display: inline-block;
  min-width: 4.5rem;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(24, 194, 156, 0.18);
  color: #8dffc9;
  font-weight: 700;
  text-align: center;
}

.pill-alt {
  background: rgba(61, 214, 255, 0.16);
  color: #9be7ff;
}

.pay-panel[hidden],
.check-result[hidden],
.toast[hidden] {
  display: none !important;
}

.pay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.pay-head h2 {
  margin: 0;
  font-size: 1.15rem;
}

.countdown {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--warn);
  background: rgba(255, 207, 92, 0.1);
  border: 1px solid rgba(255, 207, 92, 0.28);
  border-radius: 10px;
  padding: 6px 12px;
}

.amount-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}

.amount-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.amount-btn.is-active {
  border-color: rgba(24, 194, 156, 0.7);
  background: rgba(24, 194, 156, 0.16);
  color: #9dffd4;
  box-shadow: inset 0 0 0 1px rgba(24, 194, 156, 0.25);
}

.pay-amount {
  margin: 8px 0 14px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
}

.pay-box {
  padding: 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
}

.pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.pay-addr {
  border-bottom: 0;
  margin-bottom: 4px;
  padding-bottom: 0;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.linkish {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent-2);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.pay-address {
  margin: 0;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88rem;
  color: #9dffd4;
  line-height: 1.45;
}

.pay-note {
  margin: 14px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.check-desc {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

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

.check-form input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  outline: none;
}

.check-form input:focus {
  border-color: rgba(61, 214, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(61, 214, 255, 0.15);
}

.check-status {
  min-height: 1.4em;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.check-status.is-error {
  color: var(--danger);
}

.check-result {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat {
  padding: 14px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  text-align: center;
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-bottom: 6px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #eafff7;
}

.foot {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.foot a {
  color: var(--accent-2);
  text-decoration: none;
}

.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(8, 24, 32, 0.92);
  border: 1px solid rgba(24, 194, 156, 0.45);
  color: #d8fff2;
  box-shadow: var(--shadow);
  animation: toast-in 0.25s ease both;
}

#ob[hidden] {
  display: none !important;
}

#ob {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 14, 22, 0.72);
  backdrop-filter: blur(8px);
}

#ob .ob-card {
  width: min(420px, 100%);
  padding: 22px 18px;
  border-radius: 18px;
  background: rgba(10, 28, 38, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
  text-align: center;
}

#ob .ob-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: #eafff7;
}

#ob .ob-desc {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

#ob .ob-btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  width: 100%;
  border-radius: 999px;
  padding: 12px 20px;
  font: inherit;
  font-weight: 700;
  color: #042018;
  background: linear-gradient(135deg, #2af0b8, #18c29c 55%, #0ea5e9);
}

#ob .ob-diag {
  margin: 14px 0 0;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.72rem;
  color: #9bb0a8;
  max-height: 40vh;
  overflow: auto;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

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

@media (max-width: 420px) {
  .check-form {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }
}
