/* createBackground.css */
.background-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  z-index: 1000;
}

.background-dialog.visible {
  opacity: 1;
}

.dialog-content {
  background: var(--panel-bg);
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
}

.dialog-header h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 600;
}

.input-group {
  margin-bottom: 20px;
}

.input-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--bg-main);
  color: var(--text-primary);
}

.input-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.options-group {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.option-button {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-main);
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 500;
}

.option-button:hover {
  background: var(--player-bg);
}

.option-button.selected {
  background: var(--accent);
  color: var(--panel-bg);
  border-color: var(--accent);
}

.option-content {
  min-height: 400px;
  border-radius: 8px;
  overflow: hidden;
}

/* AI Generation Styles */
.ai-container {
  display: flex;
  flex-direction: column;
  height: 400px;
  gap: 1rem;
}

.result-container {
  flex: 1;
  background: var(--bg-main);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  height: 80%;
  border: 2px dashed #ddd;
  position: relative;
}

.result-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.placeholder-text {
  color: var(--text-secondary);
  font-size: 1.1rem;
  text-align: center;
}

.prompt-container {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.prompt-input {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--bg-main);
}

.generate-button {
  padding: 12px 24px;
  background: var(--accent);
  color: var(--panel-bg);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.generate-button:hover {
  background: var(--accent-hover);
}

/* Color Picker Styles */
.color-container {
  height: 400px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.color-picker {
  width: 100%;
  height: 100%;
  border: none;
  cursor: pointer;
  padding: 0;
  background: none;
}

.color-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Upload Styles */
.upload-container {
  height: 400px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.file-input {
  display: none;
}

.upload-zone {
  height: 100%;
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--bg-main);
}

.upload-zone:hover, 
.upload-zone.dragover {
  border-color: var(--accent);
  background: var(--player-bg);
}

.upload-zone svg {
  color: var(--accent);
  margin-bottom: 16px;
}

.upload-zone p {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin: 0;
}

.preview-container {
  width: 100%;
  height: 80%;
  border: 2px dashed #ddd;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.preview-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.upload-controls {
  display: flex;
  gap: 0.5rem;
}

.dialog-footer {
  padding: 20px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border-color);
}

.save-button {
  padding: 12px 24px;
  background: var(--success-color);
  color: var(--panel-bg);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.save-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}