/* style.css — estilos principales del proyecto */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Inter:wght@300;400;500;600&display=swap');

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

:root {
  --bg:        #0d0d14;
  --bg2:       #13131f;
  --bg3:       #1a1a2e;
  --border:    rgba(255,255,255,0.08);
  --border2:   rgba(255,255,255,0.15);
  --text:      #e8e8f0;
  --text2:     rgba(232,232,240,0.5);
  --text3:     rgba(232,232,240,0.25);
  --accent:    #7c6af7;
  --accent2:   #5b4fcf;
  --green:     #1d9e75;
  --red:       #e24b4a;
  --amber:     #f5a623;
  --radius:    10px;
  --radius-lg: 16px;
}

.hidden { display: none !important; }

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

/* ─── LAYOUT ─── */

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ─── HEADER ─── */

#header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 52px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 10;
}

#logo {
  font-family: 'Space Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -1px;
}

#logo span { color: var(--accent); }

#header-stats {
  display: flex;
  gap: 24px;
  font-size: 12px;
  color: var(--text2);
}

#header-stats strong {
  color: var(--text);
  font-weight: 500;
}

#header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ─── BOTONES ─── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text2);
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
}

.btn:hover {
  background: var(--bg3);
  color: var(--text);
  border-color: var(--border2);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent2);
  border-color: var(--accent2);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ─── TICKER ─── */

#ticker-bar {
  display: flex;
  align-items: center;
  height: 36px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
  gap: 0;
}

#ticker-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--amber);
  white-space: nowrap;
  padding: 0 14px;
  border-right: 1px solid var(--border);
  height: 100%;
  display: flex;
  align-items: center;
  background: var(--bg2);
  z-index: 1;
  flex-shrink: 0;
}

#ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  mask-image: linear-gradient(to right, transparent 0%, black 3%, black 97%, transparent 100%);
}

#ticker-inner {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: ticker-scroll 30s linear infinite;
  height: 100%;
}

#ticker-inner:hover { animation-play-state: paused; }

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  height: 100%;
  border-right: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  font-size: 12px;
  color: var(--text2);
}

.ticker-item:hover { background: var(--bg3); color: var(--text); }

.ticker-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

.ticker-name { font-weight: 500; color: var(--text); }
.ticker-flips { color: var(--amber); font-family: 'Space Mono', monospace; font-size: 11px; }
.ticker-price { color: var(--accent); font-family: 'Space Mono', monospace; font-size: 11px; }

@keyframes ticker-scroll {
  /* #10: empieza en -50% (segunda copia) para que el primer item visible siempre esté completo */
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(-100%); }
}

/* ─── MAPA ─── */

/* ─── MAPA ─── */

/* Contenedor: ocupa todo el espacio restante, 20px de margen */
#map-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  padding: 20px;
  min-height: 0;
}

/* Canvas: llena el área interior (padding ya resta los 20px) */
#map-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

/* ─── CONTROLES DEL MAPA ─── */

#map-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.map-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  font-family: monospace;
}

.map-btn:hover {
  background: var(--bg3);
  color: var(--text);
}

/* ─── TOOLTIP DEL MAPA ─── */

#map-tooltip {
  position: fixed;
  display: none;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
  pointer-events: none;
  z-index: 100;
  min-width: 180px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.tip-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  font-family: 'Space Mono', monospace;
}

.tip-row {
  display: flex;
  justify-content: space-between;
  color: var(--text2);
  padding: 2px 0;
  gap: 12px;
}

.tip-row strong { color: var(--text); }
.tip-buy { color: var(--accent) !important; }

.tip-hint {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  color: var(--accent);
  font-size: 11px;
  text-align: center;
}

/* ─── LEYENDA ─── */

#map-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* ─── MODAL INFO DEL BLOQUE ─── */

#info-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  backdrop-filter: blur(2px);
}

#block-info-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 420px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  z-index: 300;
  overflow: hidden;
  flex-direction: column;
  max-height: 90vh;
  overflow-y: auto;
}

#info-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
}
#info-close:hover { color: var(--text); }

/* Imagen del bloque */
#info-image-wrap {
  width: 100%;
  aspect-ratio: 16/7;
  background: var(--bg3);
  position: relative;
  overflow: hidden;
}

#info-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text3);
  font-family: 'Space Mono', monospace;
}

#info-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Cuerpo del bloque ocupado */
#info-occupied {
  flex-direction: column;
}

#info-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#info-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Space Mono', monospace;
  padding-right: 28px;
}

#info-coords-label {
  font-size: 11px;
  color: var(--text3);
  font-family: 'Space Mono', monospace;
  margin-top: -6px;
}

#info-url-wrap {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#info-url-link {
  color: var(--accent);
  font-size: 13px;
  text-decoration: none;
  word-break: break-all;
}
#info-url-link:hover { text-decoration: underline; }

