/* DeepEarth Unified Dashboard Styles */

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

:root {
    --primary-color: #2563eb;
    --secondary-color: #10b981;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #475569;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
}

/* Header */
.header {
    height: 60px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1000;
    position: relative;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-title {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo {
    font-size: 24px;
}

.header-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.view-switcher {
    display: flex;
    gap: 8px;
    background: var(--surface-light);
    padding: 4px;
    border-radius: 8px;
}

.view-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-btn.active {
    background: var(--primary-color);
    color: white;
}

.view-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
}

/* Main Container */
.main-container {
    display: flex;
    height: calc(100vh - 60px);
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: var(--surface);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    padding: 24px;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.sidebar-section {
    margin-bottom: 32px;
}

.sidebar-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.control-group {
    margin-bottom: 16px;
}

.control-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.control-select,
.control-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
}

.control-slider {
    width: 100%;
    margin-top: 8px;
}

input[type="checkbox"] {
    margin-right: 8px;
}

/* Range inputs */
.range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.range-input {
    width: 80px;
    padding: 6px 8px;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 13px;
}

.range-separator {
    color: var(--text-secondary);
    font-size: 12px;
}

/* Statistics Panel */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-item {
    text-align: center;
    padding: 12px;
    background: var(--surface-light);
    border-radius: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* Main Content */
.main-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
}

.view-container {
    width: 100%;
    height: 100%;
    display: none;
    position: relative;
}

.view-container.active {
    display: flex;
}

/* Map Container */
.map-container {
    width: 100%;
    height: 100%;
}

/* Adjust map when panel is open */
.view-container.panel-open .map-container {
    width: calc(100% - var(--panel-width, 25%));
    float: left;
}

/* 3D Embedding Container */
.embedding-container {
    width: 100%;
    height: 100%;
}

/* Overlay Panels */
.overlay-panel,
.detail-panel,
.info-panel {
    position: absolute;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.overlay-panel {
    right: 24px;
    top: 24px;
    width: 400px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.detail-panel {
    position: fixed;
    right: 0;
    top: 60px; /* Below header */
    bottom: 0;
    width: var(--panel-width, 25%);
    max-width: 60%;
    min-width: 300px;
    transform: none;
    border-radius: 0;
    overflow-y: auto;
    background: var(--surface);
}

/* Resize handle */
.resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--border-color);
    cursor: ew-resize;
    transition: background 0.2s;
}

.resize-handle:hover {
    background: var(--primary-color);
}

.resize-handle.dragging {
    background: var(--primary-color);
}

.info-panel {
    right: 24px;
    top: 24px;
    width: 450px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    right: 16px;
    top: 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    z-index: 10;
}

.close-btn:hover {
    background: var(--surface-light);
    color: var(--text-primary);
}

/* Grid Statistics */
.grid-stats-content {
    margin-top: 20px;
}

.stats-summary {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.stats-summary .stat {
    flex: 1;
    text-align: center;
}

.chart-container {
    margin-bottom: 24px;
    height: 200px;
}

.species-table-container {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 24px;
}

.species-table {
    width: 100%;
    font-size: 13px;
}

.species-table th {
    text-align: left;
    padding: 8px;
    background: var(--surface-light);
    position: sticky;
    top: 0;
}

.species-table td {
    padding: 8px;
    border-top: 1px solid var(--border-color);
}

.analysis-buttons {
    display: flex;
    gap: 12px;
}

.analysis-btn {
    flex: 1;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.analysis-btn:hover {
    background: #1d4ed8;
}

/* Image Viewer */
.image-viewer {
    margin-top: 20px;
}

.image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    margin: 0 auto;
    background: var(--surface-light);  /* Match panel background */
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1; /* Establish stacking context */
}

#obs-image {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    z-index: 1;
}

.attention-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 10; /* Higher z-index to ensure it's above the image */
    /* Ensure overlay matches image scaling */
    display: flex;
    align-items: center;
    justify-content: center;
}

#obs-attention-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.image-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 12px;
}

