:root {
  --bg: #0f1418;
  --bg-soft: #161c22;
  --card: rgba(255, 255, 255, 0.06);
  --stroke: rgba(255, 255, 255, 0.08);
  --accent: #ffb454;
  --accent-2: #68d5ff;
  --text: #f3f5f7;
  --muted: #b7c0c8;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --radius: 18px;
  --mono: "IBM Plex Mono", "Source Code Pro", monospace;
  --sans: "Space Grotesk", "Sora", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: radial-gradient(circle at top left, #27313a, transparent 55%),
    radial-gradient(circle at 20% 80%, #1d2330, transparent 50%),
    linear-gradient(135deg, #0f1418, #0b0f13);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px
    ),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px;
  pointer-events: none;
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0 0 12px 0;
}

h1 {
  margin: 0 0 12px 0;
  font-size: clamp(2rem, 3vw, 3.2rem);
}

.sub {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  padding: 10px 16px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4ce59a;
  box-shadow: 0 0 12px rgba(76, 229, 154, 0.6);
}

.panel {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  padding: 24px;
  backdrop-filter: blur(12px);
}

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

.panel-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.panel-actions button {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}

.bubble {
  padding: 14px 16px;
  border-radius: 16px;
  line-height: 1.5;
  white-space: pre-wrap;
  border: 1px solid transparent;
}

.bubble.user {
  align-self: flex-end;
  background: rgba(255, 180, 84, 0.16);
  border-color: rgba(255, 180, 84, 0.3);
}

.bubble.merlin {
  align-self: flex-start;
  background: rgba(104, 213, 255, 0.12);
  border-color: rgba(104, 213, 255, 0.25);
  font-family: var(--mono);
  font-size: 0.9rem;
}

.composer {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

textarea {
  background: #0f151c;
  border: 1px solid var(--stroke);
  color: var(--text);
  border-radius: 14px;
  padding: 14px 16px;
  resize: vertical;
  min-height: 90px;
  font-family: var(--sans);
  font-size: 1rem;
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.hints {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--stroke);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.85rem;
}

#send {
  background: linear-gradient(135deg, var(--accent), #ffd38c);
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  font-weight: 600;
  cursor: pointer;
  color: #2b1d00;
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .chat {
    max-height: 320px;
  }
}