#info-url-disclaimer {
  font-size: 10px;
  color: var(--text3);
  line-height: 1.5;
}

#info-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text2);
}
#info-stats strong { color: var(--text); }

/* Bloque libre — preview */
#info-free {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#info-free-preview {
  border: 1px dashed var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  opacity: 0.7;
}

.free-preview-image {
  background: var(--bg3);
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text3);
  font-family: 'Space Mono', monospace;
  border-bottom: 1px dashed var(--border);
}

.free-preview-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.free-preview-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text3);
  font-family: 'Space Mono', monospace;
}

.free-preview-url {
  font-size: 12px;
  color: var(--accent);
  opacity: 0.5;
}

.free-preview-hint {
  font-size: 11px;
  color: var(--text3);
  margin-top: 6px;
  line-height: 1.5;
  font-style: italic;
}

#info-free-coords {
  font-size: 11px;
  color: var(--text3);
  font-family: 'Space Mono', monospace;
  text-align: center;
}

/* ─── OVERLAY Y MODAL ─── */

#modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  backdrop-filter: blur(2px);
}

#buy-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 440px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 28px;
  z-index: 300;
  flex-direction: column;
  gap: 20px;
  max-height: 90vh;
  overflow-y: auto;
}

#modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#modal-close:hover { color: var(--text); }

#modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  padding-right: 32px;
}

#modal-coords {
  font-size: 11px;
  color: var(--text3);
  font-family: 'Space Mono', monospace;
  margin-top: -12px;
}

/* Precio grande */
.modal-price-block {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-price-label { font-size: 12px; color: var(--text2); }
#modal-price { font-size: 28px; font-weight: 700; color: var(--accent); font-family: 'Space Mono', monospace; }

/* Info flip */
#flip-info {
  background: rgba(124,106,247,0.08);
  border: 1px solid rgba(124,106,247,0.2);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.flip-row { color: var(--text2); display: flex; justify-content: space-between; }
.flip-row strong { color: var(--text); }
.flip-row.muted { color: var(--text3); margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--border); }

/* Campos */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 12px;
  color: var(--text2);
  display: flex;
  align-items: center;
  gap: 6px;
}

.req-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 20px;
  background: rgba(226,75,74,0.15);
  color: var(--red);
}

.opt-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 20px;
  background: rgba(29,158,117,0.15);
  color: var(--green);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="url"] {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 13px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus { border-color: var(--accent); }
.field input::placeholder { color: var(--text3); }

.field-hint { font-size: 11px; color: var(--text3); margin-top: 2px; }
#image-upload-wrap { display: flex; flex-direction: column; gap: 0; }
#btn-upload-image { border-style: dashed; opacity: 0.8; }
#btn-upload-image:hover { opacity: 1; }

/* ── Color picker ──────────────────────────────────────────── */
.color-swatch {
  width: 32px; height: 32px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 13px;
  color: #fff;
  transition: transform .15s, border-color .15s;
  flex-shrink: 0;
}
.color-swatch:hover  { transform: scale(1.15); }
.color-swatch.active { border-color: #fff; transform: scale(1.18); box-shadow: 0 0 0 2px rgba(255,255,255,.3); }

/* ── Buscador ───────────────────────────────────────────────── */
#search-wrap {
  position: relative;
  flex: 1;
  max-width: 220px;
}
#search-input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  padding: 6px 12px;
  outline: none;
  transition: border-color .2s;
}
#search-input:focus { border-color: var(--accent); }
#search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 200;
  display: none;
}
#search-results.open { display: block; }
.search-item {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--bg3); }
.search-dot {
  width: 10px; height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}
.search-item-name { font-weight: 600; }
.search-item-id   { color: var(--text3); font-size: 11px; }
.search-no-results { padding: 12px; text-align: center; color: var(--text3); font-size: 12px; }

/* Highlight del slot buscado en el mapa */
@keyframes pulse-highlight {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

#modal-error {
  font-size: 12px;
  color: var(--red);
  min-height: 16px;
}

/* Éxito */
#modal-success {
  display: none;
  text-align: center;
  padding: 20px 0;
}

.success-icon {
  font-size: 40px;
  color: var(--green);
  margin-bottom: 12px;
}

.success-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.success-sub {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 4px;
  line-height: 1.5;
}

.success-price {
  margin-top: 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  font-family: 'Space Mono', monospace;
}

/* ─── WALLET BUTTON ─── */

.btn-wallet {
  background: rgba(124,106,247,0.12);
  border-color: rgba(124,106,247,0.4);
  color: var(--accent);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
}

