/* ── Base modal overlay ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal h2 {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal h3 {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 18px 0 6px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.modal p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.modal-close {
  width: 100%;
  padding: 12px;
  margin-top: 16px;
  background: var(--accent);
  color: #000;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  border: none;
  border-radius: 8px;
}
.modal-close.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  margin-top: 8px;
}
.modal-close.secondary:hover { border-color: var(--accent2); color: var(--accent2); }

/* ── Purchase modal ── */
.meta-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.meta-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  width: 380px;
  max-width: 95vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  animation: modalIn 0.2s ease;
}

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

.meta-modal h3 {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

.meta-subtitle {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 22px;
  line-height: 1.5;
}

.meta-field { margin-bottom: 16px; }

.meta-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  margin-bottom: 6px;
  display: block;
}

.meta-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s;
}
.meta-input:focus       { border-color: var(--accent); }
.meta-input::placeholder { color: var(--text-dim); opacity: 0.5; }

.meta-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.meta-confirm-btn {
  flex: 1;
  padding: 12px;
  background: linear-gradient(135deg, var(--accent), #00cc6a);
  color: #000;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border: none;
  border-radius: 10px;
  transition: all 0.2s;
}
.meta-confirm-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0,255,136,0.3); }

.meta-cancel-btn {
  padding: 12px 18px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 11px;
  border-radius: 10px;
  transition: all 0.15s;
}
.meta-cancel-btn:hover { border-color: var(--accent2); color: var(--accent2); }

.meta-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface2);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.meta-preview-swatch { width: 20px; height: 20px; border-radius: 4px; flex-shrink: 0; }
.meta-preview-info   { font-size: 11px; color: var(--text-dim); }
.meta-preview-info strong { color: var(--text); }

/* ── Blink steps ── */
.blink-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.blink-step {
  padding: 4px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--surface2);
  transition: all 0.12s;
  white-space: nowrap;
}
.blink-step:hover  { border-color: var(--accent); color: var(--accent); }
.blink-step.active { background: rgba(0,255,136,0.12); border-color: var(--accent); color: var(--accent); }

/* ── My Pixels modal ── */
.my-pixels-modal { max-width: 560px; }

.my-pixels-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
  max-height: 50vh;
  overflow-y: auto;
}

.my-pixel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface2);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
}

.my-pixel-swatch {
  width: 18px; height: 18px;
  border-radius: 3px;
  flex-shrink: 0;
}

.my-pixel-coords {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  color: var(--text-dim);
  min-width: 90px;
}

.my-pixel-owner   { color: var(--text); font-weight: 700; flex: 1; }
.my-pixel-tier    { font-size: 10px; color: var(--accent); }

.my-pixel-locate {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  transition: all 0.15s;
}
.my-pixel-locate:hover { border-color: var(--accent); color: var(--accent); }

/* ── Stats modal ── */
.stats-modal { max-width: 560px; }

.stats-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.stats-summary-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stats-summary-val {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.stats-summary-lbl {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-tier-row { margin-bottom: 18px; }

.stats-tier-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.stats-tier-badge { font-size: 14px; }

.stats-tier-name {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}

.stats-tier-price {
  font-size: 11px;
  color: var(--text-dim);
}

.stats-bar-wrap {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 5px;
}

.stats-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.stats-tier-nums {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
}

/* ── Stats reaction sections ── */
.stats-reactions-divider {
  border-top: 1px solid var(--border);
  margin: 20px 0 16px;
}

.stats-reactions-row {
  display: flex;
  gap: 16px;
}

.stats-reactions-col {
  flex: 1;
  min-width: 0;
}

.stats-reactions-title {
  font-family: 'Syne', sans-serif;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.stats-reaction-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
}

.stats-reaction-msg {
  font-size: 11px;
  color: var(--text);
  font-style: italic;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-reaction-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-dim);
  gap: 6px;
}

.stats-reaction-score {
  font-weight: 700;
  white-space: nowrap;
}
.stats-reaction-score.liked    { color: var(--accent); }
.stats-reaction-score.disliked { color: var(--accent2); }

/* ── T&S / Privacy modal ── */
.tos-modal { max-width: 600px; }

.tos-body {
  max-height: 55vh;
  overflow-y: auto;
  padding-right: 8px;
  margin: 16px 0;
}

.tos-notice {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 12px;
  line-height: 1.6;
}
.tos-notice a { color: var(--accent); text-decoration: underline; }

/* ── Welcome / Intro modal ── */
.welcome-modal {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: min(700px, 94vw);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(0,255,136,0.06);
  animation: modalIn 0.3s ease;
}

.welcome-pixel-grid {
  display: grid;
  grid-template-columns: repeat(40, 1fr);
  height: 56px;
  overflow: hidden;
  flex-shrink: 0;
}

.welcome-px {
  animation: welcomePxFade 3s ease-in-out infinite;
  opacity: 0.6;
}

@keyframes welcomePxFade {
  0%, 100% { opacity: 0.25; }
  50%       { opacity: 0.85; }
}

.welcome-body {
  padding: 28px 36px 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.welcome-tag {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
}

.welcome-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  margin: 0;
}

.welcome-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.welcome-lead {
  font-size: 13px;
  line-height: 1.75;
  color: var(--text);
  margin: 0;
}

.welcome-lead strong {
  color: var(--accent);
}

.welcome-desc {
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-dim);
  margin: 0;
}

.welcome-desc em {
  color: var(--text);
  font-style: normal;
  font-weight: 700;
}

.welcome-tagline {
  font-family: 'Syne', sans-serif;
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.2;
  text-align: center;
  background: linear-gradient(135deg, var(--accent), #00cc6a, var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 4px;
}

.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.welcome-cta-primary {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--accent), #00cc6a);
  color: #000;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border: none;
  border-radius: 10px;
  transition: all 0.2s;
}
.welcome-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0,255,136,0.35);
}

.welcome-cta-secondary {
  width: 100%;
  padding: 14px 20px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  border-radius: 10px;
  transition: all 0.15s;
}
.welcome-cta-secondary:hover {
  border-color: var(--accent3);
  color: var(--accent3);
}

.welcome-legal {
  font-size: 10px;
  color: var(--text-dim);
  opacity: 0.7;
  line-height: 1.6;
}
.welcome-legal a {
  color: var(--text-dim);
  text-decoration: underline;
}

/* ── Beta notice (welcome modal) ── */
.welcome-beta-notice {
  background: rgba(0,255,136,0.08);
  border: 1px solid rgba(0,255,136,0.3);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 20px;
  text-align: center;
}
.welcome-beta-notice strong { color: var(--accent); }

/* ── Beta notice (how it works modal) ── */
.how-beta-notice {
  background: rgba(0,255,136,0.08);
  border: 1px solid rgba(0,255,136,0.3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 16px;
}
.how-beta-notice strong { color: var(--accent); }
.welcome-legal a:hover { color: var(--accent); }
