:root {
  color-scheme: dark;
  --bg: #0a0a0d;
  --panel: rgba(22, 23, 30, .88);
  --panel-strong: #11121a;
  --line: rgba(255, 255, 255, .12);
  --text: #fbfbff;
  --muted: #b4b8c8;
  --orange: #ff6a00;
  --orange-2: #ff8a1f;
  --purple: #9b4dff;
  --green: #22c55e;
  --red: #ff4d5e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 106, 0, .18), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(155, 77, 255, .20), transparent 30%),
    radial-gradient(circle at 70% 78%, rgba(255, 106, 0, .10), transparent 36%),
    linear-gradient(135deg, #08080b 0%, #17151f 54%, #09090d 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar,
.terminal-card,
.guide {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 28px 88px rgba(0, 0, 0, .35);
  backdrop-filter: blur(14px);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  margin-bottom: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #111;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange), var(--purple));
}

.brand strong {
  display: block;
  font-size: 22px;
}

.brand span:not(.brand-mark) {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid rgba(34, 197, 94, .42);
  border-radius: 8px;
  color: #d5ffe3;
  background: rgba(34, 197, 94, .08);
  white-space: nowrap;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 430px);
  align-items: center;
  gap: 34px;
  min-height: 500px;
}

.hero-copy {
  padding: 22px 10px;
}

.eyebrow {
  color: var(--orange);
  font-weight: 900;
  letter-spacing: 0;
}

h1 {
  margin: 12px 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-copy p:last-child {
  max-width: 530px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 16px;
}

.terminal-card {
  padding: 28px 28px 24px;
}

.card-head h2 {
  margin: 0;
  font-size: 24px;
}

.card-head p {
  margin: 10px 0 22px;
  color: var(--muted);
}

label {
  display: grid;
  gap: 8px;
  color: #f0f1f8;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  color: #fff;
  background: #0d0e15;
  font-size: 15px;
}

input {
  height: 52px;
  padding: 0 14px;
}

textarea {
  min-height: 210px;
  padding: 14px;
  resize: vertical;
  font-family: Consolas, monospace;
  line-height: 1.55;
}

input:focus,
textarea:focus {
  border-color: rgba(255, 106, 0, .85);
  outline: 3px solid rgba(255, 106, 0, .16);
}

button,
.session-link,
.buy-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

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

.primary,
.session-link,
.buy-link {
  width: 100%;
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  box-shadow: 0 16px 36px rgba(255, 106, 0, .28);
}

.card-button,
.session-link,
.buy-link {
  margin-top: 16px;
}

.buy-link {
  border: 1px solid rgba(255, 106, 0, .35);
  background: rgba(255, 106, 0, .10);
  box-shadow: none;
}

.ghost {
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--line);
}

.actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 12px;
  align-items: stretch;
  margin-top: 16px;
}

.actions button {
  width: 100%;
  min-height: 52px;
}

.account-panel {
  display: grid !important;
  gap: 12px;
  margin: 16px 0 0;
  width: 100%;
}

.account-row {
  display: grid !important;
  grid-template-columns: 82px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .018)),
    #0d0e15;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .025),
    0 10px 26px rgba(0, 0, 0, .20);
}

.account-row span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.account-row strong {
  overflow-x: auto;
  overflow-y: hidden;
  color: #22e6c3 !important;
  text-overflow: clip;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-shadow:
    0 0 10px rgba(34, 230, 195, .42),
    0 0 18px rgba(34, 230, 195, .16);
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 230, 195, .5) transparent;
}

.account-row strong::-webkit-scrollbar {
  height: 4px;
}

.account-row strong::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(34, 230, 195, .45);
}

.message {
  min-height: 54px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  color: var(--muted);
  background: #0d0e15;
  line-height: 1.5;
}

.message.pending {
  border-color: rgba(155, 77, 255, .7);
  color: #eadcff;
}

.message.success {
  border-color: rgba(34, 197, 94, .55);
  color: #d5ffe3;
  background: rgba(34, 197, 94, .08);
}

.message.error {
  border-color: rgba(255, 77, 94, .65);
  color: #ffd4d8;
  background: rgba(255, 77, 94, .09);
}

.hidden {
  display: none;
}

.guide {
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: 24px;
  margin-top: 28px;
  padding: 24px 28px;
  border-left: 4px solid var(--orange);
  background:
    linear-gradient(90deg, rgba(255, 106, 0, .12), rgba(22, 23, 30, .9) 48%),
    var(--panel);
}

.guide h2 {
  margin: 0 0 14px;
}

.guide p {
  margin: 8px 0;
  color: #d9dce8;
  line-height: 1.65;
}

.tips {
  padding: 18px;
  border: 1px solid rgba(255, 106, 0, .28);
  border-radius: 8px;
  background: rgba(255, 106, 0, .08);
}

@media (max-width: 860px) {
  .topbar,
  .hero,
  .guide,
  .actions,
  .account-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .hero {
    min-height: auto;
  }
}
