/* Reset and base styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

body {
  background-color: #0F172A;
  background-image: radial-gradient(#334155 1px, transparent 1px);
  background-size: 16px 16px;
  color: #F1F5F9;
  font-family: Inter, sans-serif;
}

/* Layout utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.flex {
  display: flex;
}

.flex-1 {
  flex: 1 1 0%;
}

.flex-col {
  flex-direction: column;
}

.flex-grow {
  flex-grow: 1;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.justify-end {
  justify-content: flex-end;
}

.space-x-2 > :not([hidden]) ~ :not([hidden]) {
  margin-left: 0.5rem;
}

.space-x-3 > :not([hidden]) ~ :not([hidden]) {
  margin-left: 0.75rem;
}

.space-x-4 > :not([hidden]) ~ :not([hidden]) {
  margin-left: 1rem;
}

.space-y-3 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0.75rem;
}

.space-y-4 > :not([hidden]) ~ :not([hidden]) {
  margin-top: 1rem;
}

/* Grid */
.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gap-4 {
  gap: 1rem;
}

.gap-6 {
  gap: 1.5rem;
}

/* Sizing */
.w-5 {
  width: 1.25rem;
}

.w-10 {
  width: 2.5rem;
}

.w-64 {
  width: 16rem;
}

.w-full {
  width: 100%;
}

.h-5 {
  height: 1.25rem;
}

.h-6 {
  height: 1.5rem;
}

.h-8 {
  height: 2rem;
}

.h-10 {
  height: 2.5rem;
}

.h-full {
  height: 100%;
}

.h-screen {
  height: 100vh;
}

.min-h-screen {
  min-height: 100vh;
}

.min-h-\[200px\] {
  min-height: 200px;
}

.max-h-screen {
  max-height: 100vh;
}

.max-w-none {
  max-width: none;
}

/* Positioning */
.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

.sticky {
  position: sticky;
}

.inset-y-0 {
  top: 0;
  bottom: 0;
}

.right-0 {
  right: 0;
}

.top-0 {
  top: 0;
}

.z-10 {
  z-index: 10;
}

/* Display */
.block {
  display: block;
}

/* Overflow */
.overflow-y-auto {
  overflow-y: auto;
}

.overflow-x-auto {
  overflow-x: auto;
}

/* Spacing */
.p-2 {
  padding: 0.5rem;
}

.p-3 {
  padding: 0.75rem;
}

.p-4 {
  padding: 1rem;
}

.p-6 {
  padding: 1.5rem;
}

