:root {
  --background: #080a09;
  --surface: #111311;
  --surface-2: #171917;
  --surface-3: #1d201d;
  --line: rgba(255,255,255,.12);
  --line-strong: rgba(255,255,255,.19);
  --text: #f5f7f2;
  --muted: #969c94;
  --muted-2: #727870;
  --lime: #c9ff3f;
  --lime-dark: #829b31;
  --red: #ff5e61;
  --shadow: 0 28px 80px rgba(0,0,0,.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 75% 10%, rgba(201,255,63,.045), transparent 26%),
    var(--background);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.topbar {
  height: 74px;
  padding: 0 42px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(8,10,9,.92);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
}

.brand-orb {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--lime);
  color: #0a0c09;
  font-family: "Space Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
}

.brand-copy {
  display: grid;
}

.brand-copy b {
  font-size: 18px;
  line-height: 1;
}

.brand-copy small {
  margin-top: 7px;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 8px;
  letter-spacing: .22em;
}

.main-nav {
  display: flex;
  padding: 4px;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.main-nav a {
  padding: 10px 19px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.main-nav a.active {
  color: #10120f;
  background: #f5f7f2;
}

.top-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
}

.chain {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 10px;
}

.chain i,
.live-status i,
.split-banner i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 15px rgba(201,255,63,.85);
}

.wallet-button,
.secondary-button {
  min-height: 42px;
  padding: 0 20px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  font-weight: 700;
}

.page {
  width: min(1380px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 80px;
}

.back-link {
  display: inline-flex;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.back-link:hover {
  color: var(--text);
}

.launch-shell {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(390px, .88fr);
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-panel {
  padding: 34px;
  border-right: 1px solid var(--line);
}

.preview-panel {
  padding: 34px;
  background: rgba(255,255,255,.025);
}

.preview-sticky {
  position: sticky;
  top: 108px;
}

.panel-heading,
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.panel-heading {
  margin-bottom: 28px;
}

.eyebrow,
.preview-heading {
  color: var(--lime);
  font-family: "Space Mono", monospace;
  font-size: 9px;
  letter-spacing: .18em;
}

.panel-heading h1 {
  margin: 9px 0 8px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: .98;
  letter-spacing: -.045em;
}

.panel-heading p,
.section-heading p {
  margin: 0;
  max-width: 600px;
  color: var(--muted);
  line-height: 1.55;
}

.official-badge {
  padding: 8px 11px;
  border: 1px solid rgba(201,255,63,.28);
  border-radius: 999px;
  color: var(--lime);
  background: rgba(201,255,63,.07);
  font-family: "Space Mono", monospace;
  font-size: 9px;
}

#createForm {
  display: grid;
  gap: 21px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

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

.field-label {
  color: #c5c9c2;
  font-size: 12px;
  font-weight: 700;
}

.field small,
.image-placeholder small {
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.45;
}

input,
textarea {
  width: 100%;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: rgba(255,255,255,.035);
  transition: border-color .18s ease, background .18s ease;
}

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

textarea {
  min-height: 105px;
  padding: 14px;
  resize: vertical;
  line-height: 1.45;
}

input::placeholder,
textarea::placeholder {
  color: #666b65;
}

input:focus,
textarea:focus {
  border-color: rgba(201,255,63,.62);
  background: rgba(201,255,63,.025);
}

.image-url-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 9px;
}

.image-url-row button {
  padding: 0 18px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-3);
  font-weight: 700;
}

.image-preview-box {
  min-height: 120px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(255,255,255,.018);
}

.image-placeholder {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
}

.image-placeholder > span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #080908;
  font-size: 20px;
}

.image-placeholder div {
  display: grid;
  gap: 4px;
}

.image-preview-box img {
  width: 100%;
  max-height: 320px;
  display: block;
  object-fit: cover;
}

.advanced {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.advanced summary {
  min-height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  color: #d8dbd6;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.advanced summary::-webkit-details-marker {
  display: none;
}

.advanced-content {
  display: grid;
  padding: 0 0 18px;
}

.advanced-item {
  min-height: 44px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.055);
  color: var(--muted);
  font-size: 12px;
}

.advanced-item b {
  color: var(--text);
  font-weight: 600;
}

.payment-line {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.payment-line div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.025);
}

.payment-line small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.payment-line strong {
  font-family: "Space Mono", monospace;
  font-size: 12px;
}

.launch-button,
.danger-button {
  min-height: 54px;
  border: 0;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 800;
}

.launch-button {
  color: #11130f;
  background: var(--lime-dark);
}

.launch-button:hover {
  filter: brightness(1.13);
}

