/* shadcn/ui Default Dark Mode CSS Variables (from official docs) */
:root {
  --background: oklch(0.145 0 0);
  --foreground: oklch(0.985 0 0);
  --card: oklch(0.205 0 0);
  --card-foreground: oklch(0.985 0 0);
  --popover: oklch(0.269 0 0);
  --popover-foreground: oklch(0.985 0 0);
  --primary: oklch(0.922 0 0);
  --primary-foreground: oklch(0.205 0 0);
  --secondary: oklch(0.269 0 0);
  --secondary-foreground: oklch(0.985 0 0);
  --muted: oklch(0.269 0 0);
  --muted-foreground: oklch(0.708 0 0);
  --accent: oklch(0.371 0 0);
  --accent-foreground: oklch(0.985 0 0);
  --destructive: oklch(0.704 0.191 22.216);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(0.556 0 0);
  --chart-1: oklch(0.488 0.243 264.376);
  --chart-2: oklch(0.696 0.17 162.48);
  --chart-3: oklch(0.769 0.188 70.08);
  --chart-4: oklch(0.627 0.265 303.9);
  --chart-5: oklch(0.645 0.246 16.439);
  --radius: 0.5rem;
  color-scheme: dark;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: oklch(var(--background));
  color: oklch(var(--foreground));
  line-height: 1.6;
}

/* Layout Utilities (shadcn-inspired, expanded for responsiveness) */
.container { max-width: 1280px; margin: 0 auto; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.lg\:flex-row { @media (min-width: 1024px) { flex-direction: row; } }
.gap-8 { gap: 2rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.p-6 { padding: 1.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; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.pt-5 { padding-top: 1.25rem; }
.pb-6 { padding-bottom: 1.5rem; }
.w-full { width: 100%; }
.max-w-2xl { max-width: 42rem; }
.text-center { text-align: center; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.tracking-tight { letter-spacing: -0.025em; }
.rounded-lg { border-radius: var(--radius); }
.rounded-md { border-radius: calc(var(--radius) - 0.125rem); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.border { border-width: 1px; border-style: solid; }
.border-2 { border-width: 2px; }
.border-dashed { border-style: dashed; }
.border-t-transparent { border-top-color: transparent; }
.cursor-pointer { cursor: pointer; }
.resize-none { resize: none; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, transform, opacity; transition-duration: 0.15s; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; }
.lg\:w-3\/4 { @media (min-width: 1024px) { width: 75%; } }
.lg\:w-1\/4 { @media (min-width: 1024px) { width: 25%; } }
.h-fit { height: fit-content; }
.sticky { position: sticky; }
.top-6 { top: 1.5rem; }
.z-50 { z-index: 50; }
.fixed { position: fixed; }
.top-4 { top: 1rem; }
.right-4 { right: 1rem; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gap-2 { gap: 0.5rem; }
.items-start { align-items: flex-start; }
.min-h-screen { min-height: 100vh; }

/* Utility Classes (shadcn-like) */
.bg-background { background-color: oklch(var(--background)); }
.bg-card { background-color: oklch(var(--card)); }
.bg-primary { background-color: oklch(var(--primary)); }
.bg-muted { background-color: oklch(var(--muted)); }
.bg-accent { background-color: oklch(var(--accent)); }

.text-foreground { color: oklch(var(--foreground)); }
.text-primary-foreground { color: oklch(var(--primary-foreground)); }
.text-muted-foreground { color: oklch(var(--muted-foreground)); }
.text-accent-foreground { color: oklch(var(--accent-foreground)); }

.border { border-color: oklch(var(--border)); }
.border-input { border-color: oklch(var(--input)); }

.focus-visible\:ring-ring:focus-visible {
  box-shadow: 0 0 0 2px oklch(var(--ring));
}

.focus-visible\:ring-offset-2:focus-visible {
  box-shadow: 0 0 0 2px oklch(var(--background)), 0 0 0 4px oklch(var(--ring));
}

/* Drag & Drop Zone */
.drop-zone {
  border: 2px dashed oklch(var(--border));
  border-radius: var(--radius);
  background-color: oklch(var(--muted) / 0.2);
  transition: all 0.2s ease;
  height: 8rem;
  position: relative;
}

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

/* Animations */
@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-spin { animation: spin 1s linear infinite; }

.transform { transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); }
.translate-x-full { --tw-translate-x: 100%; }
.duration-300 { transition-duration: 0.3s; }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.8, 1); }

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: oklch(var(--muted));
}
::-webkit-scrollbar-thumb {
  background: oklch(var(--input));
  border-radius: 3px;
}

/* Idea List Item */
.idea-item {
  background-color: oklch(var(--card));
  border: 1px solid oklch(var(--border));
  border-radius: var(--radius);
  padding: 1rem;
  font-size: 0.875rem;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.idea-item:hover {
  border-color: oklch(var(--primary));
  transform: translateY(-1px);
}

.idea-item .idea-meta {
  font-size: 0.75rem;
  color: oklch(var(--muted-foreground));
  margin-top: 0.5rem;
}

.idea-item .delete-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: oklch(var(--muted-foreground));
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.idea-item .delete-btn:hover {
  opacity: 1;
  color: oklch(var(--destructive));
}

.file-list {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: oklch(var(--muted-foreground));
}

.file-list span {
  display: inline-block;
  background: oklch(var(--muted));
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}

/* Prose for Article */
.prose {
  color: oklch(var(--foreground));
  max-width: none;
}

.prose p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.prose h3 {
  color: oklch(var(--foreground));
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.5rem 0 1rem;
}

/* Infocards */
.infocard {
  background: oklch(var(--card));
  border: 1px solid oklch(var(--border));
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.infocard h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: oklch(var(--primary));
}

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: oklch(var(--card));
  border-radius: var(--radius);
  overflow: hidden;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid oklch(var(--border));
}

th {
  background: oklch(var(--muted));
  font-weight: 600;
}

/* Simple Bar Chart (CSS-based) */
.chart-container {
  margin: 1rem 0;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.5rem;
  background: oklch(var(--card));
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid oklch(var(--border));
}

.bar {
  height: 20px;
  background: linear-gradient(to right, oklch(var(--primary)), oklch(var(--chart-1)));
  border-radius: 0.25rem;
  transition: width 0.3s ease;
  position: relative;
}

.bar-label {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: oklch(var(--muted-foreground));
  font-weight: 500;
}

/* File Gallery */
.file-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.file-gallery img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 0.25rem;
  border: 1px solid oklch(var(--border));
}

.file-gallery .file-placeholder {
  height: 80px;
  background: oklch(var(--muted));
  border: 1px solid oklch(var(--border));
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: oklch(var(--muted-foreground));
}