/* Basic Reset */
@import url(https://fonts.googleapis.com/css?family=Poppins:100,100italic,200,200italic,300,300italic,regular,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic);

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background: linear-gradient(135deg, #464c55, #6a6c70);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;

}

.container {
  background-color: #fff;
  border-radius: 1rem;
  padding: 2rem;
  width: 100%;
  max-width: 800px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);

}

h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #333;
  position: relative;
  padding-bottom: 0.5rem;
}

h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 53%;
  height: 3px;
  background-color: #667eea;
  border-radius: 2px;
}

#generate-btn {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 500;
  margin-bottom: 2rem;
  font-size: 1rem;
}

#generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 10px rgba(102, 126, 234, 0.3);
}

#generate-btn:active {
  transform: translateY(0);
}

button {
  padding: 8px 16px;
  margin: 5px;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  background-color: var(--button-bg);
  color: var(--button-text);
}

#generate-btn {
  background-color: #2196f3;
  color: white;
}

/* #similar-btn {
  background-color: #3d95d4;
  red-ish for similar colors
  color: white;
} 

/* Hover effect */
button:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

/* Optional: active click effect */
button:active {
  transform: scale(0.95);
}

.palette-container {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.color-box {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 20px rgba(0, 0, 0, 0.5);
  text-align: center;
  font-size: 0.9rem;

  /* Smooth transition for transform and shadow */
  transition: tramsform 0.3s ease, box-shadow 0.3s ease;
}

.color-box:hover {
  transform: translateY(-5px) scale (1.03);
  /* lift + slight zoom */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  /* deeper shadow */
}

/* Optional: smooth background transition for color div inside */
.color {
  transition: background-color 0.3ss ease;
  height: 120px;
  cursor: pointer;
}

.color-info {
  background-color: #fff;
  padding: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}

.hex-value {
  font-weight: 500;
  letter-spacing: 0.5px;
}

.copy-btn {
  cursor: pointer;
  transition: transfom 0.2s, color 0.2s;
}

.copy-btn:hover {
  color: #2196f3;
  transform: scale(1.1);
}

.copy-btn.copied {
  color: #4caf50;
  transform: scale(1.3);
}

.copy-popup {
  position: absolute;
  background: #333;
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  opacity: 0.9;
  pointer-events: none;
  z-index: 9999;
}

@media(max-weidth:768px) {
  .palette-container {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  }
}

.search-section {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1rem;
}

#color-input {
  padding: 0.6rem;
  border: 2px solid #ccc;
  border-radius: 50px;
  font-size: 1rem;
  width: 60%;
  outline: none;
  transition: border-color 0.3;
  margin-top: 3rem;
}

#color-input:focus {
  border-color: #667eea;
}

#search-btn {
  background-color: #667eea;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  transition: 0.2s, opacity 0.2s;
  margin-top: 3rem;
}

#search-btn::hover {
  transform: scale(1.05);
  opacity: 0.9;
}

#message {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 8px 16px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.4s;
  font-size: 0.9rem;
  z-index: 1000;
}

#message.show {
  opacity: 0.9;
}

.rating-section {
  text-align: center;
  margin-bottom: 3rem;
  margin-top: 2rem;
}

.rating-section h3 {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.stars i {
  font-size: 2rem;
  margin: 0 5px;
  cursor: pointer;
  color: #ccc;
  transition: color 0.2s;
}

.stars i:hover {
  transform: scale(1.2);
}

.stars i.active {
  color: #FFD700;
  /* gold color when selected */
}

#rating-result {
  margin-top: 0.5rem;
  font-weight: 500;
  color: #444;
}

.votes-summary {
  margin-top: 10px;
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
  gap: 10px;
  color: #333;
}

.votes-summary span {
  background: #f1f1f1;
  padding: 4px 8px;
  border-radius: 6px;
}

.about-section {
  background-color: #f5f5f5;
  padding: 1.5rem;
  border-radius: 12px;
  margin-top: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-section h2 {
  margin-bottom: 1rem;
  color: #333;
  text-align: center;
}

.about-section p {
  margin-bottom: 0.8rem;
  line-height: 1.5;
  color: #555;
}

.about-section ul {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 0.8rem;
}

.about-section a {
  color: #667eea;
  text-decoration: none;
}

.about-section a:hover {
  text-decoration: underline;
}

.info-section {
  background-color: #f0f4f8;
  /* light gray-blue background */
  padding: 1.5rem 2rem;
  border-radius: 12px;
  margin-top: 2rem;
  /* space above */
  margin-bottom: 2rem;
  /* space below */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
}

.info-section a {
  color: #667eea;
  text-decoration: none;
}

.info-section a:hover {
  text-decoration: underline;
}