/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  position: fixed;
  overflow: hidden;
  width: 100%;
  height: 100%;
  background: #000;
  color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

/* ===== View System ===== */
.view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease-in-out;
  z-index: 1;
}

.view.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

/* ===== Clock Overlay ===== */
#clock-overlay {
  position: fixed;
  top: 24px;
  left: 32px;
  font-size: 48px;
  font-weight: 200;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  z-index: 50;
  pointer-events: none;
}

/* ===== Weather Overlay ===== */
#weather-overlay {
  position: fixed;
  top: 24px;
  right: 32px;
  text-align: right;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  z-index: 50;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

#weather-overlay.hidden {
  opacity: 0;
}

/* ===== Routine Overlay ===== */
#routine-overlay {
  position: fixed;
  bottom: 32px;
  left: 32px;
  right: 32px;
  z-index: 50;
  pointer-events: none;
}

/* ===== Dimmer Overlay ===== */
#dimmer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  pointer-events: none;
  transition: background 3s ease-in-out;
  z-index: 90;
}

#dimmer-overlay.active {
  background: rgba(0, 0, 0, 0.75);
}

/* ===== Status Indicator ===== */
#status-indicator {
  position: fixed;
  bottom: 8px;
  left: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4caf50;
  opacity: 0.5;
  z-index: 100;
  pointer-events: none;
  transition: background 0.3s, opacity 0.3s;
}

#status-indicator.warning {
  background: #ff9800;
  opacity: 0.8;
}

#status-indicator.error {
  background: #f44336;
  opacity: 1;
}

/* ===== Back Button ===== */
#back-to-screensaver {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
}

#back-to-screensaver::after {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  border-left: 2px solid rgba(255, 255, 255, 0.7);
  border-bottom: 2px solid rgba(255, 255, 255, 0.7);
  transform: rotate(45deg) translate(2px, -2px);
}

#back-to-screensaver:active {
  background: rgba(255, 255, 255, 0.25);
}

/* ===== Scrollbar hide ===== */
::-webkit-scrollbar {
  display: none;
}
