/* Streamlined Layout System */

/* Two Column Layout */
.prompts-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
    height: calc(100vh - 400px);
    min-height: 600px;
}

/* Left Sidebar - Prompt List */
.prompts-sidebar {
    background: #1e293b;
    border-radius: 12px;
    border: 1px solid #334155;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.prompt-list-minimal {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #475569 #1e293b;
}

.prompt-list-minimal::-webkit-scrollbar {
    width: 6px;
}

.prompt-list-minimal::-webkit-scrollbar-track {
    background: #1e293b;
}

.prompt-list-minimal::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

/* Prompt Items - Simplified */
.prompt-item-minimal {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prompt-item-minimal:hover {
    background: rgba(59, 130, 246, 0.1);
}

.prompt-item-minimal.active {
    background: rgba(59, 130, 246, 0.15);
    border-left: 3px solid #3b82f6;
}

.prompt-item-minimal:last-child {
    border-bottom: none;
}

.prompt-info {
    flex: 1;
}

.prompt-name-minimal {
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.prompt-meta-minimal {
    color: #94a3b8;
    font-size: 0.8rem;
}

.prompt-actions-minimal {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.prompt-item-minimal:hover .prompt-actions-minimal {
    opacity: 1;
}

/* Right Panel - Versions */
.versions-panel {
    background: #1e293b;
    border-radius: 12px;
    border: 1px solid #334155;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.versions-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #64748b;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.versions-placeholder h3 {
    margin-bottom: 0.5rem;
    color: #94a3b8;
}

.versions-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.version-header {
    padding: 1.5rem;
    border-bottom: 1px solid #334155;
    background: rgba(59, 130, 246, 0.05);
}

.version-header h3 {
    margin: 0;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.version-list-clean {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #475569 #1e293b;
}

/* Simplified Search Bar */
.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.search-input-minimal {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #1e293b;
    color: #f1f5f9;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.search-input-minimal:focus {
    outline: none;
    border-color: #3b82f6;
}

.sort-select-minimal {
    padding: 0.75rem 1rem;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #1e293b;
    color: #f1f5f9;
    font-size: 0.9rem;
    min-width: 120px;
}

/* Simplified Buttons */
.btn-icon {
    background: transparent;
    border: 1px solid #334155;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    color: #94a3b8;
}

.btn-icon:hover {
    background: #334155;
    color: #f1f5f9;
}

.btn-icon-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 4px;
}

/* Version Items - Clean */
.version-item-clean {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #334155;
    transition: background 0.2s ease;
}

.version-item-clean:hover {
    background: rgba(59, 130, 246, 0.05);
}

.version-item-clean:last-child {
    border-bottom: none;
}

.version-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.version-tag-clean {
    background: #3b82f6;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.version-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.version-item-clean:hover .version-actions {
    opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .prompts-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
        height: auto;
    }

    .prompts-sidebar {
        max-height: 400px;
    }
}

/* Light Mode */
body.light-mode .prompts-sidebar,
body.light-mode .versions-panel {
    background: #ffffff;
    border-color: #e2e8f0;
}

body.light-mode .prompt-item-minimal {
    border-bottom-color: #e2e8f0;
}

body.light-mode .prompt-name-minimal {
    color: #1e293b;
}

body.light-mode .prompt-meta-minimal {
    color: #64748b;
}

body.light-mode .search-input-minimal,
body.light-mode .sort-select-minimal {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light-mode .btn-icon {
    border-color: #e2e8f0;
    color: #64748b;
}

body.light-mode .btn-icon:hover {
    background: #f1f5f9;
    color: #1e293b;
}

body.light-mode .version-header {
    background: rgba(59, 130, 246, 0.05);
    border-bottom-color: #e2e8f0;
}

body.light-mode .version-item-clean {
    border-bottom-color: #e2e8f0;
}

body.light-mode .versions-placeholder {
    color: #94a3b8;
}

body.light-mode .versions-placeholder h3 {
    color: #64748b;
}

/* Modal Styles */
.version-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease-out;
}

.version-modal-content {
    background: #1e293b;
    border-radius: 12px;
    padding: 2rem;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    border: 1px solid #334155;
    color: #f1f5f9;
    position: relative;
    animation: slideIn 0.3s ease-out;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.version-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.version-modal-close:hover {
    background: #dc2626;
}

.prompt-section {
    background: #0f172a;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    line-height: 1.5;
    margin-top: 0.75rem;
}

.prompt-section.system {
    border-left: 3px solid #3b82f6;
}

.prompt-section.user {
    border-left: 3px solid #10b981;
}

.prompt-section.metadata {
    border-left: 3px solid #6366f1;
    font-size: 0.875rem;
    overflow-x: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Light mode modal */
body.light-mode .version-modal-content {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light-mode .prompt-section {
    background: #f8fafc;
    color: #1e293b;
}

/* Advanced Controls */
.advanced-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
}

.advanced-controls .btn {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid #334155;
    background: #1e293b;
    color: #f1f5f9;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.advanced-controls .btn:hover {
    background: #334155;
    border-color: #475569;
    transform: translateY(-1px);
}

.advanced-controls .btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.advanced-controls .btn.active:hover {
    background: #2563eb;
    border-color: #2563eb;
}

/* Diff Section Styles */
#diff-section {
    background: #1e293b;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #334155;
    margin-top: 2rem;
}

#diff-section h2 {
    margin: 0 0 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.diff-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.diff-control-group {
    display: flex;
    flex-direction: column;
}

.diff-control-group label {
    display: block;
    margin-bottom: 0.25rem;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
}

.diff-control-group select {
    padding: 0.5rem;
    border: 1px solid #334155;
    border-radius: 6px;
    background: #0f172a;
    color: #f1f5f9;
    font-size: 0.875rem;
}

.diff-control-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Diff Results */
.diff-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.version-comparison-card {
    background: #0f172a;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid var(--version-color);
}

.version-comparison-card.version-a {
    --version-color: #ef4444;
}

.version-comparison-card.version-b {
    --version-color: #10b981;
}

.version-comparison-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.version-comparison-header h3 {
    margin: 0;
    color: var(--version-color);
}

.version-comparison-timestamp {
    font-size: 0.875rem;
    color: #94a3b8;
    font-weight: normal;
}

.prompt-content {
    margin-bottom: 1rem;
}

.prompt-content h4 {
    color: #f1f5f9;
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 600;
}

.prompt-content pre {
    margin: 0;
    color: #cbd5e1;
    white-space: pre-wrap;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Diff Highlighting */
.diff-section {
    background: #0f172a;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #f59e0b;
    margin-top: 1rem;
}

.diff-section h4 {
    color: #f59e0b;
    margin: 0 0 1rem 0;
    font-size: 1rem;
}

.diff-content {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.diff-added {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    padding: 0.1rem 0.25rem;
    border-radius: 3px;
}

.diff-removed {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    padding: 0.1rem 0.25rem;
    border-radius: 3px;
}

.diff-context {
    color: #94a3b8;
}

.diff-header {
    color: #3b82f6;
    font-weight: bold;
}

/* A/B Test Section */
#ab-test-section {
    background: #1e293b;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #334155;
    margin-top: 2rem;
}

#ab-test-section h2 {
    margin: 0 0 1.5rem 0;
    color: #3b82f6;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ab-test-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.ab-test-controls select {
    padding: 0.5rem;
    border: 1px solid #334155;
    border-radius: 6px;
    background: #0f172a;
    color: #f1f5f9;
    min-width: 150px;
}

.ab-test-controls button {
    padding: 0.5rem 1.5rem;
    background: #0ea5e9;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

.ab-test-controls button:hover {
    background: #0284c7;
}

.ab-test-vs {
    color: #94a3b8;
    font-weight: 500;
    align-self: center;
}

/* Alerts Section */
#alerts-section {
    background: #1e293b;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid #334155;
    margin-top: 2rem;
}

#alerts-section h2 {
    margin: 0 0 1.5rem 0;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-item {
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--alert-color);
}

.alert-item.critical {
    --alert-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.alert-item.warning {
    --alert-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.alert-item.info {
    --alert-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.alert-title {
    margin: 0;
    color: #f1f5f9;
    font-size: 1rem;
}

.alert-severity {
    background: var(--alert-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.alert-message {
    margin: 0.5rem 0 0 0;
    color: #cbd5e1;
    line-height: 1.5;
}

.alert-timestamp {
    color: #94a3b8;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .diff-results-grid {
        grid-template-columns: 1fr;
    }

    .advanced-controls {
        flex-direction: column;
    }

    .ab-test-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .ab-test-controls select,
    .ab-test-controls button {
        width: 100%;
    }
}

/* Light Mode Adaptations */
body.light-mode #diff-section,
body.light-mode #ab-test-section,
body.light-mode #alerts-section {
    background: #ffffff;
    border-color: #e2e8f0;
}

body.light-mode .advanced-controls {
    border-top-color: #e2e8f0;
}

body.light-mode .advanced-controls .btn {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b;
}

body.light-mode .advanced-controls .btn:hover {
    background: #f8fafc;
    border-color: #cbd5e0;
}

body.light-mode .version-comparison-card,
body.light-mode .diff-section {
    background: #f8fafc;
    color: #1e293b;
}

body.light-mode .diff-version-card {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

body.light-mode .diff-version-title {
    color: #1e293b;
}

body.light-mode .diff-version-title.baseline {
    color: #6b7280;
}

body.light-mode .diff-version-title.comparison {
    color: #2563eb;
}

body.light-mode .version-date {
    color: #64748b;
}

body.light-mode .prompt-content h4 {
    color: #1e293b;
}

body.light-mode .prompt-content pre {
    color: #374151;
}

body.light-mode .diff-version-content h4 {
    color: #1e293b;
}

body.light-mode .diff-version-content pre {
    color: #374151;
}

body.light-mode .diff-control-group select {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b;
}

/* Git-Style Diff Display */
.git-diff-container {
    font-family: 'JetBrains Mono', 'SF Mono', Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace !important;
    font-size: 0.8rem;
    line-height: 1.4;
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #334155;
}

.git-diff-line {
    display: flex;
    padding: 0.25rem 0.5rem;
    margin: 0;
    border: none;
    font-family: inherit;
}

.git-diff-line-number {
    color: #64748b;
    margin-right: 1rem;
    user-select: none;
    min-width: 3rem;
    text-align: right;
    font-family: inherit;
}

.git-diff-prefix {
    margin-right: 0.5rem;
    font-weight: bold;
    user-select: none;
    font-family: inherit;
}

.git-diff-content {
    white-space: pre-wrap;
    flex: 1;
    font-family: inherit;
}

.git-diff-added {
    background: rgba(16, 185, 129, 0.15);
    border-left: 2px solid #10b981;
}

.git-diff-added .git-diff-prefix,
.git-diff-added .git-diff-content {
    color: #10b981;
}

.git-diff-removed {
    background: rgba(239, 68, 68, 0.15);
    border-left: 2px solid #ef4444;
}

.git-diff-removed .git-diff-prefix,
.git-diff-removed .git-diff-content {
    color: #ef4444;
}

.git-diff-unchanged {
    background: rgba(0, 0, 0, 0.1);
}

.git-diff-unchanged:nth-child(even) {
    background: rgba(0, 0, 0, 0.2);
}

.git-diff-unchanged .git-diff-prefix,
.git-diff-unchanged .git-diff-content {
    color: #94a3b8;
}

/* Light mode adjustments for git diff */
body.light-mode .git-diff-container {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body.light-mode .git-diff-line-number {
    color: #475569;
}

body.light-mode .git-diff-unchanged {
    background: rgba(0, 0, 0, 0.03);
}

body.light-mode .git-diff-unchanged:nth-child(even) {
    background: rgba(0, 0, 0, 0.06);
}

body.light-mode .git-diff-unchanged .git-diff-prefix,
body.light-mode .git-diff-unchanged .git-diff-content {
    color: #64748b;
}

body.light-mode .git-diff-added {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: #10b981;
}

body.light-mode .git-diff-added .git-diff-prefix,
body.light-mode .git-diff-added .git-diff-content {
    color: #059669;
}

body.light-mode .git-diff-removed {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: #ef4444;
}

body.light-mode .git-diff-removed .git-diff-prefix,
body.light-mode .git-diff-removed .git-diff-content {
    color: #dc2626;
}

/* Light mode styles for diff changes sections */
body.light-mode .diff-content {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left-color: #f59e0b;
}

body.light-mode .system-changes-section h4,
body.light-mode .user-changes-section h4 {
    color: #d97706;
}

body.light-mode .diff-changes-container h3 {
    color: #2563eb;
}

body.light-mode .diff-summary {
    border-top-color: #e2e8f0;
    color: #64748b;
}

body.light-mode .added-words {
    color: #059669;
}

body.light-mode .removed-words {
    color: #dc2626;
}

/* Modal Improvements */
.version-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.version-modal-content {
    background: #1e293b;
    border-radius: 12px;
    padding: 2rem;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #334155;
    color: #f1f5f9;
    position: relative;
}

.version-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.2s ease;
    z-index: 10;
    min-width: auto;
    min-height: auto;
    line-height: 1;
}

.version-modal-close:hover {
    background: #dc2626;
}

.version-modal-close:focus {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* Better button styling for modal */
.btn-icon-small {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.85rem !important;
    min-width: 2rem !important;
    min-height: 2rem !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Light mode adjustments for modals */
body.light-mode .version-modal-content {
    background: #f8fafc;
    color: #1e293b;
    border-color: #e2e8f0;
}

/* Diff Comparison Styles */
.diff-comparison-container {
    display: grid;
    gap: 2rem;
    margin-top: 1rem;
}

.diff-versions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.diff-version-card {
    background: #0f172a;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid;
}

.diff-version-card.baseline {
    border-left-color: #6b7280;
}

.diff-version-card.comparison {
    border-left-color: #3b82f6;
}

.diff-version-title {
    color: #f1f5f9;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.diff-version-title.baseline {
    color: #6b7280;
}

.diff-version-title.comparison {
    color: #3b82f6;
}

.version-date {
    font-size: 0.875rem;
    color: #94a3b8;
    font-weight: normal;
}

.version-model-badge {
    background: #3b82f6;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.diff-version-content h4 {
    color: #f1f5f9;
    margin: 0 0 0.5rem 0;
}

.diff-version-content pre {
    margin: 0 0 1rem 0;
    color: #cbd5e1;
    white-space: pre-wrap;
    font-size: 0.875rem;
}

.diff-no-changes {
    text-align: center;
    color: #10b981;
    padding: 2rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    border-left: 3px solid #10b981;
}

.diff-no-changes h3 {
    margin: 0 0 0.5rem 0;
}

.diff-no-changes p {
    margin: 0;
    color: #cbd5e1;
}

.diff-changes-container {
    margin-top: 2rem;
}

.diff-changes-container h3 {
    color: #3b82f6;
    margin-bottom: 1rem;
}

.system-changes-section,
.user-changes-section {
    margin-bottom: 1.5rem;
}

.system-changes-section h4,
.user-changes-section h4 {
    color: #f59e0b;
    margin-bottom: 0.5rem;
}

.diff-content {
    background: #0f172a;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
}

.similarity-section h4 {
    color: #8b5cf6;
    margin-bottom: 0.5rem;
}

.similarity-stats {
    background: #0f172a;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #8b5cf6;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

body.light-mode .similarity-stats {
    background: #f1f5f9;
    border-left-color: #8b5cf6;
    border: 1px solid #e2e8f0;
}

.similarity-stat .stat-label {
    color: #94a3b8;
    font-size: 0.875rem;
}

.similarity-stat .stat-value {
    color: #f1f5f9;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Version Metrics Styles */
.version-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 6px;
}

.metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
}

.metric-label {
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
}

.metric-value {
    color: #f1f5f9;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

/* Metrics Comparison Styles */
.metrics-comparison-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #0f172a;
    border-radius: 8px;
    border-left: 3px solid #8b5cf6;
}

body.light-mode .metrics-comparison-section {
    background: #ffffff;
    border-left-color: #8b5cf6;
}

.metrics-comparison-section h4 {
    color: #8b5cf6;
    margin-bottom: 1rem;
}

.metrics-comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.metric-comparison-item {
    background: #0f172a;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #334155;
}

body.light-mode .metric-comparison-item {
    background: #f1f5f9;
}

.metric-comparison-label {
    color: #cbd5e1;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

body.light-mode .metric-comparison-label {
    color: #374151;
}

.metric-comparison-values {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.baseline-value,
.comparison-value {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.baseline-value {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.comparison-value {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.comparison-arrow {
    color: #64748b;
    font-weight: bold;
}

.metric-change {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
}

.metric-change.positive {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.metric-change.negative {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.metric-change.neutral {
    background: rgba(100, 116, 139, 0.2);
    color: #64748b;
}

.loading-message {
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

/* Word-level Diff Styles */
.word-level-diff {
    font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.diff-content {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #e2e8f0;
    white-space: pre-wrap;
    margin-bottom: 1rem;
}

.diff-content .added {
    background: rgba(16, 185, 129, 0.3);
    color: #10b981;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
    font-weight: 500;
}

.diff-content .removed {
    background: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
    text-decoration: line-through;
    font-weight: 500;
}

.diff-content .unchanged {
    color: #cbd5e1;
}

body.light-mode .diff-content .unchanged {
    color: #374151;
}

.diff-summary {
    padding-top: 1rem;
    border-top: 1px solid #334155;
    font-size: 0.8rem;
    color: #94a3b8;
}

.added-words {
    color: #10b981;
    margin-right: 0.5rem;
}

.removed-words {
    color: #ef4444;
}

/* No Changes Styles */
.no-changes-message {
    text-align: center;
    color: #10b981;
    padding: 2rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    border-left: 3px solid #10b981;
}

.no-changes-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.no-changes-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.no-changes-text {
    color: #cbd5e1;
}

/* Error Message Styles */
.error-message {
    text-align: center;
    padding: 2rem;
    color: #ef4444;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

.error-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.error-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.error-text {
    color: #dc2626;
}

/* Loading Message Styles */
.loading-message {
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

.loading-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 1rem;
}

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

/* No Content Styles */
.no-content-message {
    text-align: center;
    padding: 2rem;
    color: #64748b;
}

.no-content-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.no-content-text {
    font-size: 1rem;
}
