/* PaperBanana — Academic-themed UI */

:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-primary-light: #dbeafe;
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-text: #1f2937;
    --color-text-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-success: #10b981;
    --color-success-light: #d1fae5;
    --color-error: #ef4444;
    --color-warning: #f59e0b;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.5rem;

    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 960px;
    margin: 0 auto;
    gap: var(--spacing-md);
}

.logo {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

nav {
    display: flex;
    gap: 2px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.nav-link {
    text-decoration: none;
    color: var(--color-text-muted);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: var(--font-size-sm);
    transition: color 0.2s, background 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--color-text);
    background: var(--color-surface);
}

.nav-link.active {
    color: var(--color-primary);
    background: var(--color-surface);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Logout Button */
.btn-logout {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    flex-shrink: 0;
}

.btn-logout:hover {
    color: var(--color-error);
    border-color: var(--color-error);
    background: #fef2f2;
}

main {
    max-width: 960px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    padding-bottom: var(--spacing-2xl);
}

/* Views */
.view {
    display: none;
    animation: fadeIn 0.2s ease;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

h2 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    letter-spacing: -0.01em;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: var(--font-size-sm);
    margin-bottom: 6px;
    color: var(--color-text);
}

.form-row {
    display: flex;
    gap: var(--spacing-md);
}

.form-row .form-group {
    flex: 1;
}

textarea,
input[type="text"],
select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

textarea:focus,
input:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

textarea {
    resize: vertical;
    line-height: 1.5;
}

textarea::placeholder {
    color: #9ca3af;
}

/* File input */
input[type="file"] {
    width: 100%;
    padding: 10px 14px;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    background: var(--color-bg);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

input[type="file"]:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

/* Character counter */
.char-count {
    display: block;
    text-align: right;
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    margin-top: 4px;
}

.char-count.warn {
    color: var(--color-warning);
}

.char-count.error {
    color: var(--color-error);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s, opacity 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn:active:not(:disabled) {
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-dark);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--color-bg);
    border-color: #d1d5db;
}

.btn-danger {
    background: var(--color-error);
    color: #fff;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

/* Loading spinner on button */
.btn .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Progress Panel */
.progress-panel {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-primary);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.phase-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text);
}

.elapsed-timer {
    font-family: 'Courier New', Courier, monospace;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    background: var(--color-bg);
    padding: 2px 10px;
    border-radius: 20px;
    flex-shrink: 0;
}

.phase-description {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-md);
    min-height: 1.4em;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--color-primary);
    border-radius: 4px;
    transition: width 0.5s ease;
    position: relative;
}

/* Animated shimmer on active progress bar */
.progress-bar.active {
    background: linear-gradient(
        90deg,
        var(--color-primary) 0%,
        #60a5fa 50%,
        var(--color-primary) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Progress Log */
.progress-log {
    max-height: 200px;
    overflow-y: auto;
    border-top: 1px solid var(--color-border);
    padding-top: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.progress-log-entry {
    display: flex;
    gap: var(--spacing-md);
    padding: 6px 0;
    font-size: var(--font-size-sm);
    border-bottom: 1px solid #f3f4f6;
    animation: fadeIn 0.2s ease;
}

.progress-log-entry:last-child {
    border-bottom: none;
}

.log-time {
    font-family: 'Courier New', Courier, monospace;
    color: var(--color-text-muted);
    flex-shrink: 0;
    min-width: 3.5em;
    font-size: var(--font-size-xs);
}

.log-message {
    color: var(--color-text);
}

/* Result Panel */
.result-panel {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-success-light);
    border-left: 4px solid var(--color-success);
    border-radius: var(--radius-lg);
    text-align: center;
    animation: slideDown 0.3s ease;
}

.result-panel img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-md);
}

.result-panel p {
    margin-bottom: var(--spacing-md);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}

.gallery-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.gallery-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gallery-card .card-caption {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Iteration Strip */
.iter-strip {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 6px var(--spacing-md) var(--spacing-sm);
    border-top: 1px solid var(--color-border);
}

.iter-thumb-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    cursor: pointer;
}

.iter-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 2px solid var(--color-border);
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s;
}

.iter-thumb:hover {
    opacity: 1;
}

.iter-thumb.active {
    opacity: 1;
    border-color: var(--color-primary);
}

.iter-label {
    font-size: 0.6rem;
    color: var(--color-text-muted);
    font-weight: 600;
    text-align: center;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.lightbox-content {
    position: relative;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
    padding: var(--spacing-lg);
    z-index: 1;
    box-shadow: var(--shadow-lg);
}

.lightbox-close {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--color-text-muted);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
}

.lightbox-close:hover {
    background: var(--color-border);
    color: var(--color-text);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 60vh;
    display: block;
    margin: 0 auto var(--spacing-md);
    border-radius: var(--radius-md);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 2;
    line-height: 1;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.lightbox-nav[hidden] {
    display: none;
}

.lightbox-prev {
    left: var(--spacing-sm);
}

.lightbox-next {
    right: var(--spacing-sm);
}

.lightbox-counter {
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-sm);
    font-weight: 500;
}

.lightbox-counter[hidden] {
    display: none;
}

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

.lightbox-meta p {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

/* History */
.filter-bar {
    margin-bottom: var(--spacing-lg);
}

.filter-bar select {
    max-width: 220px;
}

.history-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    transition: box-shadow 0.2s;
}

