/* Function-first styling. Just enough to be usable on a Chromebook. */
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; font-family: system-ui, Arial, sans-serif; background: #1d1d1d; color: #eee; }
button { font: inherit; padding: 0.4em 1em; cursor: pointer; }
a { color: #9cf; }

.screen { padding: 24px; max-width: 720px; margin: 0 auto; }
.screen h1 { margin-top: 0; }
#student-select { width: 100%; font-size: 1.1em; margin-bottom: 12px; }
#code-form input { font: inherit; padding: 0.3em 0.5em; margin: 0 8px; width: 10em; }
#code-form .error { color: #f8b84e; min-height: 1.2em; }
#google-button { min-height: 44px; margin: 12px 0; }
#google-signin .error { color: #f8b84e; min-height: 1.2em; }
#sign-out { margin-left: 6px; }
#layer-list { list-style: none; padding: 0; }
#layer-list li { border: 1px solid #555; padding: 12px; margin-bottom: 8px; cursor: pointer; background: #2a2a2a; }
#layer-list li:hover { background: #3a3a3a; }
#layer-list .meta { color: #aaa; font-size: 0.9em; }
.who { color: #aaa; }
.band { color: #aaa; font-size: 0.9em; }
.band select { font: inherit; margin-left: 6px; }

/* Viewer screen is full-bleed */
#screen-viewer { padding: 0; max-width: none; height: 100%; display: flex; flex-direction: column; }
#hud { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 14px; background: #111; font-size: 0.95em; }
.hud-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#hud-prompt { color: #ccc; }
.hud-right { display: flex; gap: 18px; align-items: center; white-space: nowrap; }
#hud-timer { font-family: monospace; font-size: 1.3em; }
#hud-timer.warn { color: #f8b84e; }
#hud-timer.over { color: #f66; }
#hud-banner { background: #3b5; color: #000; padding: 8px 14px; font-weight: bold; }
#hud-banner.timer { background: #f8b84e; }
#hud-objective { background: #f7f3ea; color: #111; padding: 10px 14px; border-bottom: 2px solid #b9a77a; }
#hud-objective h2 { margin: 0 0 6px; font-size: 1.05em; }
#hud-objective p { margin: 0 0 8px; white-space: pre-line; line-height: 1.4; max-width: 900px; }
#panorama { flex: 1; position: relative; min-height: 0; }

/* Hotspots: a single neutral marker, changes when found */
.clue-hotspot { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.85); border: 3px solid #333; box-shadow: 0 0 0 3px rgba(255,255,255,0.5); cursor: pointer; }
.clue-hotspot.found { background: rgba(80,200,120,0.9); }

/* Reveals */
.reveal { z-index: 20; }
#reveal-text { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); width: min(480px, 90%); background: #fff; color: #111; padding: 14px 16px; border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
#reveal-text p { margin: 0 0 10px; }

.lightbox { position: absolute; inset: 0; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; }
.lightbox-inner { text-align: center; max-width: 92%; max-height: 92%; }
.lightbox-inner img { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto 10px; background: #000; }
#reveal-zoom-caption { color: #ddd; margin: 0 0 10px; }

.panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 90%); background: #f7f3ea; color: #111; overflow-y: auto; padding: 16px 18px 24px; box-shadow: -4px 0 16px rgba(0,0,0,0.5); box-sizing: border-box; }
.panel-close { float: right; }
.panel h2 { margin-top: 4px; font-size: 1.2em; }
.panel img { max-width: 100%; margin-bottom: 10px; }
.panel pre { white-space: pre-wrap; font-family: Georgia, serif; font-size: 0.95em; line-height: 1.4; background: #fff; padding: 10px; border: 1px solid #ccc; }
.panel .source { font-style: italic; color: #555; font-size: 0.9em; }
.panel .original-toggle { margin-bottom: 8px; font-size: 0.9em; }
.panel h3 { margin-bottom: 6px; }
.happy { padding-left: 0; list-style: none; }
.happy li { margin-bottom: 10px; }
.happy .letter { display: inline-block; font-weight: bold; background: #333; color: #fff; border-radius: 4px; padding: 0 6px; margin-right: 6px; }
.happy .name { font-weight: bold; }

#panorama.status { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; color: #ddd; }
.pano-error { max-width: 520px; text-align: center; color: #f8b84e; }
.version { color: #666; font-size: 0.8em; margin-top: 24px; }
