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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0a0f;
  font-family: 'Courier New', monospace;
  color: #e0e0e0;
}

#webcam {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

#three-container {
  width: 100%;
  height: 100%;
}

#three-container canvas {
  display: block;
}

/* ─── Top Bar ──────────────────────────────────────────── */
#top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(10, 16, 30, 0.8);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(100, 180, 255, 0.15);
  z-index: 10;
}

#clock {
  font-size: 14px;
  color: #6ec6ff;
  letter-spacing: 0.05em;
}

#weather-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #88aacc;
}

#weather-icon {
  font-size: 14px;
}

#weather-temp {
  font-size: 12px;
  color: #6ec6ff;
  font-weight: bold;
}

#connection-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #88aacc;
}

#status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #44dd88;
  box-shadow: 0 0 6px #44dd88;
}

#status-dot.offline {
  background: #ff5555;
  box-shadow: 0 0 6px #ff5555;
}

/* ─── Boot-Info Panel ──────────────────────────────────── */
#boat-info {
  position: fixed;
  top: 52px;
  right: 12px;
  width: 220px;
  background: rgba(10, 16, 30, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(100, 180, 255, 0.2);
  border-radius: 8px;
  z-index: 10;
  transition: opacity 0.3s, transform 0.3s;
}

#boat-info.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
}

#boat-info-header {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(100, 180, 255, 0.1);
  gap: 6px;
}

#boat-info-title {
  flex: 1;
  font-size: 14px;
  font-weight: bold;
  color: #6ec6ff;
}

#boat-info-header button {
  background: none;
  border: 1px solid rgba(100, 180, 255, 0.2);
  color: #88aacc;
  cursor: pointer;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.2s;
}

#boat-info-header button:hover {
  background: rgba(100, 180, 255, 0.15);
  color: #ffffff;
}

#boat-info-body {
  padding: 10px 12px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
}

.info-label {
  color: #667a8a;
}

.info-row span:last-child {
  color: #c0d8e8;
  font-weight: bold;
}

/* ─── Follow-Mode Banner ───────────────────────────────── */
#follow-banner {
  position: fixed;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(10, 40, 80, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(100, 180, 255, 0.3);
  border-radius: 8px;
  z-index: 10;
  font-size: 13px;
  color: #6ec6ff;
  transition: opacity 0.3s, transform 0.3s;
}

#follow-banner.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-20px);
}

#follow-exit-btn {
  background: rgba(255, 85, 85, 0.2);
  border: 1px solid rgba(255, 85, 85, 0.4);
  color: #ff8888;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  transition: background 0.2s;
}

#follow-exit-btn:hover {
  background: rgba(255, 85, 85, 0.4);
}

/* ─── Timeline Bar ─────────────────────────────────────── */
#timeline-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 8px;
  background: rgba(10, 16, 30, 0.85);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(100, 180, 255, 0.15);
  z-index: 10;
  transition: border-color 0.3s;
}

#timeline-bar.history-active {
  border-top-color: rgba(255, 204, 0, 0.4);
}

.tl-btn {
  background: rgba(100, 180, 255, 0.1);
  border: 1px solid rgba(100, 180, 255, 0.2);
  color: #6ec6ff;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.tl-btn:hover {
  background: rgba(100, 180, 255, 0.25);
}

#tl-track {
  flex: 1;
  height: 28px;
  background: rgba(20, 30, 50, 0.6);
  border: 1px solid rgba(100, 180, 255, 0.1);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

#tl-events {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#tl-events .tl-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.8;
}

#tl-events .tl-dot.right {
  background: #44dd88;
  box-shadow: 0 0 4px #44dd88;
}

#tl-events .tl-dot.left {
  background: #ff5555;
  box-shadow: 0 0 4px #ff5555;
}

#tl-cursor {
  position: absolute;
  right: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background: #ffcc00;
  box-shadow: 0 0 6px #ffcc00;
  transition: left 0.3s ease, right 0.3s ease;
}

#tl-time-label {
  font-size: 11px;
  color: #88aacc;
  min-width: 52px;
  text-align: right;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
  user-select: none;
}

#tl-time-label:hover {
  background: rgba(100, 180, 255, 0.15);
  color: #6ec6ff;
}

#tl-time-label.history-mode {
  color: #ffcc00;
  font-weight: bold;
  background: rgba(255, 204, 0, 0.1);
}

#tl-time-label.history-mode:hover {
  background: rgba(255, 204, 0, 0.2);
}


/* ─── Status Overlay (Ladebildschirm) ──────────────────── */
#status-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.95);
  z-index: 100;
  transition: opacity 0.6s ease;
}

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

#status-text {
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  color: #6ec6ff;
  text-transform: uppercase;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
