/*
 * Copyright (c) 2026 The Qwertycoin Project
 * SPDX-License-Identifier: MIT
 */

:root {
  color-scheme: dark;
  --bg: #09110f;
  --panel: #111a17;
  --panel-2: #17231f;
  --line: rgba(255, 255, 255, 0.1);
  --text: #eef5f1;
  --muted: #9eaaa4;
  --dim: #6f7c76;
  --accent: #28b481;
  --accent-2: #e0b84c;
  --danger: #f87171;
  --ok: #45d18e;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100dvh;
}

a {
  color: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent);
  color: #04110d;
  font-weight: 900;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.nav a[aria-current="page"],
.nav a:hover {
  background: var(--panel-2);
  color: var(--text);
}

.beta {
  margin: 18px 0;
  padding: 12px 14px;
  border: 1px solid rgba(224, 184, 76, 0.35);
  border-radius: 8px;
  background: rgba(224, 184, 76, 0.08);
  color: #f4d987;
  font-weight: 700;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 18px;
  align-items: start;
  padding: 18px 0 44px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.panel-header,
.panel-body {
  padding: 18px;
}

.panel-header {
  border-bottom: 1px solid var(--line);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  font-size: 1rem;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.hero-copy {
  display: grid;
  gap: 16px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #04110d;
}

.button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mode-tab {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

.mode-tab.active,
.mode-tab:hover {
  border-color: var(--accent);
  color: var(--text);
}

.metric-grid,
.status-list {
  display: grid;
  gap: 10px;
}

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

.metric {
  min-height: 84px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.label {
  color: var(--dim);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.value {
  margin-top: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
}

.wallet-workbench {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.mode-panel,
.wallet-output {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.field {
  display: grid;
  gap: 8px;
}

.field.compact {
  max-width: 280px;
}

.field span {
  color: var(--dim);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1411;
  color: var(--text);
  font: 0.92rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 12px;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1411;
  color: var(--text);
  font: inherit;
  padding: 0 12px;
}

input:disabled {
  opacity: 0.6;
}

textarea:focus,
input:focus,
select:focus,
.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
}

.word-count {
  align-self: end;
  min-height: 44px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.note {
  font-size: 0.92rem;
}

.output-grid {
  display: grid;
  gap: 12px;
}

.sync-panel {
  display: grid;
  gap: 14px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.history-list {
  display: grid;
  gap: 8px;
  min-height: 52px;
}

.history-row {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1411;
}

.history-row span {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.copy-field {
  display: grid;
  gap: 6px;
}

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

.result-badge {
  padding: 5px 8px;
  border: 1px solid rgba(69, 209, 142, 0.35);
  border-radius: 8px;
  color: var(--ok);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

code {
  display: block;
  overflow-wrap: anywhere;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #0b1411;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  padding: 10px;
}

.copy-button {
  justify-self: start;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1411;
  color: var(--muted);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.copy-button:hover {
  color: var(--text);
}

code.seed {
  color: #f4d987;
}

.warning {
  color: #f4d987;
}

.wallet-message {
  min-height: 24px;
  color: var(--muted);
  font-weight: 700;
}

.wallet-message.error {
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.status-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--muted);
}

.dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 99px;
  background: var(--dim);
}

.dot.done {
  background: var(--ok);
}

.dot.warn {
  background: var(--accent-2);
}

.doc {
  max-width: 820px;
  padding: 22px 0 48px;
}

.doc h1 {
  margin-bottom: 16px;
}

.doc h2 {
  margin: 28px 0 10px;
}

.doc ul {
  color: var(--muted);
  line-height: 1.7;
}

.footer {
  padding: 18px 0 30px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.85rem;
}

@media (max-width: 780px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .layout,
  .metric-grid,
  .mode-tabs {
    grid-template-columns: 1fr;
  }
}
