/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --background: oklch(0.99 0 0);
  --foreground: oklch(0.09 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.09 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.09 0 0);
  --primary: oklch(0.09 0 0);
  --primary-foreground: oklch(0.99 0 0);
  --secondary: oklch(0.96 0 0);
  --secondary-foreground: oklch(0.09 0 0);
  --muted: oklch(0.96 0 0);
  --muted-foreground: oklch(0.35 0 0); /* Increased contrast from 0.46 to 0.35 */
  --accent: oklch(0.93 0 0); /* Slightly darker for better hover visibility */
  --accent-foreground: oklch(0.09 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.99 0 0);
  --border: oklch(0.85 0 0); /* Darker border for better visibility */
  --input: oklch(0.9 0 0);
  --ring: oklch(0.09 0 0);
  --radius: 0.5rem;
  --code-bg: oklch(0.97 0 0);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: oklch(0.09 0 0);
    --foreground: oklch(0.99 0 0);
    --card: oklch(0.09 0 0);
    --card-foreground: oklch(0.99 0 0);
    --popover: oklch(0.09 0 0);
    --popover-foreground: oklch(0.99 0 0);
    --primary: oklch(0.99 0 0);
    --primary-foreground: oklch(0.09 0 0);
    --secondary: oklch(0.18 0 0);
    --secondary-foreground: oklch(0.99 0 0);
    --muted: oklch(0.15 0 0);
    --muted-foreground: oklch(0.75 0 0); /* Increased contrast from 0.64 to 0.75 */
    --accent: oklch(0.20 0 0); /* Lighter for better hover visibility */
    --accent-foreground: oklch(0.99 0 0);
    --destructive: oklch(0.396 0.141 25.723);
    --destructive-foreground: oklch(0.99 0 0);
    --border: oklch(0.25 0 0); /* Lighter border for better visibility */
    --input: oklch(0.18 0 0);
    --ring: oklch(0.82 0 0);
    --code-bg: oklch(0.12 0 0);
  }
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-sans {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.font-mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
}

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

::-webkit-scrollbar-track {
  background: var(--muted);
  opacity: 0.3;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted-foreground);
  opacity: 0.5;
}

/* Utility Classes */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.flex {
  display: flex;
}

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

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

.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.grid {
  display: grid;
}

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

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

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

