
body {
  background-color: #0a0a0f;
  color: #e0e0e0;
  font-family: 'Jura', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 50%);
}

#root {
  padding: 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

h1 {
  font-family: 'Doto', sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  color: #00d4ff;
  text-align: center;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
}

.subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: #a0a0a0;
  margin-bottom: 2rem;
  font-style: italic;
}

/* Main Layout */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
  min-height: 0; /* Allows grid items to shrink below content size */
}

/* Left Panel - Controls */
.left-panel {
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 12px;
  padding: 1.5rem;
  height: fit-content;
  max-height: 80vh;
  overflow-y: auto;
}

.left-panel::-webkit-scrollbar {
  width: 8px;
}

.left-panel::-webkit-scrollbar-track {
  background: rgba(0, 212, 255, 0.1);
  border-radius: 4px;
}

.left-panel::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
  border-radius: 4px;
}

.left-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.5);
}

/* Right Panel - Output */
.right-panel {
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 12px;
  padding: 1.5rem;
  height: fit-content;
  max-height: 80vh;
  overflow-y: auto;
}

.right-panel::-webkit-scrollbar {
  width: 8px;
}

.right-panel::-webkit-scrollbar-track {
  background: rgba(0, 212, 255, 0.1);
  border-radius: 4px;
}

.right-panel::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
  border-radius: 4px;
}

.right-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.5);
}

/* Mode Toggle */
.mode-section {
  margin-bottom: 2rem;
}

