@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500&display=swap');

:root {
  --ink: #12141c;
  --panel: #1c2030;
  --panel-raised: #232840;
  --line: #343a52;
  --text: #e8e6df;
  --text-muted: #8b8fa3;
  --accent: #e0a458;
  --accent-dim: #7a5c34;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--text);
  font-family: 'IBM Plex Sans', sans-serif;
  overflow: hidden;
}

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  z-index: 10;
  pointer-events: none;
}

.topbar h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.5px;
  margin: 0;
  color: var(--text);
}

.topbar .sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 12px;
}

.map-stage {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#us-map {
  width: 90vw;
  max-width: 1400px;
  height: auto;
}

#us-map path {
  fill: #232840;
  stroke: #34394d;
  stroke-width: 1;
  transition: fill 0.15s ease;
}

#us-map path.has-trips {
  fill: #2b3050;
}

#us-map path:hover {
  fill: #323957;
}

.pin {
  cursor: pointer;
}

.pin circle.dot {
  fill: var(--accent);
}

.pin circle.halo {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  opacity: 0.5;
  animation: pulse 2.4s ease-out infinite;
  transform-origin: center;
}

@keyframes pulse {
  0%   { r: 4; opacity: 0.6; }
  100% { r: 14; opacity: 0; }
}

.pin:hover circle.dot {
  fill: #f0bd7c;
}

/* Side panel */
.panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 420px;
  max-width: 92vw;
  background: var(--panel);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 20;
  display: flex;
  flex-direction: column;
}

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

.panel-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-header .trip-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 28px;
  margin: 0 0 4px;
}

.panel-header .trip-date {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.panel-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}

.panel-close:hover { color: var(--text); }

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 32px;
}

.media-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.media-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 3px;
  background: var(--panel-raised);
  cursor: pointer;
  border: 1px solid var(--line);
}

.media-item img,
.media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-item .video-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(18,20,28,0.75);
  color: var(--text);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 2px;
}

.panel-empty, .panel-loading {
  color: var(--text-muted);
  font-size: 14px;
  padding: 40px 0;
  text-align: center;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,11,16,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
  padding: 40px;
}

.lightbox.open { display: flex; }

.lightbox img, .lightbox video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
}

.lightbox-close {
  position: fixed;
  top: 24px;
  right: 28px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
}

@media (max-width: 640px) {
  .topbar { padding: 0 16px; }
  .panel { width: 100vw; }
}
