:root {
  --bg: #08080a;
  --card: #12121a;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f5;
  --muted: #71717a;
  --accent: #6366f1;
  --accent-dim: rgba(99, 102, 241, 0.14);
  --accent-border: rgba(99, 102, 241, 0.35);
  --map-bg: #1a2e1a;
  --map-grid: rgba(255, 255, 255, 0.04);
}

* { box-sizing: border-box; }

body.blip-designer {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.bd-shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.bd-hero { margin-bottom: 20px; }
.bd-hero h1 { margin: 0 0 8px; font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.bd-hero p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

.bd-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 18px;
  align-items: start;
}

.bd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.bd-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 18px 16px;
  margin-bottom: 14px;
  position: relative;
}

.bd-card-wide { margin-bottom: 14px; }

.bd-step {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  color: #c7d2fe;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bd-card h2 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
  padding-right: 32px;
}

.bd-hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
  padding-right: 28px;
}

.bd-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0a0a0f;
  color: var(--text);
  font-size: 14px;
}

.bd-input-sm { margin-top: 8px; font-size: 12px; }
.bd-search { margin-bottom: 12px; }

.bd-coords {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.bd-link-btn {
  margin-top: 8px;
  padding: 0;
  border: none;
  background: none;
  color: #a5b4fc;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hidden { display: none !important; }

/* Official blips from docs.fivem.net — shown as-is (same as the docs page) */
.blip-img {
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
  user-select: none;
}

.blip-img--sm { width: 32px; height: 32px; }
.blip-img--md { width: 40px; height: 40px; }
.blip-img--lg { width: 48px; height: 48px; }
.blip-img--xl { width: 56px; height: 56px; }

.blip-live-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 0 0 2px var(--blip-tint, rgba(255, 255, 255, 0.25));
}

.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.bd-live-color {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0c0c12;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.type-card .blip-img {
  background: linear-gradient(165deg, #2a3d28, #1a2618);
  border-radius: 8px;
  padding: 6px;
}

.type-card:hover { border-color: var(--accent-border); }
.type-card.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent-border);
}

.type-label {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  color: #d4d4d8;
}

.bd-empty {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 16px;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}

.color-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0c0c12;
  color: #d4d4d8;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.color-chip:hover { border-color: var(--accent-border); }
.color-chip.active {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.bd-options {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.bd-check { font-size: 13px; display: flex; align-items: center; gap: 8px; }
.bd-field {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 200px;
}
.bd-field input[type="range"] { flex: 1; accent-color: var(--accent); }

.bd-preview-panel {
  position: sticky;
  top: calc(var(--site-header-h, 88px) + 12px);
}

.bd-minimap {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%, rgba(90, 120, 70, 0.35), transparent 70%),
    radial-gradient(ellipse at 30% 70%, rgba(40, 60, 90, 0.25), transparent 55%),
    linear-gradient(165deg, #2a3d28 0%, #1a2618 40%, #142218 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
}

.bd-minimap-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--map-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--map-grid) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.bd-live-blip {
  position: relative;
  z-index: 1;
  transition: transform 0.15s ease;
}

.bd-live-name {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.bd-live-hint {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bd-foot {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.bd-foot-note {
  flex: 1 1 100%;
  margin: 8px 0 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}

.code-preview {
  flex: 1 1 100%;
  margin: 8px 0 0;
  padding: 14px;
  border-radius: 8px;
  background: #0a0a0f;
  border: 1px solid var(--border);
  font-size: 11px;
  line-height: 1.5;
  overflow-x: auto;
  color: #c7d2fe;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}

.bd-btn-primary, .bd-btn-secondary {
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.bd-btn-primary {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
}

.bd-btn-secondary {
  background: transparent;
  border: 1px solid var(--accent-border);
  color: #c7d2fe;
}

code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px;
  border-radius: 4px;
}

@media (max-width: 860px) {
  .bd-layout { grid-template-columns: 1fr; }
  .bd-preview-panel { position: static; order: -1; }
  .bd-minimap { max-width: 280px; margin: 0 auto 8px; }
}

@media (max-width: 680px) {
  .bd-grid { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
}
