@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #1e293b;
}

::-webkit-scrollbar-thumb {
  background: #475569;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Code blocks */
pre {
  background: #0f172a;
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875rem;
}

/* Message animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.message-enter {
  animation: fadeIn 0.2s ease-out;
}

/* Typing indicator */
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.typing-dot {
  animation: pulse 1.4s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

/* Claude message markdown styling */
.claude-message {
  color: #94a3b8; /* gray text */
  font-size: 0.875rem; /* base text-sm */
}

div.claude-message h1 {
  all: revert;
  color: #fb923c !important;
  font-weight: 700 !important;
  font-size: 1.75rem !important;
  margin-top: 1.25rem !important;
  margin-bottom: 0.75rem !important;
  line-height: 1.2 !important;
}

div.claude-message h2 {
  all: revert;
  color: #fb923c !important;
  font-weight: 700 !important;
  font-size: 1.375rem !important;
  margin-top: 1rem !important;
  margin-bottom: 0.5rem !important;
  line-height: 1.2 !important;
}

div.claude-message h3 {
  all: revert;
  color: #fb923c !important;
  font-weight: 600 !important;
  font-size: 1.125rem !important;
  margin-top: 0.875rem !important;
  margin-bottom: 0.375rem !important;
  line-height: 1.3 !important;
}

div.claude-message h4 {
  all: revert;
  color: #fb923c !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  margin-top: 0.75rem !important;
  margin-bottom: 0.25rem !important;
  line-height: 1.3 !important;
}

.claude-message p {
  margin: 0.5rem 0;
  line-height: 1.6;
}

.claude-message strong {
  color: #ffffff;
  font-weight: 700;
}

.claude-message em {
  color: #cbd5e1;
  font-style: italic;
}

.claude-message a {
  color: #22d3ee; /* cyan-400 */
  text-decoration: none;
}

.claude-message a:hover {
  text-decoration: underline;
}

.claude-message code {
  color: #67e8f9; /* cyan-300 */
  background: #0f172a;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}

.claude-message pre {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  margin: 0.75rem 0;
  padding: 0;
}

.claude-message pre code {
  background: transparent;
  padding: 0;
}

.claude-message ul {
  margin: 0.5rem 0 !important;
  padding-left: 1.5rem !important;
  list-style-type: disc !important;
  list-style-position: outside !important;
}

.claude-message ol {
  margin: 0.5rem 0 !important;
  padding-left: 1.5rem !important;
  list-style-type: decimal !important;
  list-style-position: outside !important;
}

.claude-message ul li,
.claude-message ol li {
  display: list-item !important;
}

.claude-message li {
  margin: 0.25rem 0;
}

.claude-message li::marker {
  color: #f97316; /* orange-500 */
}

.claude-message blockquote {
  border-left: 3px solid #f97316;
  padding-left: 1rem;
  margin: 0.75rem 0;
  color: #64748b;
  font-style: italic;
}

.claude-message table {
  font-size: 0.75rem;
  border-collapse: collapse;
  width: 100%;
  margin: 0.75rem 0;
}

.claude-message th {
  color: #fb923c;
  font-weight: 600;
  text-align: left;
  padding: 0.5rem;
  border-bottom: 1px solid #334155;
}

.claude-message td {
  color: #94a3b8;
  padding: 0.5rem;
  border-bottom: 1px solid #1e293b;
}