.history-card:hover {
    box-shadow: var(--shadow-sm);
}

.history-card .card-info {
    flex: 1;
    min-width: 0;
}

.history-card .card-date {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.history-card .card-caption {
    font-weight: 500;
    margin: var(--spacing-xs) 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-card .card-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-completed {
    background: #d1fae5;
    color: #065f46;
}

.badge-failed {
    background: #fee2e2;
    color: #991b1b;
}

.badge-running {
    background: #dbeafe;
    color: #1e40af;
}

.badge-methodology {
    background: #ede9fe;
    color: #5b21b6;
}

.badge-statistical_plot {
    background: #fef3c7;
    color: #92400e;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

/* Error message */
.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-md);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl) var(--spacing-lg);
    color: var(--color-text-muted);
}

.empty-state p {
    font-size: var(--font-size-sm);
}

/* ── Login Screen ────────────────────────────────────────── */

#login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #f0f4ff 0%, var(--color-bg) 50%, #f0fdf4 100%);
}

#login-screen.hidden {
    display: none;
}

.login-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-2xl) var(--spacing-xl);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-card .logo {
    margin-bottom: var(--spacing-xs);
    font-size: 2rem;
}

.login-tagline {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-xl);
    line-height: 1.5;
}

.login-card .form-group {
    text-align: left;
}

.login-card input[type="text"],
.login-card input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-card input[type="text"]:focus,
.login-card input[type="password"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.login-btn {
    width: 100%;
    margin-top: var(--spacing-md);
    padding: 12px 20px;
}

.login-error {
    background: #fee2e2;
    color: #991b1b;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-sm);
    text-align: left;
}

/* ── Language Switch ──────────────────────────────────────── */

.lang-switch {
    display: flex;
    gap: 2px;
}

.login-card .lang-switch {
    justify-content: center;
    margin-top: var(--spacing-lg);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-shrink: 0;
}

.lang-btn {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    padding: 3px 10px;
    font-family: var(--font-family);
    font-size: var(--font-size-xs);
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.lang-btn:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.lang-btn:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.lang-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.lang-btn:not(.active):hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* ── App Shell ───────────────────────────────────────────── */

#app-shell {
    display: none;
}

#app-shell.active {
    display: block;
}

/* ── Disabled form state during generation ──────────────── */

.form-disabled {
    position: relative;
}

.form-disabled textarea,
.form-disabled select,
.form-disabled input,
.form-disabled button[type="submit"] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--color-bg);
}

/* ── Version badge ──────────────────────────────────────── */

.version-badge {
    position: fixed;
    bottom: 8px;
    right: 12px;
    font-size: 0.65rem;
    color: var(--color-text-muted);
    opacity: 0.4;
    font-family: 'Courier New', Courier, monospace;
    pointer-events: none;
    z-index: 10;
    letter-spacing: 0.02em;
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 640px) {
    header {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    .logo {
        width: 100%;
        text-align: center;
    }

    nav {
        width: 100%;
        justify-content: center;
    }

    .header-actions {
        width: 100%;
        justify-content: center;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .login-card {
        margin: var(--spacing-md);
    }

    main {
        padding: var(--spacing-lg) var(--spacing-md);
    }
}

/* ── Optimizer Bar ──────────────────────────────────────── */

.optimizer-bar {
    display: flex;
    gap: 8px;
    margin-bottom: var(--spacing-lg);
    align-items: center;
    flex-wrap: wrap;
}

/* Optimize button — accent purple */
.btn-optimize {
    background: #7c3aed;
    color: #fff;
    box-shadow: 0 1px 3px rgba(124, 58, 237, 0.3);
}

.btn-optimize:hover:not(:disabled) {
    background: #6d28d9;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.4);
}

.btn-optimize:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Level dropdown */
.optimize-level-select {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    background: var(--color-surface);
    max-width: 140px;
}

/* Status text (error toast) */
.optimize-status {
    font-size: var(--font-size-sm);
    color: var(--color-error);
    transition: opacity 0.5s;
}

/* Green flash on textareas after optimization */
@keyframes textareaFlash {
    0% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.5); border-color: var(--color-success); }
    100% { box-shadow: none; border-color: var(--color-border); }
}

.textarea-flash {
    animation: textareaFlash 1.5s ease-out;
}

/* AI badge in history */
.badge-optimized {
    background: #ede9fe;
    color: #7c3aed;
}

/* AI badge overlay on gallery card */
.gallery-badge-ai {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(124, 58, 237, 0.85);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.03em;
}

.gallery-card {
    position: relative;
}

/* Source context in history cards */
.card-context-details {
    margin-top: var(--spacing-sm);
}

.card-context-details summary {
    font-size: var(--font-size-sm);
    color: var(--color-primary);
    cursor: pointer;
    font-weight: 500;
}

.card-context-text {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-top: var(--spacing-xs);
    max-height: 600px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.5;
}

/* Source context in lightbox */
.lightbox-context-details {
    text-align: left;
    margin-top: var(--spacing-sm);
}

.lightbox-context-details summary {
    font-size: var(--font-size-sm);
    color: var(--color-primary);
    cursor: pointer;
    font-weight: 500;
    text-align: center;
}

.lightbox-context-text {
    font-size: var(--font-size-xs);
    color: var(--color-text-muted);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    margin-top: var(--spacing-xs);
    max-height: 600px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.5;
}
