:root {
  /* Earth & Forest Palette */
  --deep-forest: #0f1a0f;
  --forest-shadow: #1a2819;
  --aged-parchment: #f4f1e8;
  --warm-cream: #ebe6d9;
  --faded-ink: #3d3a35;
  --muted-gold: #a8935c;
  --autumn-amber: #c4a35a;
  --moss: #5c6b4f;
  --bark: #6b5c4a;
  --charcoal: #2d2d2d;

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --header-height: 123px;
  --panel-width: 420px;
  --timeline-height: 140px;
}

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

body {
  font-family: var(--font-display);
  background: var(--deep-forest);
  color: var(--aged-parchment);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* Subtle paper texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 10000;
}

/* =====================
   MAP CONTAINER
===================== */
#map {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1), right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-open #map {
  right: var(--panel-width);
}

.mapboxgl-ctrl-logo,
.mapboxgl-ctrl-attrib {
  opacity: 0.5;
}

/* =====================
   HEADER / TITLE BAR
===================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 24px 32px;
  background: rgba(15, 26, 15, 0.95);
  border-bottom: 1px solid rgba(168, 147, 92, 0.2);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-open .header {
  right: var(--panel-width);
}

.header > * {
  pointer-events: auto;
}

.title-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.title-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--aged-parchment);
  opacity: 0.6;
}

.title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--aged-parchment);
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.title-accent {
  color: var(--muted-gold);
}

.title-year {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--aged-parchment);
  opacity: 0.5;
}

.subtitle {
  font-family: var(--font-display);
  font-size: 14px;
  font-style: italic;
  color: var(--muted-gold);
  margin-top: 2px;
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.layer-toggle {
  display: flex;
  background: rgba(15, 26, 15, 0.8);
  border: 1px solid rgba(168, 147, 92, 0.2);
  border-radius: 4px;
  overflow: hidden;
}

.layer-btn {
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--moss);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.layer-btn:not(:last-child) {
  border-right: 1px solid rgba(168, 147, 92, 0.2);
}

.layer-btn:hover {
  color: var(--aged-parchment);
  background: rgba(168, 147, 92, 0.1);
}

.layer-btn.active {
  color: var(--muted-gold);
  background: rgba(168, 147, 92, 0.15);
}

.layer-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: var(--muted-gold);
}

/* Stats Badge */
.stats-badge {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
  background: rgba(15, 26, 15, 0.8);
  border: 1px solid rgba(168, 147, 92, 0.2);
  border-radius: 4px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--aged-parchment);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--moss);
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: rgba(168, 147, 92, 0.3);
}

/* =====================
   TIMELINE PANEL
===================== */
.timeline-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: linear-gradient(to top,
    rgba(15, 26, 15, 0.98) 0%,
    rgba(15, 26, 15, 0.95) 70%,
    rgba(15, 26, 15, 0) 100%);
  padding: 40px 32px 28px;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-open .timeline-panel {
  right: var(--panel-width);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
}

.timeline-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--moss);
}

.timeline-range {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--aged-parchment);
}

.timeline-range-highlight {
  color: var(--muted-gold);
  font-weight: 500;
}

/* Timeline Track */
.timeline-track-container {
  position: relative;
  height: 60px;
  margin-bottom: 16px;
}

.timeline-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 8px;
  background: rgba(92, 107, 79, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.timeline-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 65%;
  background: linear-gradient(90deg,
    var(--moss) 0%,
    var(--muted-gold) 100%);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Timeline Markers (representing photo clusters) */
.timeline-markers {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 40px;
  display: flex;
  align-items: center;
}

.timeline-marker {
  position: absolute;
  width: 3px;
  background: var(--aged-parchment);
  border-radius: 2px;
  opacity: 0.6;
  transition: all 0.2s ease;
  cursor: pointer;
}

.timeline-marker:hover {
  opacity: 1;
  transform: scaleY(1.2);
}

.timeline-marker.active {
  background: var(--muted-gold);
  opacity: 1;
}

/* Range Handles */
.range-handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 36px;
  background: var(--aged-parchment);
  border: 2px solid var(--muted-gold);
  border-radius: 4px;
  cursor: ew-resize;
  z-index: 10;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.range-handle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 12px;
  background: repeating-linear-gradient(
    to bottom,
    var(--bark) 0px,
    var(--bark) 2px,
    transparent 2px,
    transparent 4px
  );
}

