@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

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

html, body {
  width: 100%; height: 100%;
  background: #000;
  color: #4cff6a;
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.1rem;
  overflow: hidden;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  font-smooth: never;
}

/* ── Hide all Cesium UI chrome ── */
.cesium-widget-credits, .cesium-credit-logoContainer, .cesium-credit-textContainer,
.cesium-viewer-toolbar, .cesium-viewer-animationContainer, .cesium-viewer-timelineContainer,
.cesium-viewer-bottom, .cesium-viewer-fullscreenContainer,
.cesium-navigationHelpButton-wrapper, .cesium-viewer-geocoderContainer,
.cesium-infoBox, .cesium-selection-wrapper { display: none !important; }

#cesiumContainer { position: fixed; inset: 0; width: 100vw; height: 100vh; }

/* ── CRT scanline overlay — media panel and overlay only, not nav/timeline ── */
#media-panel::before, #overlay::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none; z-index: 999;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.07) 2px, rgba(0,0,0,0.07) 4px
  );
}

/* ── Nav ── */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px 17px;
  background: none;
  border-bottom: 1px solid rgba(76,255,106,0.08);
}

#nav-logo {
  font-family: 'Share Tech Mono', monospace;
  font-size: 2.2rem; font-weight: 700; letter-spacing: 0.14em;
  color: #4cff6a;
  text-shadow: 0 0 22px rgba(76,255,106,0.55);
  cursor: pointer;
}

#nav-links { display: flex; gap: 40px; }

.nav-link {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(76,255,106,0.65); cursor: pointer;
  background: none; border: none;
  transition: color 0.2s, text-shadow 0.2s;
}
.nav-link:hover, .nav-link.active {
  color: #4cff6a;
  text-shadow: 0 0 10px rgba(76,255,106,0.6);
}

/* ── Media panel ── */
#media-panel {
  position: fixed; top: 0; right: -500px; width: 460px; height: 100vh;
  background: rgba(4,12,4,0.97);
  border-left: 1px solid rgba(76,255,106,0.2);
  z-index: 200;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
}
#media-panel.open { right: 0; }

#panel-close {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 32px; height: 32px;
  background: rgba(76,255,106,0.06);
  border: 1px solid rgba(76,255,106,0.3);
  color: rgba(76,255,106,0.8); font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  font-family: 'Share Tech Mono', monospace;
}
#panel-close:hover {
  background: rgba(76,255,106,0.14);
  color: #4cff6a;
  text-shadow: 0 0 8px rgba(76,255,106,0.7);
}

#panel-hero {
  width: 100%; height: 240px; flex-shrink: 0;
  background: rgba(76,255,106,0.03);
  border-bottom: 1px solid rgba(76,255,106,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; letter-spacing: 0.2em;
  color: rgba(76,255,106,0.2);
  overflow: hidden;
}
#panel-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

#panel-body { flex: 1; overflow-y: auto; padding: 32px 32px 52px; }

/* custom scrollbar */
#panel-body::-webkit-scrollbar { width: 3px; }
#panel-body::-webkit-scrollbar-track { background: transparent; }
#panel-body::-webkit-scrollbar-thumb { background: rgba(76,255,106,0.25); }

#panel-location {
  font-family: 'Share Tech Mono', monospace;
  font-size: 2.8rem; letter-spacing: 0.05em;
  color: #4cff6a;
  text-shadow: 0 0 20px rgba(76,255,106,0.45);
  margin-bottom: 6px; line-height: 1.05;
}

#panel-date {
  font-size: 1.25rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: rgba(76,255,106,0.6); margin-bottom: 26px;
}

#panel-story {
  font-size: 1.3rem; line-height: 1.75;
  color: rgba(76,255,106,0.9);
  margin-bottom: 30px;
  border-left: 2px solid rgba(76,255,106,0.35);
  padding-left: 16px;
  letter-spacing: 0.02em;
}

/* ── Panel prev/next nav ── */
#panel-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 32px 30px;
  border-top: 1px solid rgba(76,255,106,0.12);
  flex-shrink: 0;
}

#panel-prev, #panel-next {
  background: none; border: 1px solid rgba(76,255,106,0.28);
  color: rgba(76,255,106,0.78);
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.2rem; letter-spacing: 0.2em;
  padding: 8px 18px; cursor: pointer;
  transition: color 0.2s, border-color 0.2s, text-shadow 0.2s;
}
#panel-prev:hover, #panel-next:hover {
  color: #4cff6a;
  border-color: rgba(76,255,106,0.6);
  text-shadow: 0 0 8px rgba(76,255,106,0.4);
}
#panel-prev:disabled, #panel-next:disabled {
  opacity: 0.2; cursor: default; pointer-events: none;
}

