body {
  font-family: sans-serif;
  background: linear-gradient(135deg, #000000, #21134b);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

main {
  position: relative;
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.1);
  max-width: 1000px;
  width: 80%;
  text-align: center;
  z-index: 1;
}

main::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 5px; 
  border-radius: 20px;
  background: linear-gradient(
    270deg,
    #ff0000,
    #ff9900,
    #ffff00,
    #33ff00,
    #00ffff,
    #0066ff,
    #cc00ff,
    #ff0099,
    #ff0000
  );
  background-size: 600% 600%;
  animation: rgbFlow 10s linear infinite;
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
}

@keyframes rgbFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


h1 {
  margin-top: 0;
  margin-bottom: 0;
}

.palette {
  min-height: 300px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  border-radius: 80px;
  padding: 2rem;
}

.color-box {
  font-family: "bd-supper";
  font-weight: 400;
  font-size: 2rem;
  text-align: center;
}

.palette-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
}

.palette-card {
  border-radius: 8px;
  padding: 1rem;
  background: #f8f8f8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.color-box {
  flex: 1 1 100px;
  border-radius: 4px;
  padding: 0.5rem;
  text-align: center;
  color: #fff;
}

.palette-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: center;
}

.palette-title {
  margin-right: 20px;
}

/* --- BUTTON STYLES --- */
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background-color: #616661;
  color: white;
  font-family: sans-serif;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  margin: 10px 0;
  text-align: center;
}

.btn:hover {
  background-color: #393f39;
  transform: translateY(-2px);
}

.btn:active {
  background-color: #393f39;
  transform: translateY(0);
}

/* Make standalone "generate" buttons match the full-size ones */
.btn.generate {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 15px 15px;
  font-size: 17px;
  border-radius: 10px;
  margin-top: 2rem;
  min-width: 200px;
  height: 40px;
  text-align: center;
}

/* Save Palette button + input field */
.save {
  padding: 10px 20px;
  font-size: 14px;
}

input[type="text"] {
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
  margin-left: 8px;
}

/* Button row */
.button-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
}

.button-row .btn {
  flex: 1 1 280px;
  max-width: 300px;
  height: 60px;
  font-size: 17px;
  text-align: center;
  padding: 0 20px;
}

/* Alerts */
.alert {
  padding: 12px 20px;
  margin: 10px 0;
  border-radius: 6px;
  font-weight: bold;
  position: relative;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

.alert-danger {
  background-color: #f44336;
  color: white;
}

.alert-success {
  background-color: #4CAF50;
  color: white;
}

/* Example section */
.example-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  border-radius: 8px;
}

.example-color {
  font-family: "bd-supper";
  font-weight: 400;
  font-size: 2rem;
}