.nav-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--surface-light);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

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

/* Feature Controls */
.feature-controls {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.feature-controls label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.feature-controls select {
    width: 100%;
    padding: 6px 10px;
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 12px;
}

/* Enhanced Feature Controls Panel */
.feature-controls-panel {
    margin-top: 20px;
    padding: 16px;
    background: var(--surface-light);
    border-radius: 8px;
}

.control-group {
    margin-bottom: 16px;
}

.control-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: block;
}

.control-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.control-btn {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.control-btn:hover {
    border-color: var(--primary-color);
}

.control-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.control-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: var(--surface-light);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.control-select:hover {
    border-color: var(--primary-color);
}

.control-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.temporal-slider, .opacity-slider {
    width: 100%;
    margin-top: 8px;
}

.umap-btn {
    width: 100%;
    justify-content: center;
}

.umap-description {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 8px;
    line-height: 1.4;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.stat-box {
    background: var(--background);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: block;
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Observation Details */
.observation-details {
    margin: 16px 0;
    padding: 16px;
    background: var(--surface-light);
    border-radius: 8px;
}

.observation-details .detail-item {
    margin-bottom: 12px;
}

.observation-details .detail-item:last-child {
    margin-bottom: 0;
}

.observation-details .label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-right: 8px;
}

/* GBIF metadata styles */
.gbif-metadata {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.metadata-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.gbif-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
}

.gbif-link:hover {
    text-decoration: underline;
}

/* GBIF thumbnail */
.gbif-thumbnail {
    position: relative;
    width: calc(100% + 52px); /* Account for panel padding */
    height: 120px;
    background: var(--surface-light);
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
    margin: -24px -24px 16px -28px; /* Negative margins to extend to edges */
    display: none;
}

.gbif-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Adjust close button when thumbnail is shown */
.gbif-thumbnail ~ .close-btn {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(4px);
}

/* Enhanced Image Viewer */
.enhanced-image-viewer {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 200px); /* Adjust based on header content */
}

/* Make detail panel scrollable */
#observation-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px;
    padding-left: 28px; /* Extra space for resize handle */
}

#observation-panel h3 {
    flex-shrink: 0;
    margin-bottom: 16px;
    margin-top: 0;
    font-style: italic;
}

#observation-panel .observation-details {
    flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .detail-panel {
        min-width: 250px; /* Smaller min width on smaller screens */
    }
}

/* Status Icons */
.status-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-icon.active {
    background: var(--success);
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--surface-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 16px;
    color: var(--text-secondary);
}

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

/* Leaflet Overrides */
.leaflet-container {
    background: var(--background);
    font-family: inherit;
}

