body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
  background: linear-gradient(135deg, #e0e7ff 0%, #f0f4ff 100%);
  min-height: 100vh;
  color: #222;
}

.container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  background: rgba(255,255,255,0.85);
  padding: 32px 24px 24px 24px;
  backdrop-filter: blur(8px);
}

header {
  text-align: center;
  margin-bottom: 24px;
}

header h1 {
  font-size: 2.2rem;
  background: linear-gradient(90deg, #6366f1, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

header p {
  color: #555;
  font-size: 1.1rem;
}

#chat-section {
  background: rgba(240, 244, 255, 0.7);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  min-height: 180px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
  width: 100%;
}

#chat-log {
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.message {
  display: flex;
  align-items: flex-start;
  margin-bottom: 10px;
  animation: fadeIn 0.5s;
}

.message.user {
  justify-content: flex-end;
}

.message .bubble {
  padding: 10px 16px;
  border-radius: 18px;
  max-width: 80%;
  font-size: 1rem;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

.message.user .bubble {
  background: linear-gradient(90deg, #6366f1, #60a5fa);
  color: #fff;
  margin-left: auto;
}

.message.ai .bubble {
  background: #f3f4f6;
  color: #222;
  margin-right: auto;
}

#chat-form {
  display: flex;
  gap: 8px;
}

#user-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #c7d2fe;
  font-size: 1rem;
  outline: none;
  transition: border 0.2s;
}

#user-input:focus {
  border: 1.5px solid #6366f1;
}

#chat-form button {
  background: linear-gradient(90deg, #6366f1, #60a5fa);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

#chat-form button:hover {
  background: linear-gradient(90deg, #60a5fa, #6366f1);
}

#prompt-summary {
  background: rgba(236, 239, 255, 0.7);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
}

#final-prompt {
  font-size: 1.1rem;
  color: #374151;
  margin-bottom: 10px;
  min-height: 32px;
}

#generate-section {
  text-align: center;
  margin: 20px 0;
}

#generate-btn {
  background: linear-gradient(90deg, #6366f1, #60a5fa);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 24px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

#generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#generate-btn:hover:not(:disabled) {
  background: linear-gradient(90deg, #60a5fa, #6366f1);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
}

#image-section {
  background: rgba(240, 244, 255, 0.7);
  border-radius: 16px;
  padding: 16px;
  min-height: 200px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
  text-align: center;
  width: 100%;
}

#image-result img {
  max-width: 100%;
  border-radius: 16px;
  margin-top: 12px;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.12);
  animation: fadeIn 1s;
}

footer {
  text-align: center;
  margin-top: 32px;
  color: #888;
  font-size: 0.95rem;
}

@media (max-width: 700px) {
  .container {
    padding: 12px 2vw;
  }
  
  .main-content {
    padding: 0 10px;
  }
  
  .right-panel {
    min-width: 0;
  }
  
  header h1 {
    font-size: 1.3rem;
  }
}

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

.main-content {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.left-panel {
  flex: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.right-panel {
  flex: 1;
  min-width: 300px;
}

#prompt-section {
  background: rgba(240, 244, 255, 0.7);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.08);
  position: sticky;
  top: 20px;
}

#current-prompt {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
  min-height: 100px;
  font-size: 1rem;
  line-height: 1.5;
  color: #374151;
  border: 1px solid #c7d2fe;
  transition: all 0.3s ease;
}

#current-prompt.has-content {
  background: #f0f9ff;
  border-color: #60a5fa;
}

#prompt-section h2 {
  color: #374151;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

#prompt-section #generate-btn {
  width: 100%;
  margin-top: 16px;
}

@media (max-width: 700px) {
  .main-content {
    flex-direction: column;
  }
  
  .right-panel {
    order: -1;
  }
  
  #prompt-section {
    position: relative;
    top: 0;
  }
}

.loading {
  text-align: center;
  padding: 20px;
  color: #6366f1;
  font-size: 1.1rem;
  animation: pulse 2s infinite;
}

.image-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.image-container img {
  max-width: 100%;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(99, 102, 241, 0.12);
  animation: fadeIn 1s;
}

.image-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.image-actions button {
  background: linear-gradient(90deg, #6366f1, #60a5fa);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.image-actions button:hover {
  background: linear-gradient(90deg, #60a5fa, #6366f1);
  transform: translateY(-2px);
}

@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
} 