:root {
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255,255,255,0.65);
  --border: rgba(255,255,255,0.18);
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(255,255,255,0.10);
  --focus: rgba(255,255,255,0.35);
  --shadow: 0 10px 30px rgba(0,0,0,0.55);
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.92), rgba(0,0,0,0.55));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 650;
  opacity: 0.9;
}

.model-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

label {
  font-size: 12px;
  color: var(--muted);
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

select {
  background: var(--panel);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 36px 10px 12px;
  font-size: 13px;
  outline: none;
}

/* Layout */
.page {
  display: flex;
  justify-content: center;
}

.container {
  width: min(980px, 92vw);
  padding-bottom: 56px;
}

.transcript {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 18px;
}

/* Chat bubbles */
.turn {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

.bubble.user {
  background: rgba(255,255,255,0.07);
}

.meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.who {
  font-weight: 600;
}

.model-pill {
  font-family: var(--mono);
  font-size: 11px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.06);
  padding: 4px 8px;
  border-radius: 999px;
}

.content {
  white-space: pre-wrap;
  line-height: 1.45;
  font-size: 14.5px;
}

/* Composer */
.composer-wrap {
  display: grid;
  place-items: center;
  margin-top: 18vh;
}

.composer-wrap.has-chat {
  margin-top: 22px;
}

.composer {
  width: min(820px, 92vw);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.05));
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.hint {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

textarea {
  width: 100%;
  min-height: 70px;
  background: rgba(0,0,0,0.35);
  color: var(--fg);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  padding: 12px;
  resize: vertical;
}

.composer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.kbd {
  font-family: var(--mono);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 11px;
}

button {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  color: var(--fg);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
}

.footer-spacer {
  height: 40px;
}
