:root {
  --bg: #0b0f13;
  --panel: #111821;
  --panel-2: #141f2b;
  --line: #233244;
  --text: #e6edf5;
  --muted: #8fa3bc;
  --accent: #26c6a6;
  --accent-2: #0ea5e9;
  --warn: #f59e0b;
  --error: #ef4444;
  --success: #22c55e;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background:
    radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.16), transparent 35%),
    radial-gradient(circle at 85% 15%, rgba(38, 198, 166, 0.12), transparent 40%),
    linear-gradient(165deg, #070a0d 0%, #0b0f13 50%, #0e141c 100%);
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(38, 198, 166, 0.08), transparent 40%),
    linear-gradient(-120deg, rgba(14, 165, 233, 0.08), transparent 45%);
}

.app-shell {
  max-width: 1280px;
  margin: 24px auto;
  padding: 0 16px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.panel {
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.panel-header h1,
.panel-header h2,
.panel-header h3 {
  margin: 0;
  letter-spacing: 0.2px;
}

.panel-header p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

label {
  display: block;
  margin: 18px 0 8px;
  font-size: 0.92rem;
  color: #c5d3e5;
}

textarea,
input {
  width: 100%;
  border: 1px solid #2a3a4e;
  border-radius: 10px;
  background: #0b121a;
  color: var(--text);
  padding: 12px;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea:focus,
input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.examples {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.examples span {
  font-size: 0.85rem;
  color: var(--muted);
}

.example-btn {
  background: rgba(38, 198, 166, 0.12);
  color: #8df0de;
  border: 1px solid rgba(38, 198, 166, 0.35);
  border-radius: 999px;
  padding: 6px 11px;
  cursor: pointer;
  font-size: 0.82rem;
}

.button-row {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.2s ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

#generateBtn {
  background: linear-gradient(90deg, #0ea5e9, #26c6a6);
  color: #031520;
}

#continueBtn {
  background: #1f2937;
  color: #e5eefc;
  border: 1px solid #36485f;
}

button.ghost {
  background: transparent;
  color: #b6c7dc;
  border: 1px solid #3b4b60;
}

.status-box {
  margin-top: 14px;
  border: 1px dashed #2f4158;
  border-radius: 10px;
  padding: 12px;
  color: #bcd0e7;
  background: rgba(10, 16, 24, 0.8);
}

.status-box[data-type="warn"] {
  color: #ffd28c;
  border-color: rgba(245, 158, 11, 0.55);
}

.status-box[data-type="error"] {
  color: #ffb0b0;
  border-color: rgba(239, 68, 68, 0.6);
}

.status-box[data-type="success"] {
  color: #9ee7b1;
  border-color: rgba(34, 197, 94, 0.55);
}

.logs {
  margin-top: 16px;
  background: #0a1118;
  border: 1px solid #223042;
  border-radius: 10px;
  min-height: 380px;
  max-height: 62vh;
  overflow: auto;
  padding: 12px;
}

.log-line {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.log-info {
  background: rgba(14, 165, 233, 0.12);
  color: #bce9ff;
}

.log-warn {
  background: rgba(245, 158, 11, 0.15);
  color: #ffd28c;
}

.log-error {
  background: rgba(239, 68, 68, 0.18);
  color: #ffb2b2;
}

.log-success {
  background: rgba(34, 197, 94, 0.16);
  color: #9ee7b1;
}

.log-chunk {
  margin-bottom: 10px;
  border: 1px solid #2a3d52;
  border-radius: 8px;
  background: #0f1721;
}

.log-chunk summary {
  cursor: pointer;
  list-style: none;
  padding: 9px 10px;
  color: #9fc7ea;
}

.log-chunk summary::-webkit-details-marker {
  display: none;
}

.log-chunk pre {
  margin: 0;
  border-top: 1px solid #2a3d52;
  padding: 10px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d4e1ef;
  font-size: 0.82rem;
}

.result-card {
  margin-top: 14px;
  border: 1px solid #2e445c;
  border-radius: 10px;
  padding: 12px;
  background: rgba(8, 16, 24, 0.9);
}

.result-card h3 {
  margin: 0;
}

.result-card p {
  margin: 8px 0;
  color: #9fc3e4;
  font-size: 0.9rem;
}

.result-card ul {
  margin: 0 0 10px 18px;
  color: #c8d8ea;
}

.result-card a {
  color: #7dd3fc;
  text-decoration: none;
}

.hidden {
  display: none;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .logs {
    max-height: 52vh;
  }
}
