:root {
  color-scheme: dark;
  --bg: #07040b;
  --panel: #120b1f;
  --panel-2: #1c0f2d;
  --line: rgba(202, 126, 255, 0.28);
  --text: #f8efff;
  --muted: #bca7d2;
  --purple: #a829ff;
  --pink: #ff4fd8;
  --green: #30f2a2;
  --amber: #ffd166;
  --orange: #ff7a45;
  --red: #ff3b70;
}

* {
  box-sizing: border-box;
}

body {
  width: 380px;
  min-height: 480px;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(168, 41, 255, 0.22), transparent 34%),
    #07040b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  font: inherit;
}

.shell {
  min-height: 480px;
  padding: 16px;
}

.header {
  display: grid;
  grid-template-columns: 44px 1fr 38px;
  gap: 11px;
  align-items: center;
  margin-bottom: 16px;
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 18px rgba(168, 41, 255, 0.42);
}

.eyebrow,
.label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 3px 0 0;
  color: var(--text);
  letter-spacing: 0;
}

h1 {
  font-size: 18px;
  line-height: 1.1;
}

h2 {
  max-width: 225px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  line-height: 1.2;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.icon-button:hover {
  border-color: rgba(255, 79, 216, 0.65);
  background: rgba(168, 41, 255, 0.2);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.state {
  display: grid;
  min-height: 350px;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 11, 31, 0.8);
  text-align: center;
}

.state p {
  max-width: 260px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.loader {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(202, 126, 255, 0.25);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.hidden {
  display: none !important;
}

.result {
  display: grid;
  gap: 13px;
}

.score-panel {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(18, 11, 31, 0.92), rgba(28, 15, 45, 0.82));
}

.score-ring {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 7px solid var(--risk, var(--purple));
  border-radius: 50%;
  box-shadow: 0 0 24px color-mix(in srgb, var(--risk, var(--purple)) 40%, transparent);
}

.score-ring span {
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

.address {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  line-height: 1.4;
  word-break: break-all;
}

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

.fact {
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(202, 126, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.fact span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.fact strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.flag {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 9px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(202, 126, 255, 0.18);
  border-radius: 8px;
  background: rgba(18, 11, 31, 0.72);
}

.flag-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--flag-color, var(--purple));
}

.flag strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}

.flag p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.actions button {
  min-height: 40px;
  border: 1px solid rgba(202, 126, 255, 0.35);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.065);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.actions button:hover:not(:disabled) {
  border-color: rgba(255, 79, 216, 0.72);
  background: rgba(168, 41, 255, 0.22);
}

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

.wallet-manager {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid rgba(202, 126, 255, 0.18);
  border-radius: 8px;
  background: rgba(18, 11, 31, 0.72);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-title span {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.section-title small {
  color: var(--muted);
  font-size: 11px;
}

.wallet-form {
  display: grid;
  grid-template-columns: 1fr 82px 64px;
  gap: 7px;
}

.wallet-form input {
  min-width: 0;
  height: 34px;
  border: 1px solid rgba(202, 126, 255, 0.22);
  border-radius: 7px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.24);
  font: inherit;
  font-size: 12px;
  padding: 0 9px;
  outline: none;
}

.wallet-form input:focus {
  border-color: rgba(255, 79, 216, 0.62);
}

.wallet-form button,
.wallet-item button {
  min-height: 34px;
  border: 1px solid rgba(202, 126, 255, 0.35);
  border-radius: 7px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.065);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.wallet-list {
  display: grid;
  gap: 6px;
}

.wallet-item {
  display: grid;
  grid-template-columns: 1fr 30px;
  gap: 8px;
  align-items: center;
  padding: 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
}

.wallet-item strong,
.wallet-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-item strong {
  color: var(--text);
  font-size: 12px;
}

.wallet-item span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.wallet-item button {
  width: 30px;
  min-height: 30px;
  padding: 0;
}
