* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}
.color-generator p {
  max-width: 500px;
  margin: 0 auto 20px;
  color: #333;
  font-size: 16px;
  line-height: 1.5;
}
body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #404946c0;
  padding: 20px;
}

#colorHistory{
  justify-content: center;
  align-items: center;
  font-size: clamp(14px, 2vw, 18px);
  width: 250px;
  height: auto;
  padding: 20px 0px 0px 0px;
  display: flex;
}
.color-generator h1{
    font-size: clamp(30px, 9vw, 35px);
    margin-bottom: 20px;
    text-align: center;
    font-weight: bolder;
}
.color-generator {
  text-align: center;
  width: 100%;
  max-width: 400px;
}

.color-box {
  width: 300px;
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: #ffffff;
  margin: 0 auto 20px;
  border-radius: 10px;
  box-shadow: 10px 10px 10px 10px rgba(0, 0, 0, 0.1);
}

#colorCode {
  font-size: 24px;
  margin-bottom: 20px;
  font-weight: bold;
  font-family: "Courier New", monospace;
}

#copyButton {
  padding: 10px 20px;
  border: none;
  background-color: black;
  color: whitesmoke;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.5s;
  font-size: 14px;
}

#copyButton:hover {
  background-color: black;
  color: whitesmoke;
  box-shadow: 0 0 10px 1px white;
}

#copyButton:active {
  scale: 0.93;
}
button{
  height: 40px;
}

#generateButton {
  padding: 10px 20px;
  border: none;
  background-color: #4b421b;
  color: whitesmoke;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.5s;
  font-size: 14px;
}

#colorPalette{
  padding: 10px 20px;
  border: none;
  background-color: #4b421b;
  color: whitesmoke;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.5s;
  font-size: 14px;
}
button:hover{
  animation: palette 0.2s;
}
@keyframes palette{
  0%{transform: translateX(-5px)}
  50%{transform: translateX(0px)}
  100%{transform: translateX(7px)}
}
#generateButton:hover, #colorPalette:hover {
  background-color: black;
  color: whitesmoke;
  box-shadow: 0 0 10px 1px white;
}
button:active{
  animation: generatebtn 0.4s;
}
@keyframes generatebtn {
  0%{transform: translateY(-5px)}
  50%{transform: translateY(0px)}
  100%{transform: translateY(7px)}
}

#generateButton:active {
  scale: 0.93;
}

/* Tablet styles (768px and below) */
@media screen and (max-width: 768px) {
  body {
    padding: 15px;
  }

  .color-box {
    width: 280px;
    height: 280px;
  }

  #colorCode {
    font-size: 22px;
    margin-bottom: 18px;
  }

  #copyButton,
  #generateButton {
    padding: 12px 24px;
    font-size: 15px;
  }
}

/* Mobile landscape (640px and below) */
@media screen and (max-width: 640px) {
  .color-box {
    width: 250px;
    height: 250px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.15);
  }

  #colorCode {
    font-size: 20px;
    margin-bottom: 15px;
  }

  #copyButton,
  #generateButton {
    padding: 10px 20px;
    font-size: 14px;
  }
}

/* Small mobile (480px and below) */
@media screen and (max-width: 480px) {
  body {
    padding: 10px;
  }

  .color-box {
    width: 220px;
    height: 220px;
    margin-bottom: 15px;
    border-radius: 8px;
  }

  #colorCode {
    font-size: 18px;
    margin-bottom: 12px;
  }

  #copyButton,
  #generateButton {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
  }

  #generateButton {
    margin-top: 15px;
  }
}

/* Extra small mobile (360px and below) */
@media screen and (max-width: 360px) {
  .color-box {
    width: 200px;
    height: 200px;
  }

  #colorCode {
    font-size: 16px;
    margin-bottom: 10px;
  }

  #copyButton,
  #generateButton {
    padding: 8px 14px;
    font-size: 12px;
  }
}

/* Very small screens (320px and below) */
@media screen and (max-width: 320px) {
  body {
    padding: 8px;
  }
  .color-box {
    width: 180px;
    height: 180px;
    margin-bottom: 12px;
  }

  #colorCode {
    font-size: 14px;
    margin-bottom: 8px;
  }

  #copyButton,
  #generateButton {
    padding: 6px 12px;
    font-size: 11px;
  }

  #generateButton {
    margin-top: 12px;
  }
}

/* Large screens (1200px and above) */
@media screen and (min-width: 1200px) {
  .color-box {
    width: 350px;
    height: 350px;
    box-shadow: 15px 15px 20px rgba(0, 0, 0, 0.12);
  }

  #colorCode {
    font-size: 28px;
    margin-bottom: 25px;
  }

  #copyButton,
  #generateButton {
    padding: 12px 25px;
    font-size: 16px;
  }
}