:root {
  --background: #09090b;
  --card: #131316;
  --border: #26262b;
  --border-hover: #34343b;
  --foreground: #fafafa;
  --muted-foreground: #a1a1aa;
  --primary: #6d5bf6;
  --primary-hover: #7c6cf8;
  --primary-foreground: #ffffff;
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.1);
  --success-border: rgba(34, 197, 94, 0.3);
  --error: #f87171;
  --error-bg: rgba(248, 113, 113, 0.1);
  --error-border: rgba(248, 113, 113, 0.3);
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.container {
  width: 100%;
  max-width: 640px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}

.title {
  margin: 0 0 6px 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 0 0 20px 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted-foreground);
}

.textarea {
  width: 100%;
  min-height: 180px;
  max-height: 480px;
  resize: none;
  overflow-y: auto;
  background: #0e0e11;
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13.5px;
  line-height: 1.65;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.textarea::placeholder {
  color: #52525b;
}

.textarea:hover {
  border-color: var(--border-hover);
}

.textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(109, 91, 246, 0.25);
}

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

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

.send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}

.send-button:hover:not(:disabled) {
  background: var(--primary-hover);
}

.send-button:active:not(:disabled) {
  transform: scale(0.98);
}

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

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.message {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid transparent;
}

.message.success {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}

.message.error {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--error);
}

.hidden {
  display: none !important;
  }