.leaflet-popup-content-wrapper {
    background: var(--surface);
    color: var(--text-primary);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.leaflet-popup-tip {
    background: var(--surface);
}

/* Grid Overlay */
.grid-line {
    stroke: white;
    stroke-width: 1;
    opacity: 0.5;
}

.grid-label {
    fill: white;
    font-size: 11px;
    font-weight: 500;
}

.grid-cell-highlight {
    fill: var(--primary-color);
    fill-opacity: 0.2;
    stroke: var(--primary-color);
    stroke-width: 2;
}

/* 3D View Controls */
.view-indicator {
    background: var(--surface-light);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
}

.view-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.view-type {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 4px;
    font-style: italic;
}

.geographic-filter {
    background: var(--surface-light);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.filter-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.filter-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.filter-value {
    font-weight: 500;
    color: var(--text-primary);
}

.filter-clear {
    width: 24px;
    height: 24px;
    border: none;
    background: var(--error);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.filter-clear:hover {
    transform: scale(1.1);
}

.coord-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.coord-group {
    display: flex;
    flex-direction: column;
}

.coord-group label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.coord-input {
    padding: 6px 8px;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 13px;
}

.filter-toggle-btn,
.apply-filter-btn,
.compute-vision-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.filter-toggle-btn:hover,
.apply-filter-btn:hover,
.compute-vision-btn:hover {
    background: #1d4ed8;
}

.vision-controls {
    background: var(--surface-light);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.slider-value {
    font-weight: 600;
    color: var(--primary-color);
    margin-left: 8px;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.view-btn {
    width: 100%;
    padding: 10px;
    background: var(--surface-light);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.view-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.debug-controls {
    background: var(--surface-light);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--warning);
    margin-top: 16px;
}

.debug-controls h4 {
    font-size: 14px;
    color: var(--warning);
    margin-bottom: 12px;
}

.debug-value {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
    margin-left: 8px;
}

/* Enhanced Image Gallery */
.image-gallery {
    margin-top: 20px;
}

.gallery-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.image-display {
    position: relative;
    width: 100%;
    background: var(--surface-light);
    border-radius: 8px;
    overflow: hidden;
}

.image-display img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-navigation {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 10px;
}

.gallery-nav.next {
    right: 10px;
}

.gallery-counter {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    pointer-events: none;
}

.vision-feature-panel {
    margin-top: 20px;
    padding: 16px;
    background: var(--surface-light);
    border-radius: 8px;
}

.vision-feature-panel h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.point-details {
    margin: 16px 0;
    padding: 16px;
    background: var(--surface-light);
    border-radius: 8px;
}

.point-details .detail-item {
    margin-bottom: 8px;
    font-size: 14px;
}

.point-details .detail-item:last-child {
    margin-bottom: 0;
}

.point-details .label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-right: 8px;
}

.point-details .value {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
    }
    
    .overlay-panel,
    .info-panel {
        width: calc(100% - 48px);
        right: 24px;
    }
}

/* Embedding Type Selector */
.embedding-type-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.embedding-type-btn {
    flex: 1;
    padding: 12px;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.embedding-type-btn:hover {
    border-color: var(--primary-color);
    background: rgba(0, 119, 195, 0.05);
}

.embedding-type-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.embedding-type-btn .icon {
    font-size: 1.5rem;
    display: block;
}

.embedding-type-btn .type-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.embedding-type-btn .type-desc {
    font-size: 0.75rem;
    opacity: 0.8;
}

.embedding-type-btn.active .type-desc {
    opacity: 0.9;
}

/* Recompute Button */
.recompute-btn {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #0077c3, #005a92);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.recompute-btn:hover {
    background: linear-gradient(135deg, #0087d3, #006aa2);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 119, 195, 0.3);
}

.recompute-btn .icon {
    font-size: 1.1rem;
}

.recompute-btn.ready {
    background: linear-gradient(135deg, #00a843, #008535);
    box-shadow: 0 0 10px rgba(0, 168, 67, 0.3);
}

.recompute-btn.ready:hover {
    background: linear-gradient(135deg, #00b853, #009545);
    box-shadow: 0 2px 12px rgba(0, 168, 67, 0.4);
}

/* Grid Instructions */
.grid-instructions {
    background: rgba(0, 119, 195, 0.1);
    border: 1px solid rgba(0, 119, 195, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;
}

/* Map Bounds Display */
.map-bounds-display {
    background: var(--surface-light);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.bounds-info {
    margin-top: 8px;
}

.bounds-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 0.85rem;
}

.bounds-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.bounds-value {
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

/* Vision Progress Modal */
.vision-progress-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(8px);
}

.vision-progress-content {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    min-width: 400px;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.vision-progress-content h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.vision-progress-content h3::before {
    content: '👁️';
    font-size: 24px;
}

.vision-progress-message {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
}

.vision-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--surface-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.vision-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.5);
}

.vision-progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.progress-percent {
    font-weight: 600;
    color: var(--primary-color);
}

.progress-details {
    color: var(--text-secondary);
}

/* Expanded image overlay styles */
.expanded-image-info {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
}

.expanded-image-info div:first-child {
    line-height: 1.3;
}

/* Three.js canvas cursor styles */
#embedding-3d canvas {
    cursor: grab;
}

#embedding-3d canvas:active {
    cursor: grabbing;
}