/* ── Layout ── */
.gen-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.gen-form { position: sticky; top: 84px; }

.gen-form-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--bg-glass-border);
}

.gen-form-icon { font-size: 1.1rem; }

.gen-form-title {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.gen-form-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.gen-form-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--bg-glass-border);
}

.gen-form-footer .btn { width: 100%; justify-content: center; }

/* ── Output ── */
.gen-output { min-height: 400px; overflow: hidden; }

.gen-output-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: var(--text-tertiary);
  text-align: center;
  padding: 2rem;
}

.gen-empty-icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.15; }
.gen-empty-title { font-size: 1.0625rem; color: var(--text-secondary); margin-bottom: 0.5rem; }
.gen-empty-sub { font-size: 0.8125rem; max-width: 320px; line-height: 1.5; }

/* ── Loading ── */
.gen-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 1.5rem;
}

.gen-loading-spinner {
  width: 32px; height: 32px;
  border: 2px solid rgba(255,255,255,0.04);
  border-top-color: var(--accent-orange);
  border-radius: 50%;
  animation: gen-spin 0.8s linear infinite;
}

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

.gen-loading-text { font-size: 0.8125rem; color: var(--text-tertiary); }

.gen-loading-dots { display: flex; gap: 4px; }

.gen-loading-dots span {
  width: 5px; height: 5px;
  background: var(--accent-orange);
  border-radius: 50%;
  animation: dot-bounce 1.4s ease-in-out infinite both;
}

.gen-loading-dots span:nth-child(1) { animation-delay: 0s; }
.gen-loading-dots span:nth-child(2) { animation-delay: 0.16s; }
.gen-loading-dots span:nth-child(3) { animation-delay: 0.32s; }

@keyframes dot-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

/* ── Result ── */
.gen-result { padding: 2rem; }

.gen-result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.gen-result-badge {
  font-size: 0.6875rem;
  color: var(--accent-orange);
  padding: 0.2rem 0.75rem;
  border: 1px solid rgba(255,107,53,0.15);
  border-radius: 50px;
}

.gen-result-actions { display: flex; gap: 0.5rem; }

.gen-result-body {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.gen-result-text {
  white-space: pre-wrap;
  line-height: 1.8;
  font-size: 0.9375rem;
  font-weight: 400;
}

.gen-result-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.gen-result-meta span { display: flex; align-items: center; gap: 0.25rem; }

/* ── Carousel Preview ── */
.carousel-preview { display: flex; flex-direction: column; gap: 1rem; }
.carousel-slide { padding: 1.25rem; border-radius: var(--radius-md); }
.carousel-slide-header { margin-bottom: 0.75rem; }
.carousel-slide-num { font-size: 0.6875rem; font-weight: 600; color: var(--accent-purple); text-transform: uppercase; letter-spacing: 0.05em; }
.carousel-slide-body { white-space: pre-wrap; line-height: 1.8; font-size: 0.9375rem; }

/* ── Channels ── */
.channels-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.channel-card {
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.channel-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.12);
}

.channel-icon { font-size: 1.75rem; display: block; margin-bottom: 0.75rem; }
.channel-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.channel-card p { font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.5; }
.channel-status { font-size: 0.6875rem; color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .gen-layout { grid-template-columns: 1fr; }
  .gen-form { position: static; }
  .channels-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .channels-grid { grid-template-columns: repeat(2, 1fr); }
  .gen-result-header { flex-direction: column; align-items: start; }
  .gen-result-meta { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .channels-grid { grid-template-columns: 1fr; }
}
