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

body {
  background-color: #333;
  text-align: center;
}

header {
  background: #333;
  color: white;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.main-header-title {
  margin: 0;
  text-align: center;
  font-size: 32px;
}

.header-colors {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  min-height: 30px;
}

.color-shortcut {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  animation: colorAppear 0.5s ease-out;
}

@keyframes colorAppear {
  from {
    transform: scale(0);
    opacity: 0;
  }

  50% {
    transform: scale(1.2);
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.color-shortcut:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.controls {
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 15px;
  max-width: 300px;
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: auto;
}

.color-rows-container {
  margin-bottom: 30px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.export-palette-button {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  margin-right: 10px;
  backdrop-filter: blur(2px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.export-palette-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.palette-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.palette-title {
  font-size: 24px;
  font-weight: bold;
  width: 100%;
  text-align: center;
  margin: 0;
}

.palette-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
  color: #333; /* Darker text by default */
  background-color: white;
}

.palette-content.active {
  max-height: 8000px;
  /* Large enough to show all content */
  transition: max-height 1s ease;
}

.chevron {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.chevron.up {
  transform: rotate(180deg);
}

.color-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: #fff;
  border-radius: 8px;
  padding: 15px;
  margin: 1rem 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

.row-header {
  font-size: 2.3rem;
  font-weight: bold;
  margin-bottom: 10px;
  text-align: left;
  padding-left: 10px;
}

.color-set {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.color-box {
  height: 180px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
  padding-bottom: 70px;
}

.color-box:hover {
  transform: scale(1.05);
}

.action-button {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.primary-button {
  background: linear-gradient(135deg, #4a7feb, #2855c6);
  color: white;
}

.primary-button:hover {
  background: linear-gradient(135deg, #3a6de0, #1a46b7);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.secondary-button {
  background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
  color: #333;
}

.secondary-button:hover {
  background: linear-gradient(135deg, #e0e0e0, #d0d0d0);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.copy-button {
  position: absolute;
  bottom: 10px;
  padding: 15px 30px;
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 24px;
  font-weight: 600;
  backdrop-filter: blur(5px);
  transition: all 0.2s;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  width: 85%;
  text-align: center;
}

.copy-button:hover {
  background: rgba(255, 255, 255, 0.4);
}

.copied-toast {
  position: fixed;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1000;
}

.color-box span {
  font-size: 18px;
  margin-bottom: 10px;
  padding: 4px 8px;
  border-radius: 4px;
}

footer {
  margin-top: 20px;
  padding: 10px;
  background: #333;
  color: white;
}

footer {
  background-color: #333;
  padding: 20px;
  text-align: center;
}

/* Alternative Solution: Fixed footer (stays visible when scrolling) */
.fixed-footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background-color: #333;
  padding: 20px;
  text-align: center;
}

/* Add padding to prevent content from being hidden behind fixed footer */
.with-fixed-footer {
  padding-bottom: 60px;
  /* Adjust based on footer height */
}