/* ── Overlay (About / Charities / Contact) ── */
#overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,6,0,0.95);
  display: none; align-items: center; justify-content: center;
  padding: 60px 24px;
}
#overlay.open { display: flex; }

#overlay-close {
  position: absolute; top: 26px; right: 32px;
  background: none; border: none;
  color: rgba(76,255,106,0.65);
  font-size: 1.8rem; cursor: pointer;
  font-family: 'Share Tech Mono', monospace;
  transition: color 0.2s, text-shadow 0.2s;
}
#overlay-close:hover {
  color: #4cff6a;
  text-shadow: 0 0 10px rgba(76,255,106,0.6);
}

#overlay-content { max-width: 660px; width: 100%; }

#overlay-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 3rem; letter-spacing: 0.08em;
  color: #4cff6a;
  text-shadow: 0 0 24px rgba(76,255,106,0.35);
  margin-bottom: 32px;
}

#overlay-body {
  font-size: 1.35rem; line-height: 1.7;
  color: rgba(76,255,106,0.85);
}
#overlay-body p { margin-bottom: 18px; }
#overlay-body a { color: #4cff6a; text-decoration: none; }
#overlay-body a:hover { text-shadow: 0 0 8px rgba(76,255,106,0.6); }
#overlay-body em { font-style: normal; color: rgba(76,255,106,0.85); }

/* ── Entry poll overlay ── */
#entry-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: transparent;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 24px;
  user-select: none;
  pointer-events: none;
}
#entry-overlay.hidden { display: none; }
#entry-buttons, .entry-btn { pointer-events: auto; }
#entry-question { user-select: none; }

#entry-question-wrap {
  max-width: 900px; width: 100%;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}
#entry-question-wrap.visible { opacity: 1; }

#entry-question-text-wrap {
  display: block; text-align: center; margin-bottom: 28px;
}

#entry-question {
  font-family: 'Share Tech Mono', monospace;
  font-size: 2.2rem; line-height: 1.3; letter-spacing: 0.05em;
  color: #4cff6a;
  text-shadow: 0 0 28px rgba(76,255,106,0.45);
  display: inline-block;
  width: 860px;
  max-width: 90vw;
  text-align: center;
}

#entry-buttons {
  display: flex; gap: 32px; justify-content: center;
}

.entry-btn {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.6rem; letter-spacing: 0.35em;
  color: rgba(76,255,106,0.8);
  background: rgba(76,255,106,0.03);
  border: 1px solid rgba(76,255,106,0.2);
  padding: 14px 56px;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 0 0 18px rgba(76,255,106,0.04), inset 0 0 12px rgba(76,255,106,0.03);
  transition: color 0.3s, border-color 0.3s, text-shadow 0.3s, background 0.3s, box-shadow 0.3s;
  animation: btn-breathe 4s ease-in-out infinite;
}
@keyframes btn-breathe {
  0%, 100% { box-shadow: 0 0 18px rgba(76,255,106,0.04), inset 0 0 12px rgba(76,255,106,0.03); }
  50%       { box-shadow: 0 0 32px rgba(76,255,106,0.12), inset 0 0 20px rgba(76,255,106,0.06); }
}
.entry-btn:hover {
  color: #4cff6a;
  border-color: rgba(76,255,106,0.6);
  background: rgba(76,255,106,0.07);
  text-shadow: 0 0 16px rgba(76,255,106,0.7);
  box-shadow: 0 0 40px rgba(76,255,106,0.2), inset 0 0 24px rgba(76,255,106,0.08);
  animation: none;
}
.entry-btn:active {
  background: rgba(76,255,106,0.14);
  transform: scale(0.97);
}

/* Ensure question content renders above other fixed elements */
#entry-question-wrap { position: relative; z-index: 2; }

/* ── Entry poll typewriter cursor ── */
#entry-question.show-cursor::after {
  content: '▌';
  color: #4cff6a;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ── Pin tooltip ── */
#pin-tooltip {
  position: fixed; z-index: 400; pointer-events: none;
  padding: 6px 16px;
  background: rgba(4,12,4,0.95);
  border: 1px solid rgba(76,255,106,0.4);
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.35rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: #4cff6a;
  text-shadow: 0 0 8px rgba(76,255,106,0.5);
  white-space: nowrap;
  opacity: 0; transition: opacity 0.15s;
}
#pin-tooltip.visible { opacity: 1; }

