:root {
  color-scheme: dark;
  --bg: #101419;
  --panel: rgba(31, 41, 48, 0.74);
  --panel-strong: rgba(37, 49, 58, 0.88);
  --line: rgba(220, 230, 236, 0.13);
  --line-strong: rgba(125, 211, 252, 0.42);
  --text: #eef5f8;
  --muted: #a8b6bf;
  --soft: #6f808a;
  --sky: #62c6f2;
  --teal: #53d6c4;
  --mint: #7be3a3;
  --amber: #f3bf5f;
  --rose: #fb7185;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background:
    radial-gradient(circle at 12% -8%, rgba(98, 198, 242, 0.22), transparent 32rem),
    radial-gradient(circle at 92% 6%, rgba(83, 214, 196, 0.18), transparent 28rem),
    radial-gradient(circle at 50% 110%, rgba(243, 191, 95, 0.1), transparent 26rem),
    linear-gradient(180deg, #11171d 0%, #101419 58%, #111814 100%);
  background-attachment: fixed;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(16, 20, 25, 0.74);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #fff;
  padding: 5px;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 16px;
  line-height: 1.2;
}

.brand-copy span,
.privacy-note,
.muted {
  color: var(--muted);
}

.brand-copy span,
.privacy-note {
  font-size: 12px;
}

.privacy-note {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.page {
  padding: 28px 0 56px;
  display: grid;
  gap: 18px;
}

.panel,
.tabs {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--panel-strong), var(--panel));
  box-shadow: 0 24px 56px -36px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(22px);
}

.panel {
  border-radius: var(--radius);
  padding: 22px;
}

.flow {
  display: grid;
  gap: 20px;
}

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

h1,
h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

textarea {
  width: 100%;
  height: 168px;
  margin-top: 16px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  color: #dcecf2;
  padding: 14px;
  line-height: 1.55;
  font-family: "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
  font-size: 13px;
  outline: none;
}

textarea:focus,
input:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(98, 198, 242, 0.12);
}

.token-status {
  min-height: 31px;
  margin-top: 12px;
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 9px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #d9edf4;
  word-break: break-word;
}

.badge.good {
  border-color: rgba(123, 227, 163, 0.32);
  background: rgba(123, 227, 163, 0.12);
  color: #b9f6cc;
}

.badge.bad {
  border-color: rgba(251, 113, 133, 0.32);
  background: rgba(251, 113, 133, 0.12);
  color: #fecdd3;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
}

.tab,
.choice,
.primary-action,
.copy-button,
.open-link {
  border: 0;
  color: inherit;
}

.tab {
  height: 44px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.tab.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.choice-group {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group legend,
label span {
  display: block;
  margin-bottom: 9px;
  color: #cbdbe2;
  font-size: 13px;
  font-weight: 700;
}

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

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

.choice-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice {
  min-height: 86px;
  text-align: left;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  padding: 16px;
  transition: 0.18s ease;
}

.choice:hover {
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

.choice.active {
  border-color: rgba(83, 214, 196, 0.56);
  background: linear-gradient(135deg, rgba(98, 198, 242, 0.13), rgba(123, 227, 163, 0.09));
}

.choice span {
  display: block;
  font-size: 15px;
  font-weight: 800;
}

.choice small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.4;
}

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

input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.26);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

.primary-action {
  width: 100%;
  min-height: 48px;
  border-radius: 13px;
  background: linear-gradient(90deg, #2563eb, #0891b2, #16a34a);
  color: white;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 18px 38px -22px rgba(45, 212, 191, 0.9);
}

.primary-action.alt {
  background: linear-gradient(90deg, #059669, #0d9488, #0284c7);
}

.primary-action:disabled {
  opacity: 0.62;
}

.output {
  border-radius: 15px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  padding: 16px;
}

.output.error {
  border-color: rgba(251, 113, 133, 0.34);
  background: rgba(251, 113, 133, 0.1);
  color: #fecdd3;
}

.result-link {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: #ddf7ff;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
  word-break: break-all;
}

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

.copy-button,
.open-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.open-link {
  background: rgba(98, 198, 242, 0.18);
}

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

.stat {
  border-radius: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  padding: 13px;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.stat-value {
  color: var(--text);
  font-weight: 800;
  word-break: break-word;
}

details {
  margin-top: 12px;
}

summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

pre {
  overflow: auto;
  max-height: 320px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: #d5e8ee;
  font-size: 12px;
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

@media (max-width: 700px) {
  .shell {
    width: min(100% - 24px, 860px);
  }

  .privacy-note {
    display: none;
  }

  .panel {
    padding: 18px;
  }

  .choice-grid.two,
  .choice-grid.three,
  .team-grid,
  .details-grid {
    grid-template-columns: 1fr;
  }

  textarea {
    height: 190px;
  }
}
