:root {
  --bg: #fff6e6;
  --fg: #1a1a1a;
  --muted: rgba(0, 0, 0, .55);
  --card: rgba(255, 255, 255, .7);
  --card2: rgba(255, 255, 255, .55);
  --border: transparent;
  --radius: 0px;
  --pad: 16px;
  --shadow: none;
  --mono: "IBM Plex Mono", "Fira Mono", "Menlo", "Monaco", "Consolas", "Liberation Mono", monospace;
  --sans: "Trebuchet MS", "Gill Sans", "Verdana", sans-serif;
  --display: "Cooper Black", "Trebuchet MS", "Gill Sans", sans-serif;
  --accent: #ff7a1a;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  background-color: #808080;
  color: var(--fg);
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* ============================================
   PLAYGROUND - Contenedor principal
   ============================================ */
.playground {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.playgroundColumn {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ============================================
   BLOQUES
   ============================================ */
.playgroundBlock {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.blockHeader {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.blockTitle {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   Diales + color
   ============================================ */

.dialGroup {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dialRow {
  display: grid;
  grid-template-columns: 30px 1fr 50px;
  align-items: center;
  gap: 12px;
}

.dialLabel {
  font-weight: 700;
  font-size: 16px;
}

.dial {
  width: 100%;
  accent-color: currentColor;
}

.dialValue {
  font-size: 14px;
  text-align: right;
}

/* ============================================
   Barra de acciones
   ============================================ */
.btnRow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  width: 100%;
}

.btnSelect {
  position: relative;
  display: inline-flex;
}

.btnSelectControl {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 4px;
  border: 0;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.btnSmall {
  padding: 6px 12px;
  font-size: 11px;
}

/* ============================================
   Paleta
   ============================================ */

.paletteGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.paletteChip {
  border: 0;
  padding: 16px 12px;
  min-height: 80px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: transform 0.2s ease;
  animation: fadeIn 0.4s ease both;
  animation-delay: calc(var(--i, 0) * 40ms);
}

.paletteChip:hover {
  transform: scale(1.05);
}

/* ============================================
   Info color fija
   ============================================ */
.colorInfo {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: grid;
  gap: 4px;
  text-align: right;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 20;
}

.colorInfo [data-copy] {
  cursor: pointer;
}

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  padding: 12px 20px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
}

/* ============================================
   Link inferior
   ============================================ */
.siteLink {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  color: currentColor;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  z-index: 20;
}

.siteLink:hover {
  text-decoration: underline;
}

/* ============================================
   UTILIDADES
   ============================================ */
.mono {
  font-family: var(--mono);
}

.panel {
  background: var(--card2);
  border: 0;
  border-radius: 4px;
  padding: 12px;
  text-align: center;
  font-size: 14px;
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
  .playgroundColumn {
    max-width: 100%;
  }

  .paletteGrid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blockHeader {
    flex-direction: column;
    align-items: flex-start;
  }
}
