/* Modern C2PA Viewer - Professional Design System */

:root {
  /* Color Palette - Professional neutral (Light Mode Default) */
  --color-bg-primary: #f8f9fa;
  --color-bg-secondary: #f1f3f4;
  --color-bg-tertiary: #e8eaed;
  --color-bg-card: #ffffff;
  --color-border: #dadce0;
  --color-border-light: #f1f3f4;
  
  /* Text Colors */
  --color-text-primary: #202124;
  --color-text-secondary: #5f6368;
  --color-text-tertiary: #80868b;
  --color-text-muted: #9aa0a6;
  
  /* Status Colors */
  --color-success: #1e8e3e;
  --color-success-light: #e6f4ea;
  --color-warning: #f9ab00;
  --color-warning-light: #fef3e8;
  --color-error: #d93025;
  --color-error-light: #fce8e6;
  --color-info: #1a73e8;
  --color-info-light: #e8f0fe;
  
  /* Accent */
  --color-accent: #1a73e8;
  --color-accent-hover: #1557b0;
  
  /* Shadows - Minimal */
  --shadow-sm: 0 1px 2px rgba(60, 64, 67, 0.1);
  --shadow-md: 0 1px 3px rgba(60, 64, 67, 0.12);
  --shadow-lg: 0 2px 6px rgba(60, 64, 67, 0.15);
  --shadow-xl: 0 4px 12px rgba(60, 64, 67, 0.15);
  --shadow-image: 0 8px 24px rgba(60, 64, 67, 0.2);

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SF Mono', Monaco, monospace;

  /* Spacing - Compact */
  --space-1: 0.125rem;
  --space-2: 0.25rem;
  --space-3: 0.375rem;
  --space-4: 0.5rem;
  --space-5: 0.75rem;
  --space-6: 1rem;
  --space-8: 1.25rem;
  --space-10: 1.5rem;
  --space-12: 2rem;

  /* Sidebar Width */
  --sidebar-width: 360px;

  /* Border Radius - Minimal */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-xl: 8px;
  --radius-full: 9999px;
}

/* Dark Mode Theme */
[data-theme="dark"] {
  --color-bg-primary: #0f0f0f;
  --color-bg-secondary: #1a1a1a;
  --color-bg-tertiary: #2a2a2a;
  --color-bg-card: #1a1a1a;
  --color-border: #333;
  --color-border-light: #2a2a2a;

  /* Text Colors */
  --color-text-primary: #ffffff;
  --color-text-secondary: #a0a0a0;
  --color-text-tertiary: #808080;
  --color-text-muted: #666;

  /* Status Colors */
  --color-success: #22c55e;
  --color-success-light: rgba(34, 197, 94, 0.15);
  --color-warning: #f59e0b;
  --color-warning-light: rgba(245, 158, 11, 0.15);
  --color-error: #ef4444;
  --color-error-light: rgba(239, 68, 68, 0.15);
  --color-info: #4a9eff;
  --color-info-light: rgba(74, 158, 255, 0.15);

  /* Accent */
  --color-accent: #4a9eff;
  --color-accent-hover: #3a8eef;

  /* Shadows - Darker */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 4px 12px rgba(0, 0, 0, 0.6);
  --shadow-image: 0 8px 24px rgba(0, 0, 0, 0.7);
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Global smooth theme transition */
*,
*::before,
*::after {
  transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  overflow: hidden;
  height: 100vh;
  line-height: 1.5;
}

/* Top Bar (legacy, hidden) */
.top-bar {
  display: none;
}

.hidden {
  display: none !important;
}

/* Sidebar Toolbar */
.sidebar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border);
}

.toolbar-buttons {
  display: flex;
  gap: var(--space-2);
}

.toolbar-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
}

.toolbar-logo {
  height: 24px;
  width: auto;
  display: block;
}

.toolbar-btn {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--color-text-primary);
  padding: 0;
}

.toolbar-btn:hover {
  background: var(--color-bg-primary);
  border-color: var(--color-accent);
}

.toolbar-btn svg {
  width: 20px;
  height: 20px;
}

.toolbar-btn .moon-icon {
  display: none;
}