.mode-section h3 {
  color: #00d4ff;
  font-family: 'Doto', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.mode-toggle {
  display: flex;
  gap: 0.5rem;
}

.mode-btn {
  flex: 1;
  padding: 0.75rem;
  background: rgba(0, 212, 255, 0.12);
  color: #e0e0e0;
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  font-family: 'Jura', sans-serif;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mode-btn.active {
  background: #00d4ff;
  color: #0a0a0f;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.mode-btn:hover:not(.active) {
  background: rgba(0, 212, 255, 0.2);
  border-color: rgba(0, 212, 255, 0.5);
}

/* Parameter Sections */
.parameter-section {
  margin-bottom: 1.5rem;
}

.parameter-section h4 {
  color: #00d4ff;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.subject-input {
  width: 100%;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  color: #e0e0e0;
  font-family: 'Jura', sans-serif;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.subject-input:focus {
  outline: none;
  border-color: #00d4ff;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.parameter-select {
  width: 100%;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  color: #e0e0e0;
  font-family: 'Jura', sans-serif;
  font-size: 1rem;
  cursor: pointer;
}

.parameter-select:focus {
  outline: none;
  border-color: #00d4ff;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.parameter-select option {
  background: #1a1a1a;
  color: #e0e0e0;
}

/* Buttons */
button {
  background-color: #00d4ff;
  color: #0a0a0f;
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 8px;
  font-family: 'Jura', sans-serif;
  font-size: 1rem;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

button:hover:not(:disabled) {
  background-color: #00bfff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.button-container {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.random-btn,
.random-all-btn,
.clear-all-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

.random-all-btn {
  background: linear-gradient(135deg, #00d4ff 0%, #0096ff 100%);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.random-all-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #00bfff 0%, #0080e6 100%);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
}

.clear-all-btn {
  background: rgba(255, 100, 100, 0.8);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 100, 100, 0.3);
}

.clear-all-btn:hover:not(:disabled) {
  background: rgba(255, 80, 80, 0.9);
  box-shadow: 0 6px 20px rgba(255, 100, 100, 0.4);
}

.copy-btn {
  width: 100%;
  margin-top: 1rem;
}

/* Output Section */
.output-title {
  color: #00d4ff;
  font-family: 'Doto', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.prompt-display {
  margin-bottom: 1rem;
}

.prompt-textarea {
  width: 100%;
  min-height: 300px;
  max-height: 50vh;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  color: #e0e0e0;
  font-family: 'Jura', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}

.prompt-textarea:focus {
  outline: none;
  border-color: #00d4ff;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

/* History Section */
.history-section {
  margin-top: 2rem;
}

.history-section h4 {
  color: #00d4ff;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: bold;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.history-item {
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 8px;
  padding: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  line-height: 1.4;
}

.history-item:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: rgba(0, 212, 255, 0.4);
  transform: translateX(3px);
}

/* GPT Section */
.gpt-section {
  border-top: 1px solid rgba(0, 212, 255, 0.25);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.gpt-section h3 {
  color: #00d4ff;
  font-family: 'Doto', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

/* MidJourney Section */
.mj-section {
  border-top: 1px solid rgba(0, 212, 255, 0.25);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

.mj-section h3 {
  color: #00d4ff;
  font-family: 'Doto', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

/* Presets Section */
.presets-section {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.presets-section h3 {
  color: #00d4ff;
  font-family: 'Doto', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.presets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}

.preset-btn {
  padding: 0.6rem 0.8rem;
  font-size: 0.8rem;
  background: rgba(0, 212, 255, 0.1);
  color: #e0e0e0;
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-btn:hover:not(:disabled) {
  background: rgba(0, 212, 255, 0.2);
  border-color: rgba(0, 212, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 212, 255, 0.3);
}

.preset-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(0, 212, 255, 0.2);
}

/* Target Audience Section */
.audience-section {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.audience-section h3 {
  color: #00d4ff;
  font-family: 'Doto', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.5rem;
}

.audience-btn {
  padding: 0.6rem 0.8rem;
  font-size: 0.8rem;
  background: rgba(255, 165, 0, 0.1);
  color: #e0e0e0;
  border: 1px solid rgba(255, 165, 0, 0.3);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audience-btn:hover:not(:disabled) {
  background: rgba(255, 165, 0, 0.2);
  border-color: rgba(255, 165, 0, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(255, 165, 0, 0.3);
}

.audience-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(255, 165, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .left-panel {
    max-height: none;
    order: 1;
  }

  .right-panel {
    order: 2;
  }
}

@media (max-width: 768px) {
  #root {
    padding: 0.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .left-panel,
  .right-panel {
    padding: 1rem;
  }

  .mode-toggle {
    flex-direction: column;
  }

  .mode-btn {
    padding: 1rem;
  }

  .prompt-textarea {
    min-height: 250px;
    font-size: 0.9rem;
  }

  .parameter-section {
    margin-bottom: 1rem;
  }

  .parameter-section h4 {
    font-size: 0.9rem;
  }

  .subject-input,
  .parameter-select {
    padding: 0.6rem;
    font-size: 0.9rem;
  }

  button {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .button-container {
    flex-direction: column;
  }

  .random-btn,
  .random-all-btn,
  .clear-all-btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .presets-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.4rem;
  }

  .preset-btn {
    padding: 0.5rem 0.6rem;
    font-size: 0.75rem;
  }

  .audience-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.4rem;
  }

  .audience-btn {
    padding: 0.5rem 0.6rem;
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  .main-layout {
    gap: 1rem;
  }

  .left-panel,
  .right-panel {
    padding: 0.75rem;
  }

  .prompt-textarea {
    min-height: 200px;
  }

  .history-list {
    max-height: 150px;
  }

  .history-item {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
}

/* Footer */
.footer {
  background: rgba(0, 0, 0, 0.8);
  border-top: 1px solid rgba(0, 212, 255, 0.3);
  margin-top: 3rem;
  padding: 2rem 0 1rem 0;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-brand h3 {
  color: #00d4ff;
  font-family: 'Doto', sans-serif;
  font-size: 1.5rem;
  margin: 0 0 0.5rem 0;
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
}

.footer-brand p {
  color: #a0a0a0;
  margin: 0;
  font-size: 1rem;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.footer-section h4 {
  color: #00d4ff;
  font-size: 1rem;
  margin: 0 0 1rem 0;
  font-weight: bold;
}

.footer-section a {
  display: block;
  color: #e0e0e0;
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #00d4ff;
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem;
  border-top: 1px solid rgba(0, 212, 255, 0.2);
  margin-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  color: #666;
  margin: 0;
  font-size: 0.9rem;
}

/* Footer Responsive */
@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-links {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer {
    padding: 1.5rem 0 1rem 0;
  }
}