.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.px-10 {
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-2\.5 {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.pt-2 {
  padding-top: 0.5rem;
}

.pt-4 {
  padding-top: 1rem;
}

.pt-10 {
  padding-top: 2.5rem;
}

.pb-6 {
  padding-bottom: 1.5rem;
}

.pr-2 {
  padding-right: 0.5rem;
}

.pr-10 {
  padding-right: 2.5rem;
}

.pl-1 {
  padding-left: 0.25rem;
}

.m-4 {
  margin: 1rem;
}

.mr-3 {
  margin-right: 0.75rem;
}

.mr-4 {
  margin-right: 1rem;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-8 {
  margin-top: 2rem;
}

.-ml-1 {
  margin-left: -0.25rem;
}

/* Typography */
.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.font-sans {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

.tracking-tight {
  letter-spacing: -0.025em;
}

.text-left {
  text-align: left;
}

.text-center {
  text-align: center;
}

.whitespace-nowrap {
  white-space: nowrap;
}

.whitespace-pre-wrap {
  white-space: pre-wrap;
}

.line-through {
  text-decoration: line-through;
}

.uppercase {
  text-transform: uppercase;
}

/* Colors */
.text-white {
  color: white;
}

.text-text_primary {
  color: #F1F5F9;
}

.text-text_secondary {
  color: #94A3B8;
}

.text-text_tertiary {
  color: #64748B;
}

.text-primary {
  color: #7C3AED;
}

.text-blue-300 {
  color: #93C5FD;
}

.text-blue-400 {
  color: #60A5FA;
}

.text-green-400 {
  color: #4ADE80;
}

.text-red-400 {
  color: #F87171;
}

.text-yellow-400 {
  color: #FACC15;
}

.text-purple-400 {
  color: #C084FC;
}

.text-slate-100 {
  color: #F1F5F9;
}

.text-slate-400 {
  color: #94A3B8;
}

.text-slate-500 {
  color: #64748B;
}

/* Backgrounds */
.bg-background {
  background-color: #0F172A;
}

.bg-card {
  background-color: #1E293B;
}

.bg-card\/50 {
  background-color: rgba(30, 41, 59, 0.5);
}

.bg-input-bg {
  background-color: #334155;
}

.bg-primary {
  background-color: #7C3AED;
}

.bg-primary\/10 {
  background-color: rgba(124, 58, 237, 0.1);
}

.bg-primary\/20 {
  background-color: rgba(124, 58, 237, 0.2);
}

.bg-white\/5 {
  background-color: rgba(255, 255, 255, 0.05);
}

.bg-slate-600 {
  background-color: #475569;
}

.bg-slate-700 {
  background-color: #334155;
}

.bg-slate-700\/50 {
  background-color: rgba(51, 65, 85, 0.5);
}

.bg-slate-800 {
  background-color: #1E293B;
}

.bg-slate-900 {
  background-color: #0F172A;
}

.bg-green-500\/20 {
  background-color: rgba(34, 197, 94, 0.2);
}

.bg-green-600 {
  background-color: #16A34A;
}

.bg-green-700 {
  background-color: #15803D;
}

.bg-yellow-500\/20 {
  background-color: rgba(234, 179, 8, 0.2);
}

.bg-red-500\/20 {
  background-color: rgba(239, 68, 68, 0.2);
}

.bg-red-900\/20 {
  background-color: rgba(127, 29, 29, 0.2);
}

.bg-blue-900\/30 {
  background-color: rgba(30, 58, 138, 0.3);
}

.bg-violet-600 {
  background-color: #7C3AED;
}

.bg-violet-700 {
  background-color: #6D28D9;
}

/* Borders */
.border {
  border-width: 1px;
}

.border-2 {
  border-width: 2px;
}

.border-b {
  border-bottom-width: 1px;
}

.border-r {
  border-right-width: 1px;
}

.border-t {
  border-top-width: 1px;
}

.border-card-border {
  border-color: #334155;
}

.border-input-border {
  border-color: #475569;
}

.border-primary {
  border-color: #7C3AED;
}

.border-text_tertiary {
  border-color: #64748B;
}

.border-blue-500\/50 {
  border-color: rgba(59, 130, 246, 0.5);
}

.border-slate-600 {
  border-color: #475569;
}

.border-slate-700 {
  border-color: #334155;
}

/* Border radius */
.rounded {
  border-radius: 0.375rem;
}

.rounded-md {
  border-radius: 0.375rem;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-full {
  border-radius: 9999px;
}

/* Effects */
.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.backdrop-blur-sm {
  backdrop-filter: blur(4px);
}

.ring-2 {
  box-shadow: 0 0 0 2px currentColor;
}

.ring-primary\/50 {
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.5);
}

/* Opacity */
.opacity-25 {
  opacity: 0.25;
}

.opacity-75 {
  opacity: 0.75;
}

/* Cursor */
.cursor-pointer {
  cursor: pointer;
}

.cursor-not-allowed {
  cursor: not-allowed;
}

/* Transitions */
.transition {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* Animations */
.animate-spin {
  animation: spin 1s linear infinite;
}

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

/* Interactive states */
.hover\:bg-primary-700:hover {
  background-color: #5B21B6;
}

.hover\:bg-green-700:hover {
  background-color: #15803D;
}

.hover\:bg-slate-700:hover {
  background-color: #334155;
}

.hover\:bg-slate-700\/50:hover {
  background-color: rgba(51, 65, 85, 0.5);
}

.hover\:bg-white\/5:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.hover\:bg-violet-700:hover {
  background-color: #6D28D9;
}

.hover\:text-text_primary:hover {
  color: #F1F5F9;
}

.hover\:text-text_secondary:hover {
  color: #94A3B8;
}

.hover\:border-primary:hover {
  border-color: #7C3AED;
}

.focus\:outline-none:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.focus\:ring-2:focus {
  box-shadow: 0 0 0 2px #7C3AED;
}

.focus\:ring-primary:focus {
  box-shadow: 0 0 0 2px #7C3AED;
}

.focus\:ring-offset-2:focus {
  box-shadow: 0 0 0 2px #7C3AED, 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.focus\:ring-offset-card:focus {
  box-shadow: 0 0 0 2px #7C3AED, 0 0 0 4px #1E293B;
}

.focus\:ring-offset-background:focus {
  box-shadow: 0 0 0 2px #7C3AED, 0 0 0 4px #0F172A;
}

.focus\:border-primary:focus {
  border-color: #7C3AED;
}

.disabled\:opacity-50:disabled {
  opacity: 0.5;
}

.disabled\:cursor-not-allowed:disabled {
  cursor: not-allowed;
}

/* Group hover */
.group:hover .group-hover\:border-primary {
  border-color: #7C3AED;
}

.group {
  /* Group class for hover states */
}

/* Responsive design */
@media (min-width: 640px) {
  .sm\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  
  .lg\:col-span-2 {
    grid-column: span 2 / span 2;
  }
  
  .lg\:col-span-4 {
    grid-column: span 4 / span 4;
  }
}

/* Form elements */
input, textarea, select {
  background-color: #334155;
  border: 1px solid #475569;
  color: #F1F5F9;
  padding: 0.5rem;
  border-radius: 0.375rem;
  width: 100%;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #7C3AED;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

button {
  background-color: #7C3AED;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.15s ease;
}

button:hover {
  background-color: #6D28D9;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Prose styling */
.prose {
  max-width: 65ch;
  color: #F1F5F9;
}

.prose-invert {
  color: #F1F5F9;
}

.prose-sm {
  font-size: 0.875rem;
  line-height: 1.7142857;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  color: #F1F5F9;
  font-weight: 600;
  margin-top: 2em;
  margin-bottom: 1em;
}

.prose ul, .prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.625em;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

/* Dark mode */
.dark {
  color-scheme: dark;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background-color: #1E293B;
}

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

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