.range-handle:hover,
.range-handle:active {
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 4px 20px rgba(168, 147, 92, 0.3);
}

.range-handle.start {
  left: 10%;
}

.range-handle.end {
  left: 75%;
}

/* Timeline Labels */
.timeline-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
}

.timeline-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--moss);
  opacity: 0.8;
}

/* =====================
   PHOTO SIDEBAR
===================== */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--panel-width);
  background: rgba(15, 26, 15, 0.96);
  border-left: 1px solid rgba(168, 147, 92, 0.2);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar-toggle {
  position: fixed;
  right: 32px;
  bottom: 180px;
  z-index: 150;
  width: 56px;
  height: 56px;
  background: rgba(15, 26, 15, 0.9);
  border: 1px solid rgba(168, 147, 92, 0.3);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  color: var(--aged-parchment);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.sidebar-toggle:hover {
  background: rgba(168, 147, 92, 0.2);
  border-color: var(--muted-gold);
  transform: scale(1.05);
}

.sidebar-toggle svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

body.sidebar-open .sidebar-toggle {
  right: calc(var(--panel-width) + 32px);
}

/* Sidebar Header */
.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid rgba(168, 147, 92, 0.15);
  flex-shrink: 0;
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--aged-parchment);
  margin-bottom: 4px;
}

.sidebar-subtitle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--moss);
  letter-spacing: 0.05em;
}

.sidebar-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid rgba(168, 147, 92, 0.2);
  border-radius: 4px;
  color: var(--moss);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.sidebar-close:hover {
  background: rgba(168, 147, 92, 0.1);
  color: var(--aged-parchment);
}

/* Photo Grid */
.photo-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: flex-start;
}

.photo-grid::-webkit-scrollbar {
  width: 6px;
}

.photo-grid::-webkit-scrollbar-track {
  background: rgba(92, 107, 79, 0.1);
}

.photo-grid::-webkit-scrollbar-thumb {
  background: rgba(168, 147, 92, 0.3);
  border-radius: 3px;
}

.photo-card {
  position: relative;
  width: calc(50% - 6px);
  aspect-ratio: 4/3;
  background: var(--forest-shadow);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.photo-card:hover img {
  opacity: 1;
}

.photo-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(15, 26, 15, 0.9) 0%,
    transparent 50%);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.photo-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted-gold);
  letter-spacing: 0.05em;
}

.photo-coords {
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--moss);
  margin-top: 2px;
}

/* Filter Tags */
.filter-section {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(168, 147, 92, 0.15);
  flex-shrink: 0;
}

.filter-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 10px;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tag {
  padding: 6px 12px;
  background: rgba(92, 107, 79, 0.2);
  border: 1px solid rgba(168, 147, 92, 0.2);
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--aged-parchment);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-tag:hover {
  background: rgba(168, 147, 92, 0.15);
  border-color: var(--muted-gold);
}

.filter-tag.active {
  background: rgba(168, 147, 92, 0.25);
  border-color: var(--muted-gold);
  color: var(--muted-gold);
}

/* =====================
   COORDINATES DISPLAY
===================== */
.coords-display {
  position: fixed;
  bottom: 180px;
  left: 32px;
  z-index: 100;
  padding: 12px 16px;
  background: rgba(15, 26, 15, 0.85);
  border: 1px solid rgba(168, 147, 92, 0.2);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--moss);
}

.coords-display span {
  color: var(--aged-parchment);
}

/* =====================
   OVERLAY CONTROLS
===================== */
.overlay-toggle.active {
  background: rgba(168, 147, 92, 0.3);
  border-color: var(--muted-gold);
}