[data-theme="dark"] .toolbar-btn .sun-icon {
  display: none;
}

[data-theme="dark"] .toolbar-btn .moon-icon {
  display: block;
}

/* Image Title Header */
.image-title-header {
  padding: var(--space-4) var(--space-5);
  background: var(--color-bg-card);
  border-bottom: 1px solid var(--color-border);
  display: none;
}

.image-title-header.has-content {
  display: block;
}

.image-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 var(--space-1);
  line-height: 1.4;
  word-break: break-word;
}

.image-caption {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* About Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: var(--space-4);
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
}

.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-secondary);
  padding: var(--space-1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-header {
  padding: var(--space-6) var(--space-6) var(--space-4);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.modal-logo {
  height: 40px;
  width: auto;
  margin-bottom: var(--space-3);
}

.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
}

.modal-body {
  padding: var(--space-6);
}

.modal-description {
  font-size: 1rem;
  color: var(--color-text-primary);
  line-height: 1.6;
  margin-bottom: var(--space-5);
}

.modal-body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: var(--space-5) 0 var(--space-2);
}

.modal-body p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-3);
}

.modal-body ul {
  margin: var(--space-2) 0 var(--space-4);
  padding-left: var(--space-5);
}

.modal-body li {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-2);
}

.modal-body a {
  color: var(--color-accent);
  text-decoration: none;
}

.modal-body a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  flex-direction: row-reverse; /* Sidebar on left in desktop */
}

/* Main Content Area */
.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
  position: relative;
}

/* Framed Image Display */
.image-container {
  position: relative;
  max-height: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.framed-image {
  max-height: calc(100vh - var(--space-12) * 2);
  max-width: calc(100vw - var(--sidebar-width) - var(--space-12) * 2);
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-image);
  transition: transform 0.3s ease;
}

/* ========================================
   DRAG & DROP ZONE - WIDE & WELCOMING
   ======================================== */

.welcome-zone {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-primary);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.welcome-zone.dragover {
  background: var(--color-bg-secondary);
}

.welcome-content {
  text-align: center;
  max-width: 520px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  position: relative;
}

.cc-logo-large {
  width: 280px;
  height: auto;
  opacity: 0.15;
  transition: opacity 0.3s ease;
}

.welcome-zone.dragover .cc-logo-large {
  opacity: 0.25;
}

.welcome-tagline {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0;
  line-height: 1.3;
}

.welcome-instruction {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin: 0;
}

.select-file-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px -5px rgba(99, 102, 241, 0.4);
  text-decoration: none;
}

.select-file-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.5);
}

.cc-info {
  margin-top: 2rem;
  padding: 1.25rem;
  text-align: center;
}

.cc-info-text {
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0 0 0.75rem 0;
}

.cc-learn-more {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

.cc-learn-more:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* Inline CC logo in info box */
.cc-logo-inline {
  width: 300px;
  height: auto;
  display: block;
  margin: 0.5rem auto 0;
  filter: grayscale(100%) opacity(0.2);
  transition: filter 0.2s ease;
}

.cc-info:hover .cc-logo-inline {
  filter: grayscale(0%) opacity(1);
}

/* Spinner animation for loading */
.spinner {
  animation: spin 1s linear infinite;
}

.spinner svg {
  color: var(--color-accent);
}

/* Subtle Dot Spinner - positioned behind select button */
.loading-indicator {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  margin: 0;
  opacity: 0.5;
  z-index: 1;
  pointer-events: none;
}

.select-file-link {
  position: relative;
  z-index: 2;
}

.spinner-dots {
  width: 32px;
  height: 32px;
  animation: spin 1.5s linear infinite;
  color: var(--color-text-secondary);
}

/* Welcome Hidden State */
.welcome-zone.hidden {
  display: none !important;
}

/* ========================================
   SIDEBAR - MODERN INFORMATION ARCHITECTURE
   ======================================== */

.sidebar {
  width: var(--sidebar-width);
  background: var(--color-bg-card);
  border-right: 1px solid var(--color-border); /* Right border since it's on left */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

.sidebar-header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-card);
  display: flex;
  justify-content: center;
}

