/* Generator page — matches ClipStack design system */

.gen-page {
  min-height: 100vh;
  background: var(--bg);
}

/* FORM SECTION */
.gen-form-section {
  padding: 80px 48px 60px;
  max-width: 900px;
  margin: 0 auto;
}

.gen-header {
  margin-bottom: 48px;
}

.gen-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(28px, 3.5vw, 44px);
  letter-spacing: -1.5px;
  color: var(--fg);
  line-height: 1.15;
  margin-bottom: 16px;
}

.gen-sub {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.7;
  max-width: 600px;
}

.gen-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

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

.field-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-label {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.field-select {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 10px;
  padding: 14px 18px;
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  transition: border-color 0.15s;
}

.field-select:focus {
  outline: none;
  border-color: var(--accent);
}

.field-select option {
  background: var(--surface);
  color: var(--fg);
}

.gen-submit {
  background: var(--accent);
  color: #111;
  border: none;
  border-radius: 10px;
  padding: 16px 40px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
  cursor: pointer;
  align-self: flex-start;
  transition: opacity 0.15s, transform 0.1s;
}

.gen-submit:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.gen-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.error-msg {
  background: #3a1515;
  border: 1px solid var(--red);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--red);
  font-size: 14px;
  display: none;
}

.error-msg.visible { display: block; }

/* RESULTS SECTION */
.gen-results-section {
  padding: 0 48px 100px;
  max-width: 900px;
  margin: 0 auto;
  display: none;
}

.gen-results-section.visible { display: block; }

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.results-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--fg);
}

.results-badge {
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.ideas-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.idea-card {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 14px;
  padding: 28px 32px;
  transition: border-color 0.15s;
}

.idea-card:hover {
  border-color: var(--accent-dim);
}

.idea-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.idea-num {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 36px;
  color: var(--accent-dim);
  letter-spacing: -2px;
  line-height: 1;
}

.idea-duration {
  background: var(--surface-2);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
}

.idea-topic {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--fg);
  margin-bottom: 14px;
  line-height: 1.3;
}

.idea-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.idea-meta-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.meta-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  min-width: 80px;
  padding-top: 2px;
}

.idea-top-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.save-btn {
  background: none;
  border: 1px solid var(--surface-2);
  border-radius: 6px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 16px;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.save-btn:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: #1f1500;
}

.save-btn.saved {
  color: var(--accent);
  border-color: var(--accent);
  background: #1f1500;
}

.meta-value {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
}

/* TOAST */
.save-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--surface);
  border: 1px solid var(--accent-dim);
  color: var(--fg);
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
}

.save-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* LOADING */
.loading-overlay {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
}

.loading-overlay.visible { display: flex; }

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--surface-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.loading-text {
  font-size: 14px;
  color: var(--fg-muted);
}

/* RESPONSIVE */
@media (max-width: 700px) {
  .gen-form-section, .gen-results-section { padding-left: 24px; padding-right: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .gen-submit { width: 100%; }
}