*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0d0f13;
  --bg-elevated: #161a21;
  --bg-card: #1a1f29;
  --bg-input: #1e242e;
  --bg-hover: #232a36;
  --text: #f0f2f5;
  --text-muted: #a3abba;
  --text-dim: #6b7280;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --accent-hover: #60a5fa;
  --accent-active: #2563eb;
  --border: #2a3140;
  --border-subtle: #1e2530;
  --success: #22c55e;
  --error: #ef4444;
  --warning: #eab308;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --transition: 0.15s ease;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.app {
  min-height: 100vh;
}

.login-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 20px;
  padding: 24px;
}

.login-form h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 8px;
}

.login-form input {
  padding: 14px 18px;
  width: 320px;
  max-width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.login-form input::placeholder {
  color: var(--text-dim);
}

.login-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.login-form button {
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  transition: background var(--transition), transform 0.1s;
}

.login-form button:hover {
  background: var(--accent-hover);
}

.login-form button:active {
  transform: scale(0.98);
}

.error {
  color: var(--error);
  font-size: 14px;
  min-height: 1.5em;
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 24px;
  height: 60px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-btn {
  padding: 10px 16px;
  background: transparent;
  color: var(--text);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}

.nav-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.nav-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-btn.logout {
  margin-left: auto;
  color: var(--text);
}

.nav-btn.logout:hover {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

.view-container {
  padding: 40px 24px;
  max-width: 800px;
  margin: 0 auto;
  min-height: calc(100vh - 60px);
}

.view h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--text);
}

.prompt-tester {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.prompt-tester h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.prompt-tester .session-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.prompt-tester .session-selector label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.prompt-tester .session-selector .session-error {
  flex-basis: 100%;
  color: var(--error);
  font-size: 13px;
  padding: 8px 0;
}

.prompt-tester .session-selector select {
  padding: 10px 40px 10px 14px;
  background: var(--bg-input);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a3abba' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  min-width: 220px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.prompt-tester .session-selector select:hover {
  border-color: var(--text-dim);
}

.prompt-tester .session-selector select:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.prompt-tester .session-selector .nav-btn {
  padding: 9px 16px;
  font-size: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
}

.prompt-tester .session-selector .nav-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.prompt-tester .prompt-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.prompt-tester .prompt-input {
  flex: 1;
  min-height: 120px;
  padding: 16px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.prompt-tester .prompt-input::placeholder {
  color: var(--text-dim);
}

.prompt-tester .prompt-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.prompt-tester .send-btn {
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  transition: background var(--transition), box-shadow var(--transition), transform 0.1s;
}

.prompt-tester .send-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

.prompt-tester .send-btn:active:not(:disabled) {
  background: var(--accent-active);
  transform: scale(0.98);
}

.prompt-tester .send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.prompt-tester .response-section {
  margin-top: 8px;
}

.prompt-tester .response-section > p {
  color: var(--text-muted);
  font-size: 15px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.prompt-tester .response-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.prompt-tester .response-card h3 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.prompt-tester .response-card h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 16px 0 8px;
}

.prompt-tester .response-card pre {
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt-tester .tool-calls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.prompt-tester .tool-call {
  font-size: 13px;
  padding: 16px;
  margin: 0;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

.prompt-tester .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 13px;
  color: var(--text-muted);
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.prompt-tester .meta span {
  display: flex;
  align-items: center;
}

button,
input,
textarea,
select {
  font-family: var(--font);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

button {
  background: transparent;
  border: none;
  color: #FFF;
}

code,
pre {
  font-family: var(--font-mono);
  font-size: 13px;
}

pre {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 20px;
  overflow-x: auto;
}
