/* Background Switcher Modal Styles */
.background-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.background-modal-content {
  background-color: #000000;
  margin: 5% auto;
  padding: 30px;
  border: 2px solid #7C3AED;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
}

.background-modal-content h2 {
  color: #7C3AED;
  text-align: center;
  margin-bottom: 30px;
  font-family: 'Patrick Hand', cursive;
  font-size: 24px;
  font-weight: bold;
}

.background-close {
  color: #7C3AED;
  float: right;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  margin-top: -15px;
  margin-right: -10px;
  transition: color 0.3s ease;
}

.background-close:hover {
  color: white;
  transform: scale(1.1);
}

.background-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  padding: 20px 0;
}

.background-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 15px;
  border: 2px solid transparent;
  border-radius: 10px;
  transition: all 0.3s ease;
  background-color: #212121;
  font-family: 'Patrick Hand', cursive;
}

.background-option:hover {
  border-color: #7C3AED;
  background-color: #2a2a2a;
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(124, 58, 237, 0.3);
}

.background-option.selected {
  border-color: #7C3AED;
  background-color: #2a2a2a;
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.5);
}

.background-option img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
  border: 1px solid #333;
}

.background-option span {
  color: white;
  font-family: 'Patrick Hand', cursive;
  font-size: 16px;
  text-align: center;
  font-weight: bold;
}

.background-option.selected span {
  color: #7C3AED;
}

#backgroundSwitcher {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid #333;
  transition: all 0.3s ease;
}

#backgroundSwitcher:hover {
  transform: scale(1.2);
  border-color: #7C3AED;
  box-shadow: 0 2px 4px rgba(124, 58, 237, 0.3);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .background-modal-content {
    width: 95%;
    margin: 2% auto;
    padding: 20px;
    max-height: 90vh;
  }

  .background-options {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
  }

  .background-option img {
    width: 100px;
    height: 60px;
  }

  .background-option span {
    font-size: 14px;
  }
}

/* Scrollbar styling to match app theme */
.background-modal-content::-webkit-scrollbar {
  width: 8px;
}

.background-modal-content::-webkit-scrollbar-track {
  background: #000000;
}

.background-modal-content::-webkit-scrollbar-thumb {
  background: #7C3AED;
  border-radius: 4px;
}

.background-modal-content::-webkit-scrollbar-thumb:hover {
  background: #9a4ff7;
}