﻿body {
  background-image: url("./Img/Fondo.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  margin: 0;
  padding: 20px;
  font-family: 'Roboto', sans-serif;
  background-color: #ffffff;
  text-align: center;
}

h1 {
  margin-top: 20px;
  font-family: 'FredokaOne', sans-serif;
  font-size: 90px;
  color: #ffffff;
  text-shadow:
    8px 6px 0 rgba(0, 0, 0, 0.356);
}

h2 {
  margin-bottom: 10px;
  margin-top: -70px;
  font-family: 'FredokaOne', sans-serif;
  font-size: 40px;
  color: #ffffff;
  text-shadow:
    8px 6px 0 rgba(0, 0, 0, 0.356);
}

.controles {
  margin-bottom: 20px;
}

label {
  margin-right: 10px;
  font-weight: bold;
  font-size: 20px;
  color: #474747;
}

select {
  padding: 8px;
  margin-right: 10px;
  text-align: center;
  text-align-last: center;
}

.formato-color {
  width: 100%;
  color: #ffffff;
  font-weight: bold;
  font-size: 18px;
}

.formato-color label {
  font-size: 17px;
}

.formato-color input {
  margin-right: 4px;
}

button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  background-color: #eb4aa8;
  color: white;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.726);
  font-weight: bold;
  font-size: 17px;
}

button:hover {
  background-color: #852b5f;
  transition: background-color 0.3s ease;
}

/* --- CONTADOR DE BLOQUEADOS --- */
/* Siempre ocupa su espacio, pero se vuelve invisible cuando está "oculto"
   Así nada se desplaza al aparecer o desaparecer */
#contador-bloqueados {
  display: block;
  margin: 8px auto 0 auto;
  font-size: 15px;
  font-weight: bold;
  color: #474747;
  height: 22px;
  /* altura fija para que siempre ocupe el mismo espacio */
  visibility: visible;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* En lugar de display:none usamos visibility:hidden + opacity:0
   El elemento sigue ocupando espacio pero no se ve */
.oculto {
  visibility: hidden !important;
  opacity: 0 !important;
}

.paleta {
  max-width: 900px;
  margin: 0 auto;
  background-color: rgba(139, 56, 119, 0.432);
  border-radius: 10px;
  padding: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* --- ANIMACIÓN DE ENTRADA --- */
@keyframes aparecerTarjeta {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.color-card {
  width: 170px;
  height: 200px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px;
  box-sizing: border-box;
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.726);
  overflow-wrap: anywhere;
  animation: aparecerTarjeta 0.4s ease forwards;
  transition: transform 0.2s ease, outline 0.2s ease, box-shadow 0.2s ease;
}

.color-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

.color-card.bloqueada {
  outline: 3px solid #ffffff;
}

.candado {
  font-size: 20px;
  cursor: pointer;
  align-self: flex-end;
  z-index: 1;
  transition: transform 0.2s ease;
}

.candado:hover {
  transform: scale(1.2);
}

.valor-color {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 10px;
  padding: 6px 8px;
}

.copiar-color {
  margin-top: 20px;
  font-weight: bold;
  font-size: 17px;
  color: #696969;
}

.mensaje-respuesta {
  height: 24px;
  margin-top: 10px;
  margin-bottom: 10px;
  display: block;
  padding: 0 12px;
  font-weight: bold;
  font-size: 18px;
  line-height: 24px;
  color: #000000b7;
}

.mensaje-activo {
  background-color: rgba(255, 255, 255, 0.5);
  display: inline-block;
  border-radius: 20px;
}

.linea-divisoria {
  border: none;
  height: 1px;
  background-color: #ccc;
  margin: 20px 0;
}