.sidebar-logo {
  height: 24px;
  width: auto;
  display: block;
  margin: 0 auto;
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Scrollbar Styling */
.sidebar-content::-webkit-scrollbar {
  width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* Section Base Styles */
.cc-status-section,
.overview-section,
.provenance-section,
.technical-section,
.creator-section,
.description-section {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: visible;
}

.section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0;
}

/* ========================================
   CONTENT CREDENTIALS STATUS
   ======================================== */

.cc-status-section {
  border: none;
  background: transparent;
}

.cc-status-card {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  transition: border-color 0.15s ease;
}

.cc-status-card.verified {
  background: var(--color-success-light);
  border-color: var(--color-success);
}

.cc-status-card.unverified {
  background: var(--color-warning-light);
  border-color: var(--color-warning);
}

.cc-status-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.cc-status-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--color-bg-tertiary);
}

.cc-status-card.verified .cc-status-icon {
  background: var(--color-success);
  color: white;
}

.cc-status-card.verified .cc-status-icon::after {
  content: '';
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.cc-status-card.unverified .cc-status-icon::after {
  content: '';
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa0a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.cc-status-title {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.cc-status-label {
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cc-status-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-primary);
}

.cc-status-card.verified .cc-status-value {
  color: var(--color-success);
}

.cc-status-details {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.cc-status-description {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ========================================
   DIGITAL SOURCE TYPE BADGE
   ======================================== */

.digital-source-section {
  margin-bottom: 0;
}

.digital-source-section .cc-status-card.ai-generated {
  background: var(--color-warning-light);
  border-color: var(--color-warning);
}

.digital-source-section .cc-status-card.ai-generated .cc-status-icon {
  background: var(--color-warning);
  color: white;
}

.digital-source-section .cc-status-card.ai-generated .cc-status-icon::after {
  content: '';
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a2 2 0 0 1 2 2c0 .74-.4 1.39-1 1.73V7h1a7 7 0 0 1 7 7h1a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-1v1a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-1H2a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1h1a7 7 0 0 1 7-7h1V5.73c-.6-.34-1-.99-1-1.73a2 2 0 0 1 2-2M7.5 13A1.5 1.5 0 0 0 6 14.5 1.5 1.5 0 0 0 7.5 16 1.5 1.5 0 0 0 9 14.5 1.5 1.5 0 0 0 7.5 13m9 0a1.5 1.5 0 0 0-1.5 1.5 1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5-1.5 1.5 1.5 0 0 0-1.5-1.5M12 17a1 1 0 0 0-1 1 1 1 0 0 0 1 1 1 1 0 0 0 1-1 1 1 0 0 0-1-1z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.digital-source-section .cc-status-card.ai-generated .cc-status-value {
  color: #b45309;
}

/* ========================================
   IMAGE OVERVIEW SECTION
   ======================================== */

.overview-section {
  padding: var(--space-4) var(--space-5);
}

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

.file-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-2);
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: var(--radius-sm);
}

.overview-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.thumbnail-container {
  flex-shrink: 0;
  width: 100%;
  max-width: 280px;
  height: auto;
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 auto;
}

/* Diagonal lines pattern for empty state */
.thumbnail-container:has(.thumbnail-placeholder[style*="display: flex"]),
.thumbnail-container:has(.thumbnail-placeholder:not([style*="display: none"])) {
  background: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 8px,
      var(--color-border) 8px,
      var(--color-border) 9px
    ),
    var(--color-bg-secondary);
}

.thumbnail-container:has(.thumbnail-placeholder[style*="display: flex"]) .thumbnail-placeholder svg,
.thumbnail-container:has(.thumbnail-placeholder:not([style*="display: none"])) .thumbnail-placeholder svg {
  color: var(--color-text-muted);
  opacity: 0.6;
}

.thumbnail {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--color-bg-secondary);
  display: block;
  margin: 0 auto;
}

.thumbnail-placeholder {
  color: var(--color-text-muted);
}

.thumbnail-placeholder svg {
  width: 24px;
  height: 24px;
}

.overview-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.filename {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-primary);
  word-break: break-word;
  margin: 0;
}

.dimensions,
.filesize {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  margin: 0;
}

.overview-dates {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-light);
}

