/* Procedural Map Generator - Pure Vanilla CSS */

:root {
  --color-slate-950: #020617;
  --color-slate-900: #0f172a;
  --color-slate-800: #1e293b;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-500: #64748b;
  --color-slate-400: #94a3b8;
  --color-slate-300: #cbd5e1;
  --color-slate-200: #e2e8f0;
  --color-slate-100: #f1f5f9;
  --color-white: #ffffff;
  
  --color-emerald-600: #059669;
  --color-emerald-500: #10b981;
  --color-emerald-400: #34d399;
  --color-teal-600: #0d9488;
  --color-teal-500: #14b8a6;
  --color-cyan-600: #0891b2;
  --color-cyan-500: #06b6d4;
  --color-cyan-400: #22d3ee;
  --color-cyan-300: #67e8f9;
  
  --color-amber-500: #f59e0b;
  --color-amber-300: #fcd34d;
  --color-amber-200: #fde68a;
  --color-amber-100: #fef3c7;
  
  --color-indigo-400: #818cf8;
  
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', var(--font-sans);
  --font-mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background-color: var(--color-slate-950);
  color: var(--color-slate-100);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-cyan-400);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

button, input, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Flexbox & Grid Utility Helpers */
.flex { display: flex; }
.inline-block { display: inline-block; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-start { justify-content: flex-start; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-8 { grid-template-columns: repeat(8, minmax(0, 1fr)); }

@media (min-width: 640px) {
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:col-span-8 { grid-column: span 8 / span 8; }
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
}

.gap-0 { gap: 0; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-1\.5 > * + * { margin-top: 0.375rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }

.min-h-screen { min-height: 100vh; }
.min-h-\[500px\] { min-height: 500px; }
.min-h-\[220px\] { min-height: 220px; }
.h-full { height: 100%; }
.w-full { width: 100%; }
.max-w-full { max-width: 100%; }

.w-2\.5 { width: 0.625rem; }
.h-2\.5 { height: 0.625rem; }
.w-3 { width: 0.75rem; }
.h-3 { height: 0.75rem; }
.w-3\.5 { width: 0.875rem; }
.h-3\.5 { height: 0.875rem; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.w-10 { width: 2.5rem; }
.h-10 { height: 2.5rem; }
.w-24 { width: 6rem; }
.w-64 { width: 16rem; }

.p-1 { padding: 0.25rem; }
.p-1\.5 { padding: 0.375rem; }
.p-2 { padding: 0.5rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-3\.5 { padding: 0.875rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }

.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-3\.5 { padding-left: 0.875rem; padding-right: 0.875rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

.pb-1\.5 { padding-bottom: 0.375rem; }
.pt-0\.5 { padding-top: 0.125rem; }
.pt-2 { padding-top: 0.5rem; }
.pl-1\.5 { padding-left: 0.375rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mr-1 { margin-right: 0.25rem; }
.ml-0\.5 { margin-left: 0.125rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-6 { margin-top: 1.5rem; }

.relative { position: relative; }
.absolute { position: absolute; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-auto { overflow-x: auto; }
.pointer-events-none { pointer-events: none; }
.hidden { display: none !important; }
.block { display: block; }

/* Colors & Backgrounds */
.bg-slate-950 { background-color: var(--color-slate-950); }
.bg-slate-950\/50 { background-color: rgba(2, 6, 23, 0.5); }
.bg-slate-950\/60 { background-color: rgba(2, 6, 23, 0.6); }
.bg-slate-950\/80 { background-color: rgba(2, 6, 23, 0.8); }
.bg-slate-900 { background-color: var(--color-slate-900); }
.bg-slate-900\/60 { background-color: rgba(15, 23, 42, 0.6); }
.bg-slate-900\/80 { background-color: rgba(15, 23, 42, 0.8); }
.bg-slate-900\/95 { background-color: rgba(15, 23, 42, 0.95); }
.bg-slate-800 { background-color: var(--color-slate-800); }
.bg-slate-800\/90 { background-color: rgba(30, 41, 59, 0.9); }
.bg-slate-700 { background-color: var(--color-slate-700); }
.hover\:bg-slate-800:hover { background-color: var(--color-slate-800); }
.hover\:bg-slate-700:hover { background-color: var(--color-slate-700); }

.bg-emerald-500 { background-color: var(--color-emerald-500); }
.bg-emerald-500\/10 { background-color: rgba(16, 185, 129, 0.1); }
.bg-amber-500\/20 { background-color: rgba(245, 158, 11, 0.2); }
.bg-cyan-500 { background-color: var(--color-cyan-500); }

.bg-gradient-to-br {
  background-image: linear-gradient(to bottom right, var(--color-emerald-500), var(--color-teal-500), var(--color-cyan-600));
}
.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--color-emerald-600), var(--color-teal-600));
}
.bg-gradient-to-r.hover\:from-emerald-500:hover {
  background-image: linear-gradient(to right, var(--color-emerald-500), var(--color-teal-500));
}

.text-white { color: var(--color-white); }
.text-slate-100 { color: var(--color-slate-100); }
.text-slate-200 { color: var(--color-slate-200); }
.text-slate-300 { color: var(--color-slate-300); }
.text-slate-400 { color: var(--color-slate-400); }
.text-slate-500 { color: var(--color-slate-500); }
.text-emerald-400 { color: var(--color-emerald-400); }
.text-cyan-400 { color: var(--color-cyan-400); }
.text-amber-100 { color: var(--color-amber-100); }
.text-amber-200 { color: var(--color-amber-200); }
.text-amber-300 { color: var(--color-amber-300); }
.text-indigo-400 { color: var(--color-indigo-400); }

/* Typography */
.text-\[9px\] { font-size: 9px; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; font-family: var(--font-display); }

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

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-tight { letter-spacing: -0.025em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.italic { font-style: italic; }
.select-none { user-select: none; }
.text-center { text-align: center; }

/* Borders & Radius */
.border { border-width: 1px; border-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-l { border-left-width: 1px; border-left-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }

.border-slate-800 { border-color: var(--color-slate-800); }
.border-slate-800\/80 { border-color: rgba(30, 41, 59, 0.8); }
.border-slate-700 { border-color: var(--color-slate-700); }
.border-slate-700\/80 { border-color: rgba(51, 65, 85, 0.8); }
.border-emerald-500\/20 { border-color: rgba(16, 185, 129, 0.2); }
.border-amber-500\/40 { border-color: rgba(245, 158, 11, 0.4); }
.border-amber-500\/50 { border-color: rgba(245, 158, 11, 0.5); }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Shadows & Effects */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.shadow-inner { box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); }

.backdrop-blur-sm { backdrop-filter: blur(4px); }
.backdrop-blur-md { backdrop-filter: blur(12px); }

.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-75 { transition-duration: 75ms; }
.cursor-pointer { cursor: pointer; }

.focus\:border-emerald-500:focus { border-color: var(--color-emerald-500); }
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }

/* Custom Canvas Pixelation */
#map-canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.cursor-crosshair {
  cursor: crosshair !important;
}

/* Custom Range Sliders */
.custom-slider {
  height: 0.375rem;
  background-color: var(--color-slate-800);
  border-radius: 0.5rem;
  appearance: none;
  cursor: pointer;
  accent-color: var(--color-emerald-500);
}

.custom-slider::-webkit-slider-thumb {
  width: 1rem;
  height: 1rem;
  background-color: var(--color-emerald-500);
  border-radius: 9999px;
  cursor: pointer;
  transition: transform 150ms ease-in-out;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.custom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* Presets pill buttons */
.preset-pill {
  font-size: 0.75rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background-color: var(--color-slate-800);
  color: var(--color-slate-300);
  border: 1px solid var(--color-slate-700);
  transition: all 150ms ease-in-out;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.preset-pill:hover {
  background-color: var(--color-slate-700);
}

.preset-pill.active {
  background-color: var(--color-emerald-500);
  color: var(--color-white);
  border-color: var(--color-emerald-400);
  font-weight: 600;
  box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
}

/* Falloff & Mode Buttons */
.btn-falloff, .btn-mode {
  border: 1px solid var(--color-slate-800);
  background-color: var(--color-slate-900);
  color: var(--color-slate-300);
  transition: all 150ms ease-in-out;
  cursor: pointer;
}

.btn-falloff:hover, .btn-mode:hover {
  background-color: var(--color-slate-800);
}

.btn-falloff.active, .btn-mode.active {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--color-emerald-400);
  font-weight: 600;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Discrete Zoom Step Buttons */
.btn-zoom-step {
  color: var(--color-slate-400);
  cursor: pointer;
}

.btn-zoom-step:hover {
  color: var(--color-white);
  background-color: var(--color-slate-800);
}

.btn-zoom-step.active {
  background-color: rgba(16, 185, 129, 0.2);
  color: var(--color-emerald-400);
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* 8-BAR AUDIO EQUALIZER VERTICAL SLIDER WIDGET STYLES */
.eq-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: space-between;
  user-select: none;
}

.eq-val-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--color-emerald-400);
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.eq-bar-wrapper {
  position: relative;
  width: 100%;
  height: 150px;
  background-color: var(--color-slate-900);
  border-radius: 0.5rem;
  border: 1px solid rgba(30, 41, 59, 0.8);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.eq-bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, var(--color-emerald-600), var(--color-teal-500), var(--color-cyan-400));
  opacity: 0.8;
  transition: all 75ms ease-in-out;
  pointer-events: none;
}

.eq-bar-wrapper:hover .eq-bar-fill {
  opacity: 1;
}

/* Vertical Slider Overlay */
.eq-v-slider {
  position: absolute;
  inset: 0;
  width: 150px;
  height: 36px;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
  transform: rotate(-90deg) translate(-57px, -57px);
  transform-origin: center center;
}

.eq-freq-label {
  text-align: center;
  margin-top: 0.375rem;
}
