/* style.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  user-select: none;
}

html, body {
  height: 100%;
  overflow: hidden;
  background: #111;
  color: #eee;
}

#scene {
  display: block;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(to top, #87ceeb, #e0ffff);
}

.overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  pointer-events: none;
  font-size: 14px;
  color: #eee;
  text-shadow: 0 0 6px rgba(0,0,0,0.7);
  font-weight: 600;
  user-select: none;
}

.overlay .panel {
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.5);
  margin: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  max-width: 320px;
}

#race-info {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#timer {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

#positions {
  max-height: 160px;
  overflow-y: auto;
  font-family: monospace;
}

#dog-list {
  margin-top: 8px;
  font-size: 13px;
}

#camera-controls {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #eee;
  padding: 6px 10px;
  border-radius: 4px;
  transition: background-color 0.3s;
  font-weight: 600;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.btn.active {
  background: #4caf50;
  color: #fff;
}

#error-message {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255, 0, 0, 0.8);
  color: white;
  max-width: 260px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.hidden {
  display: none !important;
}

#loading-screen {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 22px;
  font-weight: 700;
  z-index: 9999;
}