/* Basalt Wizard — Dark Theme */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0a;
  --text: #e0e0e0;
  --gold: #d4a853;
  --user-bg: #1a1a2e;
  --assistant-bg: #1a1a1a;
  --input-bg: #111;
  --border: #222;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

body {
  display: flex;
  flex-direction: column;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
header {
  text-align: center;
  padding: 24px 0 8px;
  flex-shrink: 0;
}

header h1 {
  font-size: 28px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: lowercase;
  margin-bottom: 4px;
}

header p {
  font-size: 13px;
  color: #888;
}

/* Chat area */
#chat {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 8px;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.6;
}

.msg.user {
  align-self: flex-end;
  background: var(--user-bg);
  color: var(--text);
  border-bottom-right-radius: 2px;
}

.msg.assistant {
  align-self: flex-start;
  background: var(--assistant-bg);
  color: var(--text);
  border-left: 2px solid var(--gold);
  border-bottom-left-radius: 2px;
}

/* Typing indicator */
.msg.assistant.typing {
  color: #888;
  font-style: italic;
}

/* Generate brief button */
#brief-btn {
  display: none;
  width: 100%;
  padding: 14px;
  margin: 8px 0;
  background: var(--gold);
  color: #0a0a0a;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.15s;
}

#brief-btn:hover {
  opacity: 0.9;
}

/* Input form */
#input-form {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  padding: 12px 0 20px;
  border-top: 1px solid var(--border);
}

#input-form input {
  flex: 1;
  padding: 10px 14px;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

#input-form input:focus {
  border-color: var(--gold);
}

#input-form input::placeholder {
  color: #555;
}

#input-form input:disabled {
  opacity: 0.5;
}

#input-form button {
  padding: 10px 20px;
  background: var(--gold);
  color: #0a0a0a;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

#input-form button:hover {
  opacity: 0.9;
}

#input-form button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Option buttons */
.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
  padding: 0 8px;
}

.option-btn {
  background: #1a1a2e;
  border: 1px solid #333;
  border-radius: 8px;
  color: #e0e0e0;
  padding: 10px 16px;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.option-btn:hover {
  border-color: var(--gold);
  background: #1a1a3e;
}

/* Scrollbar styling */
#chat::-webkit-scrollbar {
  width: 6px;
}

#chat::-webkit-scrollbar-track {
  background: transparent;
}

#chat::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

#chat::-webkit-scrollbar-thumb:hover {
  background: #444;
}
