:root {
  --bg-color: #03050d;
  --panel-bg: rgba(13, 21, 40, 0.55);
  --border-color: rgba(85, 231, 255, 0.15);
  --text-main: #eefcff;
  --text-muted: #91a4ba;
  --accent-cyan: #55e7ff;
  --accent-purple: #a987ff;
  --accent-gold: #ffae19;
  --accent-glow: rgba(85, 231, 255, 0.45);
  --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 80% 20%, #102849, transparent 50rem),
              radial-gradient(circle at 10% 90%, #0d1b33, transparent 40rem),
              var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-stack);
  overflow-x: hidden;
}

#generator-container {
  width: min(1200px, calc(100% - 32px));
  margin: auto;
  padding: 40px 0;
}

.generator-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 20px;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 8px 0;
  background: linear-gradient(135deg, #ffffff, var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.generator-header p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
  max-width: 600px;
}

.back-link {
  color: var(--text-muted);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.85rem;
  transition: all 0.25s ease;
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}

.back-link:hover {
  border-color: var(--accent-cyan);
  color: var(--text-main);
  box-shadow: 0 0 10px rgba(85, 231, 255, 0.15);
}

.grid-layout {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
  gap: 24px;
}

.panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

.config-panel {
  gap: 20px;
}

.panel h2 {
  font-size: 1.2rem;
  margin: 0 0 10px 0;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-purple);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

textarea, select, input[type="text"], input[type="number"] {
  background: rgba(5, 9, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-main);
  padding: 12px 14px;
  font-family: inherit;
  font-size: 0.92rem;
  transition: all 0.2s ease;
  outline: none;
}

textarea {
  resize: vertical;
}

textarea:focus, select:focus, input[type="text"]:focus, input[type="number"]:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(85, 231, 255, 0.2);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2391a4ba' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

.multi-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.multi-inputs input {
  width: 70px;
  text-align: center;
}

.x-sep {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: bold;
}

.info-alert {
  background: rgba(169, 135, 255, 0.08);
  border: 1px solid rgba(169, 135, 255, 0.2);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 10px;
}

.alert-icon {
  font-size: 1.2rem;
  color: var(--accent-purple);
  line-height: 1;
}

.info-alert p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #c7d1e0;
}

/* Preview Panel */
.preview-panel {
  max-height: calc(100vh - 160px);
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.preview-header h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.glow-button {
  background: linear-gradient(135deg, var(--accent-cyan), #00b0ff);
  border: none;
  border-radius: 10px;
  color: #03050d;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 15px rgba(85, 231, 255, 0.25);
}

.glow-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(85, 231, 255, 0.5);
  filter: brightness(1.1);
}

.glow-button:active {
  transform: translateY(1px);
}

/* Success state */
.glow-button.copied {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
}

.prompt-scroll-container {
  background: rgba(5, 9, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  flex: 1;
  overflow-y: auto;
  font-family: Consolas, Monaco, "Lucida Console", monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #9cb4cd;
  white-space: pre-wrap;
}

/* Custom Scrollbar */
.prompt-scroll-container::-webkit-scrollbar {
  width: 8px;
}

.prompt-scroll-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

.prompt-scroll-container::-webkit-scrollbar-thumb {
  background: rgba(85, 231, 255, 0.15);
  border-radius: 4px;
}

.prompt-scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(85, 231, 255, 0.3);
}

@media (max-width: 1000px) {
  .grid-layout {
    grid-template-columns: 1fr;
  }
  .preview-panel {
    max-height: none;
    height: 500px;
  }
}
