*{
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary-bg: #f4f4f9;
  --text-color: #333;
  --accent-color: #4a90e2;
}

body {
  font-family: Arial, sans-serif;
  background-color: var(--primary-bg);
  color: var(--text-color);
  margin: 0;
  background-color: #f5f4f4;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

header {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 15px;
  height: 30vh;
  border-bottom: 1px solid rgb(223, 222, 222);
}

header > h1 {
  font-size: 50px;
  background-image: linear-gradient(to right, #f4e784, #f24389, #a478f1);
  display: inline-block;
  background-clip: text;
  color: transparent;
}
header > p {
  font-weight: 800;
  color: rgb(110, 110, 110);
}
main {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 100%;
  height: 60vh;
}
footer {
  display: flex;
  justify-content: center;
  height: 10vh;
  padding-top: 20px;
  border-top: 1px solid rgb(223, 222, 222);
}
.controls {
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Render dinámico mediante Grid */
.palette-grid {
   width: 90%;
    display: flex;
    justify-content: center;
    height: 250px;
}

.color-card {
  width: 100%;
  background: white;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s; /* Animación sutil [3] */
}

.color-card:hover {
  transform: scale(1.1);
  border: 1px solid grey;
  border-radius: 5px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.color-box {
  height: 200px;
  margin-bottom: 10px;
  cursor: pointer;
}
#generate-btn {
  height: 30px;
  width: 120px;
  border-radius: 5px;
  border: 1px solid blue;
  color: blue;
  font-weight: 600;
}
#generate-btn:hover {
  background-color: #4a90e2;
  color: white;
  cursor: pointer;
}
/* Estilo para accesibilidad: Foco visible [3] */
button:focus,
select:focus {
  outline: 3px solid var(--accent-color);
}
select {
  border-radius: 5px;
  outline: none;
  border: none;
  height: 30px;
  font-size: 12px;
  font-weight: 500;
}
select:hover {
  cursor: pointer;
}
select:focus {
  background-color: rgb(231, 231, 247);
  border-radius: 5px;
  font-weight: 500;
}
#toast {
  position: fixed;

  bottom: 20px;
  background: #333;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
}
.color-value {
  font-size: 12px;
  padding: 0 5px 0 5px;
}
.hidden {
  display: none;
}


/* Diseño Responsive para mobile a partir de ancho de 800px*/
@media screen and (max-width: 800px) {
 
  header{
    text-align: center;
    width: 100%;
    height: 20vh;
  }
  h1{
    font-size: 5vw;

  }
  main{
    display: grid;
    grid-template-rows: 0.5fr 2fr; 
    margin-top: 5vh;
   height: 850px;
   width: 90%;
   justify-items: center;
   align-items: start;
  }
  .palette-grid{
    gap: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
  
  }
  .color-box{
    height: 70%;
  }
  .color-card{
    height: 170px;
  }
  footer{
    display: flex;
    align-items: center;
   text-align: center;
    margin-top: 50px;
    font-size: 3vw;
  }
 .controls{
  display: flex;
  flex-direction: column;
  width: 100%;
 
  gap: 2px;
 }
 
}

@media screen and (max-width: 500px) {
  .control{
    display: flex;
  flex-direction: column;
}
}