/* 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-4xl { font-size: 2.25rem; line-height: 2.5rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

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

.leading-none { line-height: 1; }
.leading-relaxed { line-height: 1.625; }

.text-balance {
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}

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

.uppercase { text-transform: uppercase; }

/* Colors */
.text-foreground { color: var(--foreground); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-green-600 { color: rgb(22, 163, 74); }
.bg-background { background-color: var(--background); }
.bg-muted { background-color: var(--muted); }
.bg-muted\/30 { background-color: var(--muted); opacity: 0.3; }
.bg-muted\/50 { background-color: var(--muted); opacity: 0.5; }

/* Spacing */
.m-0 { margin: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-6 { margin-top: 1.5rem; }

.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.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-8 { padding-left: 2rem; padding-right: 2rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }

.pt-6 { padding-top: 1.5rem; }

/* Borders */
.border { border-width: 1px; border-style: solid; }
.border-b { border-bottom-width: 1px; border-style: solid; }
.border-r { border-right-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; border-style: solid; }
.border-l { border-left-width: 1px; border-style: solid; }
.border-border { border-color: var(--border); }

.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: calc(var(--radius) - 2px); }
.rounded-lg { border-radius: var(--radius); }
.rounded-full { border-radius: 9999px; }

/* Dimensions */
.w-64 { width: 16rem; }
.w-8 { width: 2rem; }
.w-9 { width: 2.25rem; }
.w-full { width: 100%; }
.h-16 { height: 4rem; }
.h-2 { height: 0.5rem; }
.h-1\.5 { height: 0.375rem; }
.h-3 { height: 0.75rem; }
.h-3\.5 { height: 0.875rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-8 { height: 2rem; }
.h-9 { height: 2.25rem; }
.min-h-screen { min-height: 100vh; }
.max-w-4xl { max-width: 56rem; }

/* Flexbox */
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-col { flex-direction: column; }
.items-start { align-items: flex-start; }

/* Positioning */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.top-2 { top: 0.5rem; }
.top-16 { top: 4rem; }
.right-2 { right: 0.5rem; }
.left-3 { left: 0.75rem; }
.z-50 { z-index: 50; }

/* Display */
.inline-flex { display: inline-flex; }
.hidden { display: none; }
.space-y-0\.5 > * + * { margin-top: 0.125rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.divide-y > * + * { border-top: 1px solid var(--border); }

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

/* Effects */
.backdrop-blur { backdrop-filter: blur(8px); }
.antialiased {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Transitions */
.transition-colors {
  transition-property: color, background-color, border-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

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

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

/* Hover States */
.hover\:bg-accent:hover {
  background-color: var(--accent);
}

.hover\:bg-muted\/30:hover {
  background-color: var(--muted);
  opacity: 0.3;
}

.hover\:text-foreground:hover {
  color: var(--foreground);
}

.hover\:underline:hover {
  text-decoration: underline;
}

.hover\:border-foreground\/20:hover {
  border-color: var(--foreground);
  opacity: 0.2;
}

.group:hover .group-hover\:opacity-100 {
  opacity: 1;
}

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-75 { opacity: 0.75; }

/* Components */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--card-foreground);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}

.badge-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.badge-outline {
  border: 1px solid var(--border);
  background-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: calc(var(--radius) - 2px);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-ghost {
  background-color: transparent;
  color: var(--foreground);
}

.btn-ghost:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

/* Code Blocks */
.code-block {
  position: relative;
  background-color: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 1rem 0;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  padding: 0;
  background: transparent;
  overflow: visible;
}

.code-block code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--foreground);
  background: transparent;
  padding: 0;
  display: block;
  white-space: pre;
}

/* Hide language label - it's just visual clutter */
.code-lang {
  display: none;
}

.copy-btn {
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
  padding: 0;
  width: 1.75rem;
  height: 1.75rem;
  background-color: transparent;
  border: none;
  cursor: pointer;
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.code-block:hover .copy-btn {
  opacity: 1;
}

.copy-btn:hover {
  background-color: var(--accent);
}

.copy-btn svg {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--foreground);
}

.copy-icon,
.check-icon {
  pointer-events: none;
}

/* Inline Code */
code:not(pre code) {
  padding: 0.2rem 0.4rem;
  background-color: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  font-size: 0.85em;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-weight: 500;
  color: var(--foreground);
}

/* Tables */
table {
  border-collapse: collapse;
}

table th,
table td {
  padding: 0.75rem 1rem;
}

table thead {
  background-color: var(--muted);
  opacity: 0.5;
}

table tbody tr {
  transition: background-color 150ms;
}

table tbody tr:hover {
  background-color: var(--muted);
  opacity: 0.3;
}

/* Animations */
@keyframes ping {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

.animate-ping {
  animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Navigation */
#sidebar {
  height: calc(100vh - 4rem);
  background-color: var(--muted);
  opacity: 0.5;
}

.nav-section-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  background-color: transparent;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  text-align: left;
  transition: all 150ms;
}

.nav-section-btn:hover {
  background-color: var(--accent);
}

.nav-section-btn svg {
  flex-shrink: 0;
  opacity: 0.9;
}

.nav-section-btn .chevron {
  margin-left: auto;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-section-btn.expanded .chevron {
  transform: rotate(90deg);
}

.nav-items {
  margin-left: 1.5rem;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border);
}

.nav-items a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--foreground);
  opacity: 0.75;
  text-decoration: none;
  border-radius: calc(var(--radius) - 2px);
  transition: all 150ms;
}

.nav-items a:hover {
  color: var(--foreground);
  opacity: 1;
  background-color: var(--accent);
  transform: translateX(2px);
}

/* Active nav item styling */
.nav-items a.active {
  color: var(--primary);
  opacity: 1;
  background-color: var(--accent);
  font-weight: 600;
  border-left: 3px solid var(--primary);
  padding-left: calc(0.75rem - 3px);
}

/* Responsive */
@media (max-width: 768px) {
  #sidebar {
    display: none;
  }
  
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }
}

/* Print Styles */
@media print {
  .copy-btn,
  header,
  nav,
  footer {
    display: none;
  }
}

/* Benchmark Section Styles */
select,
input[type="file"] {
  font-family: inherit;
  font-size: inherit;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  opacity: 0.9;
}

#drop-zone {
  transition: all 0.2s;
}

#drop-zone:hover {
  background-color: var(--muted);
}

#drop-zone.drag-over {
  border-color: var(--primary);
  background-color: var(--muted);
}

.result-item {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.15s;
}

.result-item:hover {
  background-color: var(--muted);
}

.result-item-success {
  border-left: 3px solid rgb(22, 163, 74);
}

.result-item-error {
  border-left: 3px solid rgb(239, 68, 68);
}

.badge-success {
  background-color: rgb(22, 163, 74);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
}

.badge-error {
  background-color: rgb(239, 68, 68);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
}

/* Animation for progress bar */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.progress-shimmer {
  animation: shimmer 2s infinite;
  background: linear-gradient(
    to right,
    rgb(22, 163, 74) 0%,
    rgb(34, 197, 94) 50%,
    rgb(22, 163, 74) 100%
  );
  background-size: 1000px 100%;
}