.overlay-panel {
  position: fixed;
  top: 100px;
  left: 32px;
  width: 280px;
  background: rgba(15, 26, 15, 0.95);
  border: 1px solid rgba(168, 147, 92, 0.3);
  border-radius: 8px;
  z-index: 100;
  display: none;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.overlay-panel.open {
  display: flex;
}

.overlay-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid rgba(168, 147, 92, 0.2);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--aged-parchment);
}

.overlay-panel-close {
  background: none;
  border: none;
  color: var(--moss);
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.overlay-panel-close:hover {
  color: var(--aged-parchment);
}

.overlay-control {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(168, 147, 92, 0.1);
}

.overlay-control:last-of-type {
  border-bottom: none;
}

.overlay-control label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 8px;
}

.overlay-control input[type="range"] {
  width: calc(100% - 50px);
  height: 4px;
  background: rgba(92, 107, 79, 0.3);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  vertical-align: middle;
}

.overlay-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: var(--muted-gold);
  border-radius: 50%;
  cursor: pointer;
}

.overlay-value {
  display: inline-block;
  width: 45px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--aged-parchment);
  vertical-align: middle;
  margin-left: 8px;
}

.overlay-actions {
  padding: 12px 16px;
  border-top: 1px solid rgba(168, 147, 92, 0.2);
}

.overlay-reset {
  width: 100%;
  padding: 8px 16px;
  background: rgba(92, 107, 79, 0.2);
  border: 1px solid rgba(168, 147, 92, 0.2);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--aged-parchment);
  cursor: pointer;
  transition: all 0.2s ease;
}

.overlay-reset:hover,
.overlay-export:hover {
  background: rgba(168, 147, 92, 0.2);
  border-color: var(--muted-gold);
}

.overlay-actions {
  display: flex;
  gap: 8px;
}

.overlay-reset,
.overlay-export {
  flex: 1;
}

.overlay-export-output {
  display: none;
  padding: 12px 16px;
  border-top: 1px solid rgba(168, 147, 92, 0.2);
}

.overlay-export-output.visible {
  display: block;
}

.overlay-export-output pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 12px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--aged-parchment);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  margin: 0 0 8px 0;
}

.overlay-export-output button {
  width: 100%;
  padding: 6px 12px;
  background: rgba(92, 107, 79, 0.3);
  border: 1px solid rgba(168, 147, 92, 0.2);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--aged-parchment);
  cursor: pointer;
}

.overlay-export-output button:hover {
  background: rgba(168, 147, 92, 0.2);
}

.overlay-hint {
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--moss);
  line-height: 1.5;
  border-bottom: 1px solid rgba(168, 147, 92, 0.1);
}

/* Corner markers for overlay adjustment */
.overlay-corner {
  width: 20px;
  height: 20px;
  background: var(--muted-gold);
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: move;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.overlay-corner:hover {
  background: var(--autumn-amber);
  transform: scale(1.2);
}

/* Overlay opacity control */
.overlay-opacity-control {
  position: fixed;
  top: 90px;
  right: calc(var(--panel-width) + 20px);
  background: rgba(15, 26, 15, 0.95);
  border: 1px solid rgba(168, 147, 92, 0.3);
  border-radius: 8px;
  padding: 12px 16px;
  display: none;
  align-items: center;
  gap: 12px;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body:not(.sidebar-open) .overlay-opacity-control {
  right: 20px;
}

.overlay-opacity-control.visible {
  display: flex;
}

.overlay-opacity-control label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--moss);
  white-space: nowrap;
}

.overlay-opacity-control input[type="range"] {
  width: 120px;
  height: 4px;
  background: rgba(92, 107, 79, 0.3);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
}

.overlay-opacity-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: var(--muted-gold);
  border-radius: 50%;
  cursor: pointer;
}

.overlay-opacity-value {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--aged-parchment);
  min-width: 40px;
  text-align: right;
}

/* =====================
   LOADING STATE
===================== */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--deep-forest);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-text {
  font-family: var(--font-display);
  font-size: 24px;
  font-style: italic;
  color: var(--moss);
}

