:root {
  --bg: #05070a;
  --bg-elevated: #0b1016;
  --card: #111824;
  --card-soft: #131b26;
  --ink: #e6edf5;
  --ink-muted: #9aa6b7;
  --accent: #ffb347;
  --accent-soft: rgba(255, 179, 71, 0.12);
  --danger: #ff4b6a;
  --danger-soft: rgba(255, 75, 106, 0.15);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.75);
  --border-subtle: 1px solid rgba(255, 255, 255, 0.04);
  --mono: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at top, #05070a 0, #020308 50%, #000 100%);
  color: var(--ink);
  font-family: var(--sans);
}

/* Layout */

.token-page {
  min-height: 100vh;
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 16px 32px;
}

/* Header */

.token-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.token-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.token-logo {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: radial-gradient(circle at 0 0, #1f2937 0, #020617 55%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.7);
}

.token-title {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0.03em;
}

.token-subtitle {
  margin: 2px 0 0;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.token-chain-pill {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: linear-gradient(
      120deg,
      rgba(56, 189, 248, 0.12),
      transparent 40%,
      rgba(129, 230, 217, 0.14)
    ),
    rgba(15, 23, 42, 0.92);
}

/* Status bar */

.status-bar {
  margin-bottom: 16px;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
}

.status-ok {
  background: rgba(16, 185, 129, 0.13);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #a7f3d0;
}

.status-error {
  background: var(--danger-soft);
  border: 1px solid rgba(248, 113, 113, 0.9);
  color: #fecaca;
}

/* Grid */

.token-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 2fr);
  gap: 16px;
  align-items: flex-start;
}

/* Cards */

.card {
  background: radial-gradient(circle at top left, #161e2b 0, #040812 55%);
  border-radius: var(--radius-xl);
  border: var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 14px 16px 14px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -120px;
  background: radial-gradient(circle at 0 0, rgba(248, 181, 0, 0.18), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.card-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.card-header h2 {
  margin: 0;
  font-size: 1rem;
}

.muted {
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.small {
  font-size: 0.75rem;
}

/* Pill */

.pill {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.pill-soft {
  background: rgba(15, 23, 42, 0.9);
}

/* Price card */

.card-price {
  grid-column: 1 / -1;
}

.card-price-body {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr);
  gap: 12px;
  align-items: stretch;
}

.price-main {
  padding-right: 10px;
}

.price-label {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.price-value {
  font-size: 2rem;
  font-weight: 600;
}

.price-subvalue {
  margin-top: 4px;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.price-token-line {
  margin-top: 6px;
  font-size: 0.86rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.token-separator {
  color: rgba(148, 163, 184, 0.7);
}

.price-mint {
  margin-top: 4px;
  font-size: 0.78rem;
}

.mono {
  font-family: var(--mono);
  letter-spacing: 0.03em;
}

/* Price side metrics */

.price-side {
  padding-left: 8px;
  border-left: 1px solid rgba(15, 23, 42, 0.9);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
}

.metric-label {
  color: var(--ink-muted);
}

.metric-value {
  font-family: var(--mono);
}

/* Metric list */

.metric-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.86rem;
}

.metric-list li {
  display: flex;
  justify-content: space-between;
}

/* Supply & locked */

.card-locked .card-body {
  max-height: 210px;
  overflow-y: auto;
}

.locked-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.locked-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(55, 65, 81, 0.9);
}

.locked-title {
  font-size: 0.9rem;
  margin: 0 0 6px;
}

.locked-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

/* Footer */

.token-footer {
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.token-footer a {
  color: var(--accent);
  text-decoration: none;
}

.token-footer a:hover {
  text-decoration: underline;
}

/* Trade buttons under price */

.trade-links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trade-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease,
    border-color 0.12s ease;
}

.trade-btn-primary {
  background: linear-gradient(135deg, #f97316, #facc15);
  color: #111827;
  box-shadow: 0 10px 30px rgba(248, 181, 0, 0.4);
}

.trade-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(248, 181, 0, 0.55);
}

.trade-btn-ghost {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(156, 163, 175, 0.5);
  color: var(--ink);
}

.trade-btn-ghost:hover {
  background: rgba(30, 64, 175, 0.4);
  border-color: rgba(191, 219, 254, 0.8);
}

/* Locked summary */

.locked-summary {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.95), transparent 70%);
  border: 1px solid rgba(55, 65, 81, 0.8);
}

.locked-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
}

.locked-summary-row + .locked-summary-row {
  margin-top: 4px;
}

.locked-summary-label {
  color: var(--ink-muted);
}

.locked-summary-value {
  font-family: var(--mono);
}

/* Explorer link in locked contracts */

.locked-link {
  color: var(--accent);
  text-decoration: none;
}

.locked-link:hover {
  text-decoration: underline;
}

/* Responsive */

@media (max-width: 880px) {
  .token-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .card-price-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .price-side {
    padding-left: 0;
    border-left: none;
    border-top: 1px solid rgba(15, 23, 42, 0.9);
    margin-top: 10px;
    padding-top: 10px;
  }
}

@media (max-width: 640px) {
  .token-page {
    padding-top: 20px;
  }

  .token-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .token-chain-pill {
    align-self: flex-end;
  }
}
