:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: rgba(12, 16, 24, 0.82);
  --panel-2: rgba(20, 26, 38, 0.9);
  --text: #f4f7fb;
  --muted: #9aa7b7;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #f6c7ff;
  --accent-2: #8bf6d8;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(246, 199, 255, 0.18), transparent 35%),
    radial-gradient(circle at bottom right, rgba(139, 246, 216, 0.12), transparent 30%),
    linear-gradient(180deg, #090b10 0%, #050608 100%);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}

body {
  min-height: 100vh;
  padding: 24px;
}

.shell {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: stretch;
  min-height: calc(100vh - 48px);
}

.hero, .chat-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero {
  padding: 36px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 12px;
  color: var(--accent-2);
}

h1 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(64px, 12vw, 108px);
  line-height: 0.9;
  text-transform: uppercase;
}

.lede {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  max-width: 34rem;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.prompt-box {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.prompt-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.prompt-head label {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  font-weight: 600;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.toggle input { accent-color: var(--accent); }

.chat-card {
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-log {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: auto;
  min-height: 500px;
}

.msg {
  max-width: 85%;
  border-radius: 20px;
  padding: 14px 16px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.msg.user {
  margin-left: auto;
  background: linear-gradient(135deg, rgba(246, 199, 255, 0.2), rgba(246, 199, 255, 0.1));
  border: 1px solid rgba(246, 199, 255, 0.16);
}

.msg.assistant {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.msg.meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.composer {
  padding: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
  background: rgba(0, 0, 0, 0.14);
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 76px;
  max-height: 180px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  padding: 16px;
  font: inherit;
  outline: none;
}

textarea:focus {
  border-color: rgba(246, 199, 255, 0.5);
  box-shadow: 0 0 0 3px rgba(246, 199, 255, 0.12);
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

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

.primary {
  background: linear-gradient(135deg, var(--accent), #ffd8ab);
  color: #19131f;
}

.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--line);
}

.small {
  padding: 10px 14px;
  font-size: 13px;
}

@media (max-width: 900px) {
  body { padding: 16px; }
  .shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .chat-log {
    min-height: 360px;
  }
}