.btn-wallet:hover {
  background: rgba(124,106,247,0.22);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-wallet--connected {
  background: rgba(29,158,117,0.1);
  border-color: rgba(29,158,117,0.4);
  color: var(--green);
}

.btn-wallet--connected:hover {
  background: rgba(29,158,117,0.18);
  color: var(--green);
}

/* ─── PESTAÑAS DEL MODAL ─── */

#modal-tabs {
  display: flex;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
}

.modal-tab {
  flex: 1;
  padding: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text2);
  font-family: 'Inter', sans-serif;
  transition: all 0.15s;
}

.modal-tab:hover   { background: var(--bg3); color: var(--text); }
.modal-tab.active  { background: var(--accent); color: #fff; }

/* ─── MARKET INFO (split de pago) ─── */

#market-info, .market-split-preview {
  background: rgba(29,158,117,0.08);
  border: 1px solid rgba(29,158,117,0.2);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* ─── OFERTAS / BIDS ─── */

#section-bids, #info-bids-preview {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.bids-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  padding: 8px 12px 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

.bid-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
}
.bid-row:last-child { border-bottom: none; }
.bid-row strong     { color: var(--text); }
.bid-row.bid-top    { background: rgba(124,106,247,0.06); }
.bid-row.bid-top strong { color: var(--accent); }

.bid-empty {
  padding: 12px;
  font-size: 12px;
  color: var(--text3);
  text-align: center;
  font-style: italic;
}

/* ─── INFO MODAL: precio de lista ─── */

.info-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text2);
}

/* ─── BADGES de estado ─── */

.slot-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  vertical-align: middle;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.03em;
}

.badge-sale  { background: rgba(29,158,117,0.18); color: var(--green); }
.badge-owned { background: rgba(255,255,255,0.06); color: var(--text3); }

/* ─── MODAL PUBLICAR EN VENTA ─── */

#list-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 400px;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 28px;
  z-index: 300;
  flex-direction: column;
  gap: 18px;
  max-height: 90vh;
  overflow-y: auto;
}

/* ─── BADGE "Tu slot" ─── */

.badge-mine {
  background: rgba(245,166,35,0.18);
  color: var(--amber);
}

/* ─── PANEL MIS SLOTS ─── */

#my-slots-panel {
  position: fixed;
  top: 60px;
  right: 16px;
  width: 340px;
  max-height: 70vh;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  z-index: 500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: slideDown 0.15s ease;
}

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

.my-slots-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

.my-slots-header button {
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
}

#my-slots-list {
  overflow-y: auto;
  flex: 1;
}

.my-slots-loading,
.my-slots-empty {
  padding: 24px 16px;
  font-size: 13px;
  color: var(--text3);
  text-align: center;
  line-height: 1.7;
}

.my-slot-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}

.my-slot-row:hover { background: var(--bg3); }
.my-slot-row:last-child { border-bottom: none; }

.my-slot-color {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.my-slot-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.my-slot-info strong { font-size: 13px; color: var(--text); }
.my-slot-info span   { font-size: 10px; color: var(--text3); font-family: 'Space Mono', monospace; }

.my-slot-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.my-slot-price {
  font-size: 12px;
  color: var(--green);
  font-family: 'Space Mono', monospace;
  font-weight: 600;
}

/* ─── ANIMACIÓN SHAKE (botón wallet) ─── */

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-4px); }
  75%       { transform: translateX(4px); }
}

/* ─── REPORTE DE CONTENIDO ─── */

#report-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1800;
  backdrop-filter: blur(2px);
}
#report-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1801;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 24px 22px;
  width: 100%;
  max-width: 380px;
  flex-direction: column;
  gap: 10px;
  animation: fadeUp 0.25s ease;
}
#report-close {
  position: absolute; top: 12px; right: 12px;
  width: 26px; height: 26px;
  border-radius: 50%; background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2); font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
#report-title { font-size: 15px; font-weight: 600; color: var(--text); padding-right: 24px; }
#report-sub   { font-size: 12px; color: var(--text3); }
#report-modal select {
  width: 100%; background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text); padding: 8px 10px;
  font-size: 13px; cursor: pointer;
}
#report-modal textarea {
  width: 100%; background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text); padding: 8px 10px;
  font-size: 13px; font-family: inherit;
}

/* ─── WAITLIST FAB ─── */

#waitlist-fab {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 500;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text); font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex; align-items: center; justify-content: center;
}
#waitlist-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(99,102,241,0.3);
}

/* ─── WAITLIST MODAL ─── */

#waitlist-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1800;
  backdrop-filter: blur(2px);
}
#waitlist-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1801;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  width: 100%;
  max-width: 400px;
  flex-direction: column;
  gap: 0;
  animation: fadeUp 0.25s ease;
}
#waitlist-close {
  position: absolute; top: 12px; right: 12px;
  width: 26px; height: 26px;
  border-radius: 50%; background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2); font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