.danger-button {
  color: white;
  background: rgba(255,94,97,.17);
  border: 1px solid rgba(255,94,97,.3);
}

.fine-print {
  margin: -7px 0 0;
  color: var(--muted-2);
  text-align: center;
  font-size: 10px;
  line-height: 1.5;
}

.preview-heading {
  display: block;
  margin-bottom: 13px;
}

.prediction-preview {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface-2);
  box-shadow: 0 25px 55px rgba(0,0,0,.35);
}

.preview-image-frame {
  aspect-ratio: 16 / 7;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(201,255,63,.065), transparent),
    #0b0d0b;
}

.preview-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-image-placeholder {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--muted);
  background: #050605;
  font-size: 21px;
}

.preview-content {
  padding: 22px;
}

.preview-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--lime);
  font-family: "Space Mono", monospace;
  font-size: 9px;
  letter-spacing: .12em;
}

.live-status {
  display: flex;
  align-items: center;
  gap: 7px;
}

.preview-content h2 {
  min-height: 58px;
  margin: 20px 0 8px;
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -.025em;
}

.preview-content > p {
  min-height: 40px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.outcome {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.outcome span {
  display: block;
  margin-bottom: 8px;
  font-family: "Space Mono", monospace;
  font-size: 9px;
}

.outcome b {
  font-family: "Space Mono", monospace;
  font-size: 22px;
}

.outcome.yes span,
.outcome.yes b {
  color: var(--lime);
}

.outcome.no span,
.outcome.no b {
  color: var(--red);
}

.consensus-bar {
  height: 5px;
  margin: 14px 0 20px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--red);
}

.consensus-bar i {
  display: block;
  width: 50%;
  height: 100%;
  background: var(--lime);
}

.preview-close {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 11px;
}

.preview-close b {
  color: var(--text);
  text-align: right;
}

.economics-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-2);
}

.economics-title {
  padding-bottom: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}

.economics-row {
  min-height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.055);
  color: var(--muted);
  font-size: 11px;
}

.economics-row:last-child {
  border-bottom: 0;
}

.economics-row b {
  color: var(--text);
  font-family: "Space Mono", monospace;
  font-size: 10px;
}

.split-banner {
  margin-top: 12px;
  padding: 13px 15px;
  display: flex;
  justify-content: space-between;
  border: 1px solid rgba(201,255,63,.18);
  border-radius: 13px;
  color: var(--muted);
  background: rgba(201,255,63,.04);
  font-family: "Space Mono", monospace;
  font-size: 9px;
}

.split-banner span:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lime);
}

.console-section {
  margin-top: 24px;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.section-heading {
  margin-bottom: 22px;
  align-items: center;
}

.section-heading h2 {
  margin: 7px 0;
  font-size: 27px;
}

.empty-state {
  min-height: 210px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.empty-state > span {
  color: var(--lime);
  font-size: 34px;
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.empty-state p {
  font-size: 12px;
}

.market-list {
  display: grid;
  gap: 13px;
}

.market {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}

.market-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.market h3 {
  margin: 7px 0 0;
}

.meta {
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 9px;
}

.pills,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: "Space Mono", monospace;
  font-size: 9px;
}

.pill.green {
  color: var(--lime);
  border-color: rgba(201,255,63,.22);
  background: rgba(201,255,63,.04);
}

.actions button {
  min-height: 37px;
  padding: 0 13px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-3);
  font-weight: 700;
}

.actions button.danger {
  color: var(--red);
}

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

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

.footer {
  min-height: 90px;
  padding: 0 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-family: "Space Mono", monospace;
  font-size: 9px;
  letter-spacing: .12em;
}

#toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  display: none;
  max-width: 420px;
  padding: 14px 17px;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #171917;
  box-shadow: var(--shadow);
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1000px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 20px;
  }

  .main-nav {
    display: none;
  }

  .chain {
    display: none;
  }

  .launch-shell {
    grid-template-columns: 1fr;
  }

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

  .preview-sticky {
    position: static;
  }
}

@media (max-width: 650px) {
  .page {
    width: min(100% - 20px, 1380px);
    padding-top: 20px;
  }

  .topbar {
    height: 66px;
  }

  .brand-copy {
    display: none;
  }

  .wallet-button {
    padding: 0 14px;
  }

  .form-panel,
  .preview-panel,
  .console-section {
    padding: 20px;
  }

  .launch-shell {
    border-radius: 18px;
  }

  .field-grid,
  .payment-line,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .panel-heading h1 {
    font-size: 36px;
  }

  .footer {
    padding: 25px 20px;
    gap: 20px;
    flex-direction: column;
    align-items: flex-start;
  }
}