.date-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.6875rem;
  color: var(--color-text-tertiary);
}

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

.date-value {
  color: var(--color-text-primary);
  font-family: var(--font-mono);
}

/* Ensure GPS coordinates link is right-aligned */
#gpsCoordinates {
  margin-left: auto;
}

#gpsCoordinates a {
  color: var(--color-accent);
  text-decoration: none;
}

#gpsCoordinates a:hover {
  text-decoration: underline;
}

/* ========================================
   PROVENANCE TIMELINE
   ======================================== */

.provenance-section {
  padding: var(--space-4) var(--space-5);
}

.provenance-section .section-title {
  margin-bottom: var(--space-3);
}

.provenance-timeline {
  position: relative;
}

.timeline-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  color: var(--color-text-muted);
  text-align: center;
}

.timeline-empty svg {
  width: 24px;
  height: 24px;
  opacity: 0.5;
}

.timeline-empty p {
  font-size: 0.8125rem;
  margin: 0;
}

.provenance-list {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}

.provenance-list::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: var(--color-border);
  border-radius: var(--radius-full);
}

.provenance-item {
  position: relative;
  padding-left: 32px;
  padding-bottom: var(--space-3);
}

.provenance-item:last-child {
  padding-bottom: 0;
}

.provenance-item::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 9px;
  height: 9px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-full);
  z-index: 1;
}

.provenance-item.verified::before {
  background: var(--color-accent);
}

.provenance-item strong {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
}

.provenance-item p {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  margin: 0;
  line-height: 1.4;
}

.provenance-item .timestamp {
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

.expand-toggle,
.collapse-toggle {
  margin-top: var(--space-2);
  margin-bottom: var(--space-2);
  padding: 0;
  background: none;
  border: none;
  position: relative;
  padding-left: 32px;
}

.expand-toggle::before,
.collapse-toggle::before {
  display: none;
}

.expand-toggle + .provenance-item:not(.collapse-toggle)::before,
.collapse-toggle + .provenance-item::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 9px;
  height: 9px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-full);
  z-index: 1;
}

.expand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: 0.6875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.expand-btn:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
}

.expand-btn svg {
  transition: transform 0.15s ease;
}

.collapse-toggle .expand-btn svg {
  transform: rotate(180deg);
}

/* ========================================
   TECHNICAL DETAILS SECTION
   ======================================== */

.technical-section {
  padding: var(--space-4) var(--space-5);
}

.technical-section .section-title {
  margin-bottom: var(--space-4);
}

.tech-group {
  margin-bottom: var(--space-4);
}

.tech-group:last-child {
  margin-bottom: 0;
}

.tech-group-title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 var(--space-2) 0;
}

.tech-group-title svg {
  width: 12px;
  height: 12px;
  color: var(--color-text-muted);
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3) var(--space-4);
}

.exposure-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
}

.tech-item {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: var(--space-1) 0;
}

.exposure-item {
  background: var(--color-bg-secondary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-1);
}

.tech-label {
  font-size: 0.6875rem;
  color: var(--color-text-tertiary);
  font-weight: 500;
}

.exposure-item .tech-label {
  color: var(--color-text-muted);
}

.tech-value {
  font-size: 0.8125rem;
  color: var(--color-text-primary);
  font-weight: 500;
}

.exposure-item .tech-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.tech-value:empty::before,
.creator-value:empty::before {
  content: '—';
  color: var(--color-text-muted);
}

/* ========================================
   CREATOR INFORMATION SECTION
   ======================================== */

.creator-section {
  padding: var(--space-4) var(--space-5);
}

.creator-section .section-title {
  margin-bottom: var(--space-3);
}

.creator-grid {
  display: grid;
  gap: var(--space-2);
}

.creator-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.creator-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.creator-item:first-child {
  padding-top: 0;
}

.creator-label {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  font-weight: 500;
}

.creator-value {
  font-size: 0.8125rem;
  color: var(--color-text-primary);
  font-weight: 500;
  text-align: right;
}

/* ========================================
   DESCRIPTION SECTION - Note Style
   ======================================== */

.description-section {
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-tertiary) 100%);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.description-section .section-title {
  margin-bottom: var(--space-3);
  color: var(--color-text-secondary);
  font-size: 0.625rem;
}

.description-text {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--color-text-primary);
  margin: 0;
  font-style: italic;
}

.description-text:empty {
  display: none;
}

.description-empty {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
  padding: var(--space-4) 0;
  margin: 0;
}

.description-text:not(:empty) + .description-empty {
  display: none;
}

.creator-social {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border-light);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: flex-end;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  padding: 0;
  background: transparent;
  border-radius: 0;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all 0.15s ease;
  border: none;
}

.social-link svg {
  width: 21px;
  height: 21px;
}

.social-link:hover {
  background: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  border-color: var(--color-accent);
  transform: translateY(-1px);
}

/* Platform-specific hover colors */
.social-link.instagram:hover {
  color: #E1306C;
  border-color: #E1306C;
}

.social-link.twitter:hover,
.social-link.x:hover {
  color: #000000;
  border-color: #000000;
}

.social-link.linkedin:hover {
  color: #0077B5;
  border-color: #0077B5;
}

.social-link.facebook:hover {
  color: #1877F2;
  border-color: #1877F2;
}

.social-link.youtube:hover {
  color: #FF0000;
  border-color: #FF0000;
}

.social-link.github:hover {
  color: #333333;
  border-color: #333333;
}

.social-link.behance:hover {
  color: #1769FF;
  border-color: #1769FF;
}

.social-link.dribbble:hover {
  color: #EA4C89;
  border-color: #EA4C89;
}

.social-link.tiktok:hover {
  color: #000000;
  border-color: #000000;
}

.social-link.flickr:hover {
  color: #0063DC;
  border-color: #0063DC;
}

.social-link.unsplash:hover {
  color: #000000;
  border-color: #000000;
}

.social-link.website:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* ========================================
   LOADING & ERROR STATES
   ======================================== */

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250, 250, 250, 0.9);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  gap: var(--space-4);
}

[data-theme="dark"] .loading-overlay {
  background: rgba(15, 15, 15, 0.9);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
}

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

.loading-overlay p {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.error-message {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-error);
  color: white;
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  z-index: 1001;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 900px) {
  body {
    overflow: auto;
    height: auto;
  }

  .container {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  /* Mobile: Reorder elements using display: contents on parent and order on children */
  .main-content {
    order: 2;
    min-height: 50vh;
    position: relative;
  }

  .sidebar {
    order: 1;
    width: 100%;
    border-right: none;
    border-top: none;
    border-bottom: 1px solid var(--color-border);
    max-height: none;
    flex: none;
    display: contents; /* Allow children to be reordered independently */
  }

  /* Sidebar children ordering for mobile: toolbar, header, content */
  .sidebar-toolbar {
    order: 1;
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .image-title-header {
    order: 2;
    display: block !important;
  }

  .sidebar-header {
    order: 3;
    border-top: 1px solid var(--color-border);
  }

  .sidebar-content {
    order: 4;
    overflow: visible;
    padding-bottom: var(--space-12);
    display: flex;
    flex-direction: column;
  }

  /* Content Credentials Status is first within sidebar-content */
  .cc-status-section {
    order: 1;
  }

  /* Source Image (thumbnail) moved to position 5 */
  .overview-section {
    order: 5;
  }

  .provenance-section {
    order: 6;
  }

  .technical-section {
    order: 7;
  }

  .creator-section {
    order: 8;
  }

  .description-section {
    order: 9;
  }

  .framed-image {
    max-width: calc(100vw - var(--space-8) * 2);
    margin: 0 auto;
    display: block;
  }

  .welcome-zone {
    padding: 1rem;
    position: absolute;
    inset: 0;
    min-height: auto;
  }

  .welcome-content {
    max-width: 100%;
    gap: 0.75rem;
  }

  .welcome-zone.hidden {
    display: none !important;
  }

  .cc-logo-large {
    width: 200px;
  }

  .welcome-tagline {
    font-size: 1.1rem;
  }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.hidden {
  display: none !important;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-success {
  color: var(--color-success);
}

.text-warning {
  color: var(--color-warning);
}

.text-error {
  color: var(--color-error);
}
