/* Extension styles for index2 — uses markets.css design tokens */

.nav button {
  position: relative;
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  transition: 0.15s;
}

.nav button:hover,
.nav button.active {
  color: var(--ink);
  background: var(--panel-2);
}

.nav button.active {
  color: var(--accent-ink);
  background: var(--accent);
  border: 2px solid var(--pixel-border);
  box-shadow: 2px 2px 0 var(--pixel-border);
}

.view-section.is-hidden {
  display: none !important;
}

.mobile-menu button {
  padding: 12px 14px;
  border-radius: 10px;
  text-align: left;
  color: var(--muted);
  width: 100%;
}

.mobile-menu button:hover {
  background: var(--panel-2);
  color: var(--ink);
}

.mobile-menu .btn-primary {
  justify-content: center;
  color: var(--accent-ink);
}

@keyframes gacha-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.dash-panel {
  background: var(--panel-solid);
  border: 2px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.3);
}

.dash-panel-sm {
  padding: 16px;
  border-radius: var(--radius-lg);
}

.dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-2);
}

.dash-head h3,
.dash-head h4 {
  margin: 0;
  font: 600 18px var(--display);
}

.dash-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: rgba(8, 6, 17, 0.62);
  font: 700 10px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.dash-badge.purple { color: var(--accent); border-color: rgba(157, 123, 255, 0.35); }

.dash-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 30px;
  border: 1px solid rgba(157, 123, 255, 0.3);
  background: rgba(157, 123, 255, 0.1);
  font: 700 10px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.dash-title {
  margin: 12px 0 0;
  font: 600 clamp(1.6rem, 4vw, 2.4rem)/1.1 var(--display);
  letter-spacing: -0.02em;
}

.dash-title .grad {
  background: linear-gradient(90deg, var(--cyan), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dash-desc {
  margin: 10px 0 0;
  max-width: 42rem;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-2);
  background: rgba(7, 6, 10, 0.45);
}

.dash-stat .label {
  display: block;
  font: 600 9px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.dash-stat .value {
  display: block;
  margin-top: 4px;
  font: 600 15px var(--mono);
  color: var(--ink);
}

.dash-stat .value.accent { color: var(--accent-2); }
.dash-stat .value.cyan { color: var(--cyan); }

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dash-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.dash-grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }

.dash-split-bar {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(7, 6, 10, 0.72);
}

.dash-split-bar > span { height: 100%; }

.dash-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 8px;
  font: 500 10px var(--mono);
  color: var(--faint);
}

.dash-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hold-card {
  background: rgba(7, 6, 10, 0.45);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.hold-card .hold-media {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
}

.hold-card .hold-media canvas {
  width: 100%;
  height: 100%;
}

.telemetry-log {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: rgba(7, 6, 10, 0.45);
  font: 500 11px var(--mono);
}

.telemetry-log .log-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.telemetry-log .log-user {
  color: var(--ink);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telemetry-scroll {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.terminal-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.terminal-chart-wrap {
  min-height: 260px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-2);
  background: rgba(7, 6, 10, 0.45);
  padding: 8px;
  position: relative;
  overflow: hidden;
}

.terminal-chart-wrap svg {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  color: var(--cyan);
}

.terminal-ledger {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  font: 500 11px var(--mono);
}

.terminal-ledger .buy { color: var(--up); }
.terminal-ledger .sell { color: var(--down); }

.order-tabs {
  display: flex;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: rgba(7, 6, 10, 0.72);
  margin-bottom: 14px;
}

.order-tabs button {
  flex: 1;
  padding: 7px;
  border-radius: 7px;
  font: 700 11px var(--mono);
  text-transform: uppercase;
  color: var(--muted);
}

.order-tabs button.active-buy {
  background: var(--cyan);
  color: var(--accent-ink);
}

.order-tabs button.active-sell {
  background: var(--down);
  color: #fff;
}

.order-field label {
  display: block;
  margin-bottom: 6px;
  font: 700 9px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.order-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 8px 0;
}

.order-row button {
  padding: 6px;
  border-radius: 7px;
  border: 1px solid var(--line-2);
  background: rgba(7, 6, 10, 0.72);
  font: 600 9px var(--mono);
  color: var(--muted);
}

.order-row button:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.order-summary {
  padding-top: 10px;
  border-top: 1px solid var(--line-2);
  font: 500 12px var(--mono);
}

.order-summary .row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.gacha-sphere {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  animation: gacha-bounce 2s ease infinite;
}

.gacha-sphere.spinning {
  animation: spin 0.8s linear infinite;
}

.gacha-sphere-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg);
  display: grid;
  place-items: center;
  color: var(--cyan);
}

.gacha-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 140px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-2);
  background: rgba(7, 6, 10, 0.45);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font: 500 11px var(--mono);
}

.data-table th {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-2);
  color: var(--muted);
}

.data-table tr:hover td {
  background: rgba(157, 123, 255, 0.04);
}

.feature-card {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: border-color 0.15s;
}

.feature-card:hover {
  border-color: rgba(157, 123, 255, 0.45);
}

.feature-card h4 {
  margin: 0;
  font: 600 14px var(--display);
}

.feature-card p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.gauge-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 140px;
}

.gauge-label {
  position: absolute;
  text-align: center;
}

.gauge-label strong {
  display: block;
  font: 700 20px var(--display);
}

.gauge-label span {
  font: 600 9px var(--mono);
  color: var(--faint);
  text-transform: uppercase;
}

.search-inline {
  position: relative;
  width: 100%;
  max-width: 260px;
}

.search-inline input {
  width: 100%;
  padding: 8px 36px 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(7, 6, 10, 0.68);
  color: var(--ink);
  font-size: 12px;
  outline: none;
}

.search-inline input:focus {
  border-color: var(--accent);
}

.search-inline i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--faint);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-2);
}

.studio-tag {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(35, 227, 167, 0.35);
  background: rgba(35, 227, 167, 0.1);
  font: 700 10px var(--mono);
  color: var(--accent-2);
}

.range-input {
  width: 100%;
  accent-color: var(--accent);
  height: 4px;
}

.claim-box {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-2);
  background: rgba(7, 6, 10, 0.45);
  font: 500 12px var(--mono);
}

.claim-box .row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

@media (max-width: 1024px) {
  .dash-grid-12 .col-4,
  .dash-grid-12 .col-5,
  .dash-grid-12 .col-7,
  .dash-grid-12 .col-8 {
    grid-column: span 12;
  }

  .terminal-layout,
  .dash-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .dash-stats {
    grid-template-columns: 1fr 1fr;
  }
}
