@import "tailwindcss"; @import "tw-animate-css"; @custom-variant dark (&:is(.dark *)); @theme inline { --color-background: var(--background); --color-foreground: var(--foreground); --font-sans: var(--font-geist-sans); --font-mono: var(--font-geist-mono); --color-sidebar-ring: var(--sidebar-ring); --color-sidebar-border: var(--sidebar-border); --color-sidebar-accent-foreground: var(--sidebar-accent-foreground); --color-sidebar-accent: var(--sidebar-accent); --color-sidebar-primary-foreground: var(--sidebar-primary-foreground); --color-sidebar-primary: var(--sidebar-primary); --color-sidebar-foreground: var(--sidebar-foreground); --color-sidebar: var(--sidebar); --color-chart-5: var(--chart-5); --color-chart-4: var(--chart-4); --color-chart-3: var(--chart-3); --color-chart-2: var(--chart-2); --color-chart-1: var(--chart-1); --color-ring: var(--ring); --color-input: var(--input); --color-border: var(--border); --color-destructive: var(--destructive); --color-accent-foreground: var(--accent-foreground); --color-accent: var(--accent); --color-muted-foreground: var(--muted-foreground); --color-muted: var(--muted); --color-secondary-foreground: var(--secondary-foreground); --color-secondary: var(--secondary); --color-primary-foreground: var(--primary-foreground); --color-primary: var(--primary); --color-popover-foreground: var(--popover-foreground); --color-popover: var(--popover); --color-card-foreground: var(--card-foreground); --color-card: var(--card); --radius-sm: calc(var(--radius) - 4px); --radius-md: calc(var(--radius) - 2px); --radius-lg: var(--radius); --radius-xl: calc(var(--radius) + 4px); --radius-2xl: calc(var(--radius) + 8px); --radius-3xl: calc(var(--radius) + 12px); --radius-4xl: calc(var(--radius) + 16px); } :root { --radius: 0.625rem; --background: oklch(1 0 0); --foreground: oklch(0.145 0 0); --card: oklch(1 0 0); --card-foreground: oklch(0.145 0 0); --popover: oklch(1 0 0); --popover-foreground: oklch(0.145 0 0); --primary: oklch(0.205 0 0); --primary-foreground: oklch(0.985 0 0); --secondary: oklch(0.97 0 0); --secondary-foreground: oklch(0.205 0 0); --muted: oklch(0.97 0 0); --muted-foreground: oklch(0.556 0 0); --accent: oklch(0.97 0 0); --accent-foreground: oklch(0.205 0 0); --destructive: oklch(0.577 0.245 27.325); --border: oklch(0.922 0 0); --input: oklch(0.922 0 0); --ring: oklch(0.708 0 0); --chart-1: oklch(0.646 0.222 41.116); --chart-2: oklch(0.6 0.118 184.704); --chart-3: oklch(0.398 0.07 227.392); --chart-4: oklch(0.828 0.189 84.429); --chart-5: oklch(0.769 0.188 70.08); --sidebar: oklch(0.985 0 0); --sidebar-foreground: oklch(0.145 0 0); --sidebar-primary: oklch(0.205 0 0); --sidebar-primary-foreground: oklch(0.985 0 0); --sidebar-accent: oklch(0.97 0 0); --sidebar-accent-foreground: oklch(0.205 0 0); --sidebar-border: oklch(0.922 0 0); --sidebar-ring: oklch(0.708 0 0); } .dark { --background: oklch(0.13 0 0); --foreground: oklch(0.93 0 0); --card: oklch(0.17 0 0); --card-foreground: oklch(0.93 0 0); --popover: oklch(0.17 0 0); --popover-foreground: oklch(0.93 0 0); --primary: oklch(0.85 0 0); --primary-foreground: oklch(0.13 0 0); --secondary: oklch(0.22 0 0); --secondary-foreground: oklch(0.93 0 0); --muted: oklch(0.22 0 0); --muted-foreground: oklch(0.6 0 0); --accent: oklch(0.25 0 0); --accent-foreground: oklch(0.93 0 0); --destructive: oklch(0.5 0 0); --border: oklch(0.25 0 0); --input: oklch(0.22 0 0); --ring: oklch(0.5 0 0); --chart-1: oklch(0.7 0 0); --chart-2: oklch(0.6 0 0); --chart-3: oklch(0.5 0 0); --chart-4: oklch(0.4 0 0); --chart-5: oklch(0.3 0 0); --sidebar: oklch(0.17 0 0); --sidebar-foreground: oklch(0.93 0 0); --sidebar-primary: oklch(0.7 0 0); --sidebar-primary-foreground: oklch(0.93 0 0); --sidebar-accent: oklch(0.22 0 0); --sidebar-accent-foreground: oklch(0.93 0 0); --sidebar-border: oklch(0.25 0 0); --sidebar-ring: oklch(0.5 0 0); } @layer base { * { @apply border-border outline-ring/50; } body { @apply bg-background text-foreground; -webkit-tap-highlight-color: transparent; } /* Improve touch targets on mobile */ button, a { touch-action: manipulation; } /* Prevent text size adjustment on orientation change */ html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } } /* Page entrance animations */ @keyframes slideInFromTop { 0% { opacity: 0; transform: translateY(-30px); } 100% { opacity: 1; transform: translateY(0); } } @keyframes slideInFromBottom { 0% { opacity: 0; transform: translateY(30px); } 100% { opacity: 1; transform: translateY(0); } } @keyframes fadeInScale { 0% { opacity: 0; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1); } } /* Article content styling */ .article-content { font-size: 1.125rem; line-height: 1.9; color: var(--foreground); letter-spacing: -0.01em; } .article-content > * { margin-bottom: 1.5rem; } .article-content > *:last-child { margin-bottom: 0; } /* Typography */ .article-content h1 { font-size: 2rem; font-weight: 700; color: var(--foreground); margin-top: 3rem; margin-bottom: 1.5rem; line-height: 1.3; } .article-content h2 { font-size: 1.625rem; font-weight: 700; color: var(--foreground); margin-top: 3rem; margin-bottom: 1.25rem; padding-bottom: 0.625rem; border-bottom: 2px solid var(--border); line-height: 1.3; } .article-content h3 { font-size: 1.375rem; font-weight: 600; color: var(--foreground); margin-top: 2.5rem; margin-bottom: 1rem; line-height: 1.4; } .article-content h4, .article-content h5, .article-content h6 { font-size: 1.125rem; font-weight: 600; color: var(--foreground); margin-top: 2rem; margin-bottom: 0.75rem; line-height: 1.4; } .article-content p { margin-bottom: 1.5rem; text-align: left; } .article-content p + p { margin-top: 0; } .article-content a { color: oklch(0.55 0.2 250); text-decoration: underline; text-underline-offset: 2px; transition: color 0.15s; } .dark .article-content a { color: oklch(0.7 0.2 250); } .article-content a:hover { color: oklch(0.65 0.2 250); } .dark .article-content a:hover { color: oklch(0.8 0.2 250); } .article-content strong, .article-content b { color: var(--foreground); font-weight: 700; } .article-content em, .article-content i { font-style: italic; } /* Lists */ .article-content ul, .article-content ol { margin: 1.5rem 0 2rem 0; padding-left: 2rem; } .article-content ul { list-style-type: disc; } .article-content ol { list-style-type: decimal; } .article-content li { margin: 0.75rem 0; padding-left: 0.5rem; line-height: 1.8; } .article-content li > ul, .article-content li > ol { margin: 0.75rem 0 0.75rem 0; } .article-content li > p { margin-bottom: 0.75rem; } /* Blockquotes */ .article-content blockquote { border-left: 4px solid oklch(0.55 0.2 250); background: var(--muted); padding: 1.25rem 1.5rem; margin: 2rem 0; border-radius: 0 0.75rem 0.75rem 0; font-style: italic; color: var(--foreground); } .article-content blockquote p { margin-bottom: 0.75rem; } .article-content blockquote p:last-child { margin-bottom: 0; } /* Horizontal rule */ .article-content hr { border: none; border-top: 2px solid var(--border); margin: 3rem 0; } /* Tables */ .article-content table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: 1rem; } .article-content th, .article-content td { padding: 1rem 1.25rem; border: 1px solid var(--border); text-align: left; line-height: 1.6; } .article-content th { background: var(--muted); font-weight: 700; color: var(--foreground); } .article-content tr:nth-child(even) td { background: var(--muted); opacity: 0.5; } .article-content tr:hover td { background: var(--accent); } /* Code */ .article-content code { background: var(--muted); padding: 0.2rem 0.5rem; border-radius: 0.375rem; font-size: 0.9em; font-family: var(--font-mono); color: var(--foreground); } .article-content pre { background: var(--muted); padding: 1.25rem 1.5rem; border-radius: 0.75rem; overflow-x: auto; margin: 2rem 0; line-height: 1.6; } .article-content pre code { background: none; padding: 0; font-size: 0.875rem; } /* Images */ .article-content img { max-width: 100%; height: auto; border-radius: 0.75rem; margin: 2rem auto; display: block; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); background-color: white; } .dark .article-content img { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); } /* Hide Wikipedia-specific elements */ .article-content .mw-editsection, .article-content .reference, .article-content .noprint, .article-content .navbox, .article-content .vertical-navbox, .article-content .sidebar, .article-content .infobox, .article-content .metadata, .article-content .mbox-small, .article-content .toc, .article-content .catlinks, .article-content .mw-authority-control, .article-content .sistersitebox, .article-content .portal, .article-content .hatnote, .article-content .dablink, .article-content sup.reference, .article-content .reflist, .article-content .references, .article-content .gallery, .article-content .thumb, .article-content figure, .article-content .mw-empty-elt, .article-content style, .article-content link { display: none !important; } /* Definition lists */ .article-content dl { margin: 2rem 0; } .article-content dt { font-weight: 700; color: var(--foreground); margin-top: 1.25rem; margin-bottom: 0.5rem; } .article-content dd { margin-left: 2rem; margin-bottom: 1rem; line-height: 1.8; } /* First paragraph after heading - no top margin */ .article-content h2 + p, .article-content h3 + p, .article-content h4 + p { margin-top: 0; } /* Smooth text rendering */ .article-content { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* ============================================ ENHANCED ARTICLE EDITOR STYLES ============================================ */ /* Editor Container */ .article-editor-container { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem; overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); } .article-editor-container.editor-fullscreen { position: fixed; inset: 0; z-index: 100; border-radius: 0; border: none; } /* Recovery Banner */ .recovery-banner { display: flex; align-items: center; justify-content: space-between; padding: 0.625rem 1rem; background: oklch(0.95 0.08 250); border-bottom: 1px solid oklch(0.8 0.12 250); gap: 1rem; } .dark .recovery-banner { background: oklch(0.25 0.08 250); border-color: oklch(0.4 0.1 250); } .recovery-banner-content { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: oklch(0.4 0.15 250); } .dark .recovery-banner-content { color: oklch(0.85 0.1 250); } .recovery-banner-actions { display: flex; align-items: center; gap: 0.5rem; } /* Editor Header */ .editor-header { display: flex; align-items: center; justify-content: space-between; padding: 0.625rem 1rem; background: var(--muted); border-bottom: 1px solid var(--border); gap: 1rem; } .editor-header-left { display: flex; align-items: center; gap: 0.75rem; } .editor-header-center { flex: 1; display: flex; justify-content: center; } .editor-header-right { display: flex; align-items: center; gap: 0.5rem; } .editor-status { font-size: 0.75rem; padding: 0.25rem 0.625rem; border-radius: 9999px; } .status-unsaved { background: oklch(0.95 0.08 60); color: oklch(0.45 0.15 60); } .dark .status-unsaved { background: oklch(0.3 0.08 60); color: oklch(0.8 0.12 60); } .status-saved { background: oklch(0.95 0.05 145); color: oklch(0.45 0.1 145); } .dark .status-saved { background: oklch(0.3 0.05 145); color: oklch(0.8 0.1 145); } .editor-stats { font-size: 0.75rem; color: var(--muted-foreground); } /* Find & Replace Bar */ .find-replace-bar { display: flex; align-items: center; gap: 1rem; padding: 0.5rem 1rem; background: var(--muted); border-bottom: 1px solid var(--border); } .find-replace-inputs { display: flex; align-items: center; gap: 0.5rem; flex: 1; } .find-input-group { display: flex; align-items: center; flex: 1; max-width: 300px; background: var(--background); border: 1px solid var(--border); border-radius: 0.375rem; overflow: hidden; } .find-input, .replace-input { flex: 1; padding: 0.375rem 0.625rem; font-size: 0.8125rem; border: none; background: transparent; color: var(--foreground); outline: none; } .replace-input { max-width: 200px; background: var(--background); border: 1px solid var(--border); border-radius: 0.375rem; } .match-count { font-size: 0.6875rem; color: var(--muted-foreground); padding: 0 0.5rem; white-space: nowrap; } .find-replace-actions { display: flex; align-items: center; gap: 0.25rem; } /* Enhanced Toolbar */ .editor-toolbar-enhanced { display: flex; align-items: center; gap: 0.25rem; padding: 0.5rem 1rem; background: var(--background); border-bottom: 1px solid var(--border); flex-wrap: wrap; } .toolbar-group { display: flex; align-items: center; gap: 0.125rem; } .toolbar-divider { width: 1px; height: 1.5rem; background: var(--border); margin: 0 0.375rem; } .toolbar-btn { width: 2rem; height: 2rem; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 0.375rem; transition: all 0.15s; } .toolbar-btn:hover:not(:disabled) { background: var(--accent); } .toolbar-btn:active:not(:disabled) { transform: scale(0.95); } .heading-dropdown-container { position: relative; } .heading-btn { width: auto; padding: 0 0.5rem; } .heading-dropdown { position: absolute; top: 100%; left: 0; margin-top: 0.25rem; background: var(--popover); border: 1px solid var(--border); border-radius: 0.5rem; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); z-index: 50; min-width: 150px; overflow: hidden; } .heading-option { display: flex; align-items: center; gap: 0.625rem; width: 100%; padding: 0.625rem 0.875rem; border: none; background: transparent; cursor: pointer; color: var(--foreground); font-size: 0.875rem; text-align: left; transition: background 0.15s; } .heading-option:hover { background: var(--accent); } .insert-dropdown { min-width: 180px; } .dropdown-divider { height: 1px; background: var(--border); margin: 0.375rem 0; } /* Main Editor Area */ .editor-main { display: flex; flex: 1; min-height: 400px; overflow: hidden; } .editor-fullscreen .editor-main { min-height: 0; flex: 1; } .editor-pane { flex: 1; display: flex; flex-direction: column; min-width: 0; } .editor-main.with-preview .editor-pane { flex: 1; border-right: 1px solid var(--border); } .editor-textarea-enhanced { width: 100%; height: 100%; min-height: 400px; padding: 1.25rem; font-family: var(--font-sans); font-size: 1rem; line-height: 1.8; background: var(--background); border: none; color: var(--foreground); resize: none; outline: none; } .editor-fullscreen .editor-textarea-enhanced { min-height: 0; } .editor-textarea-enhanced:disabled { opacity: 0.6; cursor: not-allowed; } .editor-textarea-enhanced::placeholder { color: var(--muted-foreground); } /* Preview Pane */ .preview-pane { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--background); } .preview-header { display: flex; align-items: center; gap: 0.5rem; padding: 0.625rem 1rem; background: var(--muted); border-bottom: 1px solid var(--border); font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.05em; } .preview-content { flex: 1; padding: 1.25rem; overflow-y: auto; } .editor-preview-content { font-size: 1rem; line-height: 1.8; } .editor-preview-content p, .editor-preview-content li { font-size: 1rem; line-height: 1.8; } .editor-preview-content h1 { font-size: 1.75rem; margin-top: 1.5rem; margin-bottom: 1rem; } .editor-preview-content h2 { font-size: 1.5rem; margin-top: 1.5rem; margin-bottom: 0.875rem; } .editor-preview-content h3 { font-size: 1.25rem; margin-top: 1.25rem; margin-bottom: 0.75rem; } .editor-preview-empty { color: var(--muted-foreground); font-style: italic; } /* Diff Preview */ .diff-preview-container { flex: 1; display: flex; flex-direction: column; overflow: hidden; } .diff-preview-header { display: flex; align-items: center; justify-content: space-between; padding: 0.625rem 1rem; background: var(--muted); border-bottom: 1px solid var(--border); } .diff-preview-title { font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.05em; } .diff-preview-stats { display: flex; gap: 0.625rem; font-size: 0.75rem; font-weight: 600; } .diff-stat-added { color: oklch(0.5 0.18 145); } .dark .diff-stat-added { color: oklch(0.7 0.18 145); } .diff-stat-removed { color: oklch(0.55 0.2 25); } .dark .diff-stat-removed { color: oklch(0.7 0.18 25); } .diff-preview-content { flex: 1; overflow-y: auto; font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.5; } .diff-preview-line { display: flex; min-height: 1.5rem; } .diff-preview-gutter { width: 1.5rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; user-select: none; } .diff-sign { font-weight: 700; } .diff-preview-added .diff-sign { color: oklch(0.5 0.18 145); } .dark .diff-preview-added .diff-sign { color: oklch(0.7 0.18 145); } .diff-preview-removed .diff-sign { color: oklch(0.55 0.2 25); } .dark .diff-preview-removed .diff-sign { color: oklch(0.7 0.18 25); } .diff-preview-line-num { width: 2.5rem; padding: 0 0.375rem; text-align: right; color: var(--muted-foreground); background: var(--muted); flex-shrink: 0; user-select: none; font-size: 0.6875rem; } .diff-preview-code { flex: 1; padding: 0 0.625rem; white-space: pre-wrap; word-break: break-all; } .diff-preview-unchanged { background: var(--background); } .diff-preview-added { background: oklch(0.96 0.04 145); } .dark .diff-preview-added { background: oklch(0.22 0.05 145); } .diff-preview-removed { background: oklch(0.96 0.04 25); } .dark .diff-preview-removed { background: oklch(0.22 0.05 25); } /* Keyboard Shortcuts Hint */ .editor-shortcuts-hint { display: flex; align-items: center; justify-content: center; gap: 1.5rem; padding: 0.5rem 1rem; background: var(--muted); border-top: 1px solid var(--border); font-size: 0.6875rem; color: var(--muted-foreground); } .editor-shortcuts-hint span { display: flex; align-items: center; gap: 0.25rem; } /* Scrollbar styling for editor */ .editor-textarea-enhanced::-webkit-scrollbar, .preview-content::-webkit-scrollbar, .diff-preview-content::-webkit-scrollbar { width: 8px; } .editor-textarea-enhanced::-webkit-scrollbar-track, .preview-content::-webkit-scrollbar-track, .diff-preview-content::-webkit-scrollbar-track { background: transparent; } .editor-textarea-enhanced::-webkit-scrollbar-thumb, .preview-content::-webkit-scrollbar-thumb, .diff-preview-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; } .editor-textarea-enhanced::-webkit-scrollbar-thumb:hover, .preview-content::-webkit-scrollbar-thumb:hover, .diff-preview-content::-webkit-scrollbar-thumb:hover { background: var(--muted-foreground); } /* Editor focus state */ .editor-pane:focus-within { box-shadow: inset 0 0 0 2px oklch(0.55 0.2 250 / 0.15); } /* Smooth transitions */ .toolbar-btn, .editor-status, .find-replace-bar, .recovery-banner { transition: all 0.15s ease; } /* Active toolbar button state */ .toolbar-btn:active:not(:disabled) { background: var(--accent); } /* Better focus states */ .find-input:focus, .replace-input:focus { box-shadow: 0 0 0 2px oklch(0.55 0.2 250 / 0.2); } /* Responsive design for mobile */ @media (max-width: 768px) { .editor-header { flex-wrap: wrap; padding: 0.5rem; } .editor-header-center { order: 3; width: 100%; justify-content: center; padding-top: 0.5rem; border-top: 1px solid var(--border); margin-top: 0.5rem; } .editor-main { flex-direction: column; } .editor-main.with-preview .editor-pane { border-right: none; border-bottom: 1px solid var(--border); } .preview-pane { max-height: 300px; } .editor-toolbar-enhanced { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; } .toolbar-divider { display: none; } .editor-shortcuts-hint { display: none; } .find-replace-bar { flex-direction: column; gap: 0.5rem; } .find-replace-inputs { flex-direction: column; width: 100%; } .find-input-group, .replace-input { max-width: none; width: 100%; } } /* Animation for status changes */ @keyframes pulse-subtle { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } } .status-unsaved { animation: pulse-subtle 2s ease-in-out infinite; } /* Legacy editor styles for compatibility */ .article-editor { display: flex; flex-direction: column; gap: 1rem; } .editor-toolbar { display: flex; justify-content: space-between; gap: 0.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); } .editor-textarea { width: 100%; min-height: 500px; padding: 1rem; font-family: var(--font-mono); font-size: 0.875rem; line-height: 1.6; background: var(--card); border: 1px solid var(--border); border-radius: 0.5rem; color: var(--foreground); resize: vertical; } .editor-textarea:focus { outline: none; border-color: oklch(0.55 0.2 250); box-shadow: 0 0 0 2px oklch(0.55 0.2 250 / 0.2); } .editor-textarea:disabled { opacity: 0.6; cursor: not-allowed; } /* Review Stream */ .review-stream { background: var(--muted); border-radius: 0.5rem; padding: 1rem; margin-top: 1rem; } .review-stream h4 { font-weight: 600; margin-bottom: 0.5rem; color: var(--foreground); } .review-stream-text { font-size: 0.875rem; color: var(--muted-foreground); white-space: pre-wrap; word-break: break-word; } /* Review Result Panel */ .review-panel { display: flex; gap: 1rem; padding: 1.25rem; border-radius: 0.75rem; margin-top: 1rem; align-items: flex-start; } .review-approved { background: oklch(0.95 0.05 145); border: 1px solid oklch(0.7 0.15 145); } .dark .review-approved { background: oklch(0.25 0.05 145); border-color: oklch(0.45 0.1 145); } .review-rejected { background: oklch(0.95 0.05 25); border: 1px solid oklch(0.7 0.15 25); } .dark .review-rejected { background: oklch(0.25 0.05 25); border-color: oklch(0.45 0.1 25); } .review-icon { flex-shrink: 0; width: 2.5rem; height: 2.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; } .review-approved .review-icon { background: oklch(0.6 0.2 145); color: white; } .review-rejected .review-icon { background: oklch(0.6 0.2 25); color: white; } .review-content { flex: 1; } .review-title { font-weight: 600; font-size: 1rem; margin-bottom: 0.25rem; } .review-approved .review-title { color: oklch(0.4 0.15 145); } .dark .review-approved .review-title { color: oklch(0.75 0.15 145); } .review-rejected .review-title { color: oklch(0.45 0.2 25); } .dark .review-rejected .review-title { color: oklch(0.75 0.15 25); } .review-reason { font-size: 0.875rem; color: var(--foreground); opacity: 0.9; } .review-actions { display: flex; gap: 0.5rem; flex-shrink: 0; } /* History Modal */ .history-modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 1rem; } .history-modal { background: var(--card); border-radius: 0.75rem; width: 100%; max-width: 1200px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); } .history-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); } .history-modal-header h2 { font-size: 1.25rem; font-weight: 600; } .history-modal-body { flex: 1; overflow: hidden; display: flex; min-height: 400px; } .history-loading, .history-empty { display: flex; align-items: center; justify-content: center; width: 100%; color: var(--muted-foreground); padding: 2rem; } .history-list { width: 280px; border-right: 1px solid var(--border); overflow-y: auto; flex-shrink: 0; } .history-item { display: block; width: 100%; padding: 1rem; text-align: left; border: none; background: transparent; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; } .history-item:hover { background: var(--accent); } .history-item.selected { background: var(--accent); } .history-item-date { font-size: 0.75rem; color: var(--muted-foreground); margin-bottom: 0.25rem; } .history-item-reason { font-size: 0.875rem; color: var(--foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .history-diff { flex: 1; overflow: auto; padding: 1rem; } /* Diff Viewer */ .diff-viewer { font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.5; border: 1px solid var(--border); border-radius: 0.5rem; overflow: hidden; } .diff-header { display: flex; background: var(--muted); border-bottom: 1px solid var(--border); } .diff-column-header { flex: 1; padding: 0.5rem 1rem; font-weight: 600; color: var(--foreground); } .diff-column-header:first-child { border-right: 1px solid var(--border); } .diff-content { display: flex; overflow: auto; } .diff-column { flex: 1; min-width: 0; } .diff-old { border-right: 1px solid var(--border); } .diff-line { display: flex; min-height: 1.5rem; } .diff-line-num { width: 3rem; padding: 0 0.5rem; text-align: right; color: var(--muted-foreground); background: var(--muted); flex-shrink: 0; user-select: none; } .diff-line-content { flex: 1; padding: 0 0.5rem; white-space: pre-wrap; word-break: break-all; } .diff-added { background: oklch(0.95 0.05 145); } .dark .diff-added { background: oklch(0.25 0.06 145); } .diff-added .diff-line-num { background: oklch(0.9 0.08 145); } .dark .diff-added .diff-line-num { background: oklch(0.3 0.08 145); } .diff-removed { background: oklch(0.95 0.05 25); } .dark .diff-removed { background: oklch(0.25 0.06 25); } .diff-removed .diff-line-num { background: oklch(0.9 0.08 25); } .dark .diff-removed .diff-line-num { background: oklch(0.3 0.08 25); }