:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --panel: #151009;
  --panel-2: #181d22;
  --line: rgba(255, 255, 255, 0.1);
  --text: #fff5e8;
  --muted: #b9a895;
  --orange: #ff7a18;
  --orange-2: #ffb347;
  --steel: #86a0b8;
  --green: #55d88a;
  --red: #ff6b6b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 122, 24, 0.22), transparent 34rem),
    linear-gradient(135deg, rgba(255, 179, 71, 0.08), transparent 28rem),
    var(--bg);
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.shell {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 260px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  background: rgba(11, 13, 16, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: emberPulse 4s ease-in-out infinite;
}

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

.brand small,
.eyebrow,
.muted {
  color: var(--muted);
}

.search {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  min-width: 180px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.search span {
  color: var(--orange-2);
  font-size: 13px;
}

input,
textarea {
  width: 100%;
  color: var(--text);
  background: #0e1216;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 11px 12px;
  outline: none;
}

.search input {
  border: 0;
  padding: 0;
  background: transparent;
}

input:focus,
textarea:focus {
  border-color: rgba(255, 122, 24, 0.75);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.12);
}

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

.nav button,
.nav-link,
.ghost,
.primary,
.tier-row button,
.tiny-btn {
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  padding: 0 14px;
}

.nav-link {
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.nav button.active,
.primary,
.tier-row button.selected {
  border-color: rgba(255, 122, 24, 0.7);
  background: linear-gradient(135deg, #ff7a18, #c94c06);
  color: #170b03;
  font-weight: 800;
}

.nav button:hover,
.nav-link:hover,
.ghost:hover,
.primary:hover,
.tier-row button:hover,
.tiny-btn:hover,
.icon-links a:hover,
.link-chip:hover,
.inline-link:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 122, 24, 0.65);
  box-shadow: 0 10px 28px rgba(255, 122, 24, 0.13);
}

main {
  padding: 22px 20px 50px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: end;
  min-height: 180px;
  padding: 32px;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  max-width: 920px;
  margin: 0;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.02;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 10px;
}

.hero-stats span,
.pill {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.hero-stats span {
  animation: riseIn 420ms ease both;
}

.hero-stats span:nth-child(2) {
  animation-delay: 80ms;
}

.hero-stats span:nth-child(3) {
  animation-delay: 160ms;
}

.hero-stats b {
  display: block;
  color: var(--orange-2);
  font-size: 22px;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: viewIn 280ms ease both;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 26px;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  font-size: 12px;
}

.coin-list {
  display: grid;
  gap: 10px;
}

.coin-card,
.panel,
.secret-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 122, 24, 0.09), rgba(20, 26, 31, 0.92));
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.25);
}

.coin-card,
.panel,
.wallet-card {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.coin-card:hover,
.panel:hover,
.wallet-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 24, 0.35);
  box-shadow: 0 24px 78px rgba(0, 0, 0, 0.32);
}

.coin-card {
  display: grid;
  grid-template-columns: 58px minmax(180px, 1.1fr) minmax(150px, 0.7fr) minmax(200px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
}

.coin-icon {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  object-fit: contain;
  padding: 4px;
  background: #050505;
  border: 1px solid rgba(255, 122, 24, 0.22);
}

.coin-title strong {
  display: block;
  font-size: 16px;
}

.ca-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ca-row code {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ffd6ac;
}

.icon-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.icon-links a,
.link-chip,
.tiny-btn,
.inline-link {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 700;
}

.link-chip {
  cursor: pointer;
}

.panel {
  padding: 18px;
}

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

.deploy-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.two,
.three,
.settings-grid {
  display: grid;
  gap: 12px;
}

.two {
  grid-template-columns: 1fr 0.55fr;
}

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

.settings-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 14px;
}

summary {
  cursor: pointer;
  color: var(--orange-2);
  font-weight: 800;
}

.tier-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.image-drop {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 180px;
  border: 1px dashed rgba(255, 122, 24, 0.45);
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 122, 24, 0.15), rgba(255, 255, 255, 0.04));
}

.image-drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.image-drop img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: none;
}

.image-drop.has-image img {
  display: block;
}

.image-drop.has-image span {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.55);
}

.estimate-box {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.estimate-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.wallet-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.wallet-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  animation: riseIn 260ms ease both;
}

.wallet-card code,
.secret-box code {
  word-break: break-all;
  color: #ffd6ac;
}

.wallet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: min(640px, 100%);
  max-height: min(760px, 90vh);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #11161b;
  animation: modalIn 220ms ease both;
}

.info-box {
  white-space: pre-wrap;
  word-break: break-word;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #ffd6ac;
  background: rgba(255, 255, 255, 0.04);
}

.forging {
  text-align: center;
}

.forge-ring {
  width: 170px;
  height: 170px;
  margin: 22px auto;
  border-radius: 50%;
  border: 8px solid rgba(255, 122, 24, 0.16);
  border-top-color: var(--orange);
  animation: spin 1s linear infinite;
}

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

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: none;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 122, 24, 0.45);
  border-radius: 8px;
  background: #160d07;
}

.toast.show {
  display: block;
  animation: toastIn 180ms ease both;
}

@keyframes emberPulse {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(255, 122, 24, 0));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(255, 122, 24, 0.35));
    transform: scale(1.03);
  }
}

@keyframes viewIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 980px) {
  .topbar,
  .hero,
  .deploy-grid,
  .profile-grid,
  .wallet-layout {
    grid-template-columns: 1fr;
  }

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

  .coin-card,
  .two,
  .three,
  .settings-grid,
  .tier-row,
  .hero-stats {
    grid-template-columns: 1fr;
  }
}
