:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #1a0a2e;
  --accent-cyan: #00ffff;
  --accent-pink: #ff69b4;
  --accent-purple: #9b59b6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg-primary);
  font-family: 'JetBrains Mono', monospace;
}

.font-display {
  font-family: 'Orbitron', sans-serif;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Header */
.header-gradient {
  background: linear-gradient(180deg, #1a0a2e 0%, #0a0a0f 100%);
}

.header-line {
  background: linear-gradient(90deg, transparent, #00ffff, #ff69b4, #9b59b6, transparent);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.glow-text {
  text-shadow: 0 0 20px rgba(0, 255, 255, 0.5), 0 0 40px rgba(255, 105, 180, 0.3);
  background: linear-gradient(90deg, #00ffff, #ff69b4, #9b59b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Panels */
.panel {
  background: linear-gradient(135deg, rgba(26, 10, 46, 0.8), rgba(10, 10, 15, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

/* Theme Cards */
.theme-card {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  text-align: center;
}

.theme-card:hover {
  border-color: var(--theme-color);
  box-shadow: 0 0 20px color-mix(in srgb, var(--theme-color) 30%, transparent);
}

.theme-card.selected {
  border-color: var(--theme-color);
  box-shadow: 0 0 30px color-mix(in srgb, var(--theme-color) 50%, transparent);
  background: color-mix(in srgb, var(--theme-color) 10%, transparent);
}

/* Mood Pills */
.mood-pill {
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.mood-pill.selected {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Color Swatches */
.color-swatch {
  border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Effect Toggles */
.effect-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.effect-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.effect-toggle.active {
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.2), rgba(255, 105, 180, 0.2));
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

/* Character Options */
.character-option, .type-option {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.character-option.selected, .type-option.selected {
  background: linear-gradient(135deg, rgba(255, 105, 180, 0.3), rgba(155, 89, 182, 0.3));
  border-color: rgba(255, 105, 180, 0.5);
}

/* Artwork Container - Clean, no decorative frame */
.artwork-container {
  max-width: 360px;
}

.artwork-inner {
  background: #0a0a0f;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.preview-gradient {
  animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* Custom Prompt Input */
.custom-prompt-input {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 255, 0.3);
  color: #fff;
  outline: none;
  transition: border-color 0.2s ease;
}

.custom-prompt-input:focus {
  border-color: rgba(0, 255, 255, 0.6);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.custom-prompt-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Reference Input */
.reference-input {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 105, 180, 0.3);
  color: #fff;
  outline: none;
  transition: border-color 0.2s ease;
}

.reference-input:focus {
  border-color: rgba(255, 105, 180, 0.6);
  box-shadow: 0 0 15px rgba(255, 105, 180, 0.2);
}

.reference-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

/* Generate Button */
.generate-btn {
  background: linear-gradient(135deg, #ff69b4, #9b59b6, #00ffff);
  background-size: 200% 200%;
  animation: gradientMove 3s ease infinite;
  border: none;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 30px rgba(255, 105, 180, 0.4);
}

.generate-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 50px rgba(255, 105, 180, 0.6);
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Prompt Display */
.prompt-display {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 255, 255, 0.2);
  color: #00ffff;
  max-height: 150px;
  overflow-y: auto;
}

/* Presets */
.preset-btn {
  background: linear-gradient(135deg, rgba(155, 89, 182, 0.3), rgba(0, 255, 255, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.preset-btn:hover {
  border-color: #00ffff;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.randomize-btn {
  background: linear-gradient(135deg, rgba(255, 105, 180, 0.4), rgba(255, 140, 0, 0.3));
  border: 1px solid rgba(255, 105, 180, 0.3);
}

.randomize-btn:hover {
  border-color: #ff69b4;
  box-shadow: 0 0 15px rgba(255, 105, 180, 0.4);
}

/* Section Tabs */
.section-tabs {
  scrollbar-width: none;
}

.section-tabs::-webkit-scrollbar {
  display: none;
}

.section-tab {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
}

.section-tab:hover {
  background: rgba(255, 255, 255, 0.08);
}

.section-tab.active {
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.15), rgba(255, 105, 180, 0.15));
  border-color: rgba(0, 255, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.section-content {
  min-height: 200px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Selection Tags */
.selection-tag {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  font-family: 'JetBrains Mono', monospace;
}

.selection-tag-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Download Button */
.download-btn {
  background: linear-gradient(135deg, rgba(57, 255, 20, 0.3), rgba(0, 255, 255, 0.2));
  border: 1px solid rgba(57, 255, 20, 0.4);
}

.download-btn:hover {
  border-color: #39ff14;
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.4);
}

.download-main-btn {
  background: linear-gradient(135deg, #39ff14, #00ffaa);
  background-size: 200% 200%;
  animation: gradientMove 3s ease infinite;
  border: none;
  color: #000;
  font-weight: bold;
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
}

.download-main-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(57, 255, 20, 0.5);
}

.gallery-download-btn {
  background: rgba(57, 255, 20, 0.3);
  border: 1px solid rgba(57, 255, 20, 0.4);
  color: #39ff14;
  transition: all 0.2s ease;
}

.gallery-download-btn:hover {
  background: rgba(57, 255, 20, 0.5);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.4);
}

/* Gallery */
.gallery-scroll::-webkit-scrollbar {
  height: 8px;
}

.gallery-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.gallery-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #00ffff, #ff69b4);
  border-radius: 4px;
}

.gallery-item {
  background: rgba(26, 10, 46, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-item:hover {
  border-color: #00ffff;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

/* Footer */
.footer-gradient {
  background: linear-gradient(180deg, #0a0a0f 0%, #1a0a2e 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Section tab for prompt */
.section-tab.active[data-section="prompt"] {
  border-color: rgba(57, 255, 20, 0.5);
}

/* Loader */
.loader {
  width: 50px;
  height: 50px;
  border: 3px solid transparent;
  border-top-color: #00ffff;
  border-right-color: #ff69b4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Text Gradient */
.text-gradient {
  background: linear-gradient(90deg, #00ffff, #ff69b4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Responsive */
@media (max-width: 768px) {
  .artwork-container {
    max-width: 300px;
  }
}

/* Scrollbar for main content */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
  background: rgba(155, 89, 182, 0.5);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(155, 89, 182, 0.7);
}