/* Enhanced Background Manager Styles */
.background-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 100;
}

.bg-control-btn {
  padding: 10px 15px;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(240,240,240,0.9));
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-weight: 600;
  color: #444;
}

.bg-control-btn i {
  color: #4a6eff;
  font-size: 1.1em;
}

.bg-control-btn:hover {
  background: linear-gradient(135deg, rgba(255,255,255,1), rgba(245,245,245,1));
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.bg-color-panel {
  position: absolute;
  top: 50px;
  right: 0;
  background: white;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  width: 280px;
  z-index: 101;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 1px solid rgba(0,0,0,0.1);
}

.bg-color-panel.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
}

.bg-tabs {
  display: flex;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.bg-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 8px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  position: relative;
  transition: all 0.3s ease;
  text-align: center;
}

.bg-tab.active {
  color: #4a6eff;
}

.bg-tab.active::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #4a6eff;
  border-radius: 3px;
}

.bg-tab-content {
  display: none;
}

.bg-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.color-palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 15px;
}

.color-palette button {
  width: 35px;
  height: 35px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.color-palette button:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  z-index: 1;
}

.gradient-presets {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 15px;
}

.gradient-presets button {
  width: 35px;
  height: 35px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.gradient-presets button:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  z-index: 1;
}

.custom-color {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  background-color: #f8f9fa;
  padding: 8px;
  border-radius: 8px;
}

.custom-color label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
}

.custom-color input {
  width: 35px;
  height: 35px;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

#apply-custom-btn {
  padding: 6px 12px;
  background: #4a6eff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  margin-left: auto;
}

#apply-custom-btn:hover {
  background: #3a5eff;
  transform: translateY(-2px);
}

.gradient-colors {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  background-color: #f8f9fa;
  padding: 8px;
  border-radius: 8px;
}

.gradient-colors label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
}

.gradient-colors input {
  width: 35px;
  height: 35px;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

.gradient-direction {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  background-color: #f8f9fa;
  padding: 8px;
  border-radius: 8px;
}

.gradient-direction label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
}

.gradient-direction select {
  flex: 1;
  padding: 6px;
  border-radius: 6px;
  border: 1px solid #ddd;
}

#apply-gradient-btn {
  width: 100%;
  padding: 10px;
  background: linear-gradient(to right, #4a6eff, #5e81ff);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

#apply-gradient-btn:hover {
  background: linear-gradient(to right, #3a5eff, #4e71ff);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(74, 110, 255, 0.2);
}

.cooldown-status {
  margin-top: 15px;
  border-top: 1px solid #eee;
  padding-top: 12px;
}

.cooldown-progress {
  height: 8px;
  background: linear-gradient(to right, #4a6eff, #2ecc71);
  border-radius: 4px;
  width: 0%;
  transition: width 0.5s linear;
}

#bg-cooldown-text {
  text-align: center;
  font-size: 12px;
  margin-top: 6px;
  color: #555;
  font-weight: bold;
}