#waitlist-title {
  font-size: 16px; font-weight: 700;
  color: var(--text); text-align: center; margin-bottom: 6px;
}
#waitlist-sub {
  font-size: 12px; color: var(--text2);
  text-align: center; line-height: 1.6; margin-bottom: 4px;
}

/* ─── ONBOARDING ─── */

#onboarding-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 2000;
  backdrop-filter: blur(4px);
}
#onboarding-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2001;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  flex-direction: column;
  gap: 16px;
  animation: fadeUp 0.35s ease;
}
#onboarding-logo {
  font-family: 'Space Mono', monospace;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}
#onboarding-logo span { color: var(--accent); }
#onboarding-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
#onboarding-sub {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
}
#onboarding-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg3);
  border-radius: var(--radius);
  padding: 16px;
}
.ob-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ob-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
.ob-step strong {
  display: block;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 2px;
}
.ob-step span {
  font-size: 12px;
  color: var(--text3);
  line-height: 1.5;
}
#onboarding-disclaimer {
  font-size: 11px;
  color: var(--text3);
  background: rgba(239,68,68,0.07);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius);
  padding: 10px 12px;
  line-height: 1.5;
}
#onboarding-disclaimer strong { color: #ef4444; }
#onboarding-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
  width: 100%;
}
#onboarding-btn:hover { opacity: 0.85; }
#onboarding-legal {
  font-size: 11px;
  color: var(--text3);
  text-align: center;
}
#onboarding-legal a {
  color: var(--accent);
  text-decoration: none;
}
#onboarding-legal a:hover { text-decoration: underline; }

/* ─── COOKIE BANNER ─── */

#cookie-banner {
  position: fixed;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  z-index: 1900;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  width: calc(100% - 32px);
  max-width: 620px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: fadeUp 0.3s ease;
}
#cookie-text {
  font-size: 12px;
  color: var(--text2);
  flex: 1;
  line-height: 1.5;
}
#cookie-text a { color: var(--accent); text-decoration: none; }
#cookie-text a:hover { text-decoration: underline; }
#cookie-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ─── RESPONSIVE ─── */

@media (max-width: 768px) {
  /* Header */
  #header-stats { display: none; }
  #logo { font-size: 15px; }
  header { padding: 0 10px; gap: 8px; }

  /* Ocultar "Reset vista" en móvil para ahorrar espacio */
  #btn-reset { display: none; }

  /* Botón wallet más compacto */
  #btn-wallet { font-size: 11px; padding: 6px 10px; }
  #btn-how { font-size: 12px; padding: 6px 10px; }

  /* Ticker */
  #ticker-wrap { font-size: 12px; }

  /* Modales — ancho completo en móvil */
  #buy-modal {
    max-width: 96vw;
    padding: 18px 16px;
    margin: 0 auto;
  }
  #info-modal {
    max-width: 96vw;
    padding: 0;
  }
  #list-modal {
    max-width: 96vw;
    padding: 20px 16px;
  }

  /* Info modal: imagen más pequeña */
  #info-image-wrap { height: 140px; }

  /* Buy modal: grid precio a columna */
  .price-box { flex-direction: column; gap: 6px; }

  /* Botones de acción en info modal: columna */
  #info-actions { flex-direction: column; gap: 8px; }
  #info-actions .btn { width: 100%; }

  /* Panel Mis Slots */
  #my-slots-panel {
    width: 100vw;
    right: 0;
    border-radius: var(--radius) var(--radius) 0 0;
    bottom: 0;
    top: auto;
    max-height: 70vh;
  }

  /* Tooltip — más pequeño */
  #map-tooltip { font-size: 11px; padding: 8px 10px; max-width: 200px; }

  /* Canvas legend */
  #map-legend { font-size: 10px; gap: 8px; padding: 4px 10px; }
  #map-legend span { gap: 4px; }

  /* Zoom buttons */
  #map-controls { bottom: 50px; right: 8px; }

  /* Modales: ocultar split preview en móvil para ahorrar espacio vertical */
  .market-split { flex-direction: column; gap: 4px; }

  /* Como funciona dropdown */
  #how-panel { right: 0; left: 0; margin: 0 8px; }
}

@media (max-width: 480px) {
  /* Extra pequeño — teléfonos */
  #buy-modal, #list-modal {
    padding: 14px 12px;
  }
  .modal-price-display { font-size: 28px; }
  .field input, .field textarea { font-size: 16px; } /* evita zoom automático iOS */
  #btn-confirm { font-size: 13px; }
  #waitlist-fab { bottom: 16px; right: 16px; width: 40px; height: 40px; font-size: 16px; }
  #onboarding-modal { padding: 24px 16px; }
  #cookie-banner { flex-direction: column; gap: 10px; bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  #cookie-actions { width: 100%; justify-content: flex-end; }
}
