/* Main Tool Container */
.theme-generator {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header Styles */
.tool-header {
  text-align: center;
  margin-bottom: 2rem;
}

.tool-header h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.tool-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Control Panel */
.control-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.control-group {
  margin-bottom: 1rem;
}

.control-group h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

/* Theme Preview */
.theme-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.theme-swatch {
  height: 80px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
  cursor: pointer;
  transition: transform 0.2s ease;
  border: 1px solid var(--border-color);
}

.theme-swatch:hover {
  transform: scale(1.05);
}

/* UI Preview */
.ui-preview {
  background: var(--bg-primary);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
}

.ui-element {
  margin-bottom: 1rem;
}

.ui-button {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  background: var(--primary);
  color: var(--text-on-primary);
  border: none;
  cursor: pointer;
  margin-right: 0.5rem;
}

.ui-button.secondary {
  background: var(--secondary);
  color: var(--text-on-secondary);
}

.ui-button.outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.ui-card {
  background: var(--bg-secondary);
  border-radius: 4px;
  padding: 1rem;
  border: 1px solid var(--border-color);
}

.ui-alert {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.ui-alert.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.ui-alert.error {
  background: var(--error-bg);
  color: var(--error-text);
}

/* Color Pickers */
.color-picker-group {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.color-picker-label {
  width: 120px;
  font-weight: 500;
  color: var(--text-primary);
}

.color-picker {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  margin-right: 1rem;
}

.color-value {
  font-family: monospace;
}

/* Code Output */
.code-output {
  background: var(--bg-code);
  color: var(--text-code);
  padding: 1rem;
  border-radius: 5px;
  font-family: 'Courier New', Courier, monospace;
  white-space: pre-wrap;
  margin-bottom: 2rem;
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--primary);
  color: var(--text-on-primary);
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.8rem;
}

.copy-btn:hover {
  opacity: 0.9;
}

/* Theme Actions */
.theme-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.theme-btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.theme-btn:hover {
  background: var(--bg-tertiary);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .control-panel {
    grid-template-columns: 1fr;
  }
  
  .theme-preview {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Theme Mode Toggle */
.theme-mode {
  display: flex;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.theme-mode-btn {
  flex: 1;
  padding: 0.5rem;
  border: none;
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  text-align: center;
}

.theme-mode-btn.active {
  background: var(--primary);
  color: var(--text-on-primary);
}