.loading-bar {
  width: 200px;
  height: 2px;
  background: rgba(92, 107, 79, 0.3);
  border-radius: 1px;
  overflow: hidden;
}

.loading-bar-progress {
  height: 100%;
  width: 0%;
  background: var(--muted-gold);
  animation: loading 2s ease-in-out infinite;
}

@keyframes loading {
  0% { width: 0%; margin-left: 0; }
  50% { width: 60%; margin-left: 20%; }
  100% { width: 0%; margin-left: 100%; }
}

/* =====================
   LIGHTBOX (Left Panel)
===================== */
/* Lightbox - Transparent overlay over the map */
.lightbox {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: var(--timeline-height);
  width: 50%;
  z-index: 90;
  background: rgba(15, 26, 15, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 32px;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox.sidebar-open {
  width: calc(50% - var(--panel-width) / 2);
}

.lightbox.open {
  transform: translateX(0);
}

/* Map stays full width - lightbox overlays it */

.lightbox-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.lightbox-image-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
  min-height: 0;
  gap: 12px;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  background: transparent;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(15, 26, 15, 0.8);
  border: 1px solid rgba(168, 147, 92, 0.3);
  border-radius: 50%;
  color: var(--aged-parchment);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.lightbox-close:hover {
  background: rgba(168, 147, 92, 0.2);
  border-color: var(--muted-gold);
  transform: scale(1.1);
}

.lightbox-close svg {
  width: 18px;
  height: 18px;
}

.lightbox-fullscreen {
  position: absolute;
  top: 12px;
  right: 56px;
  width: 36px;
  height: 36px;
  background: rgba(15, 26, 15, 0.8);
  border: 1px solid rgba(168, 147, 92, 0.3);
  border-radius: 50%;
  color: var(--aged-parchment);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.lightbox-fullscreen:hover {
  background: rgba(168, 147, 92, 0.2);
  border-color: var(--muted-gold);
  transform: scale(1.1);
}

.lightbox-fullscreen svg {
  width: 18px;
  height: 18px;
}

.lightbox-fullscreen .icon-collapse {
  display: none;
}

/* Fullscreen mode */
.lightbox.fullscreen {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  z-index: 300;
  background: rgba(15, 26, 15, 0.95);
  padding: 24px;
}

.lightbox.fullscreen .lightbox-fullscreen .icon-expand {
  display: none;
}

.lightbox.fullscreen .lightbox-fullscreen .icon-collapse {
  display: block;
}

/* Navigation arrows */
.lightbox-nav {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(92, 107, 79, 0.3);
  border: 1px solid rgba(168, 147, 92, 0.3);
  border-radius: 50%;
  color: var(--aged-parchment);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(168, 147, 92, 0.2);
  border-color: var(--muted-gold);
}

.lightbox-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.lightbox-nav svg {
  width: 18px;
  height: 18px;
}

/* Photo info panel */
.lightbox-info {
  flex-shrink: 0;
  padding: 12px 16px;
  background: rgba(26, 40, 25, 0.6);
  border: 1px solid rgba(168, 147, 92, 0.25);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.lightbox-info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.lightbox-info-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--moss);
}

.lightbox-info-value {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--aged-parchment);
}

.lightbox-info-value.highlight {
  color: var(--muted-gold);
}

.lightbox-counter {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--moss);
}

/* =====================
   RESPONSIVE
===================== */
@media (max-width: 768px) {
  :root {
    --panel-width: 100%;
  }

  .header {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }

  .header-controls {
    width: 100%;
    justify-content: space-between;
  }

  .stats-badge {
    display: none;
  }

  .timeline-panel {
    padding: 24px 16px 20px;
  }

  .sidebar-toggle {
    right: 16px;
    bottom: 160px;
  }

  .coords-display {
    display: none;
  }

  .lightbox {
    width: 100%;
    top: 0;
    bottom: 0;
    z-index: 200;
    padding: 80px 16px 160px;
  }

  body.lightbox-open #map {
    left: 0;
  }
}
