﻿body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--scene-bg, none) no-repeat center center fixed;
  background-size: cover;
  height: 100vh;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 0;
}

#timerShell {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

#timerShell.is-hidden {
  display: none;
}

#timer {
  font-family: 'Share Tech Mono', monospace;
  font-size: 72px;
  margin: 20px 0;
  padding: 20px 40px;
  background-color: rgba(0, 0, 0, 0.7);
  border: 1px solid #555;
  border-radius: 4px;
  text-shadow: 0 0 6px #a00;
  color: #ff4a4a;
  z-index: 1;
  filter: blur(var(--timer-blur, 0px));
}

.now-playing {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid #555;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  z-index: 1;
  min-width: 320px;
  justify-content: center;
  flex-direction: column;
}

.now-playing .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #888;
}

.now-playing .title {
  font-size: 16px;
  color: #ffb3b3;
  text-shadow: 0 0 6px #a00;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.equalizer {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 28px;
}

.equalizer span {
  width: 4px;
  height: 6px;
  background: #ff4a4a;
  border-radius: 2px;
  opacity: 0.85;
  transition: height 0.08s linear;
  box-shadow: 0 0 6px rgba(255, 74, 74, 0.45);
}

.now-playing.is-visible { display: flex; }

.image-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5;
}

.image-overlay.is-visible { display: flex; }

.image-overlay.full {
  background: rgba(0, 0, 0, 0.75);
}

.image-overlay.small {
  pointer-events: auto;
}

.image-overlay .image-box {
  position: relative;
  width: 70vw;
  height: 70vh;
  max-width: 70vw;
  max-height: 70vh;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.4);
}

.image-overlay.small .image-box {
  width: 70vw;
  height: 70vh;
  max-width: 70vw;
  max-height: 70vh;
}

.image-overlay.full .image-box {
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  border: none;
  box-shadow: none;
  background: #4a6a5d40;
}

.image-overlay img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  pointer-events: none;
}

.grid-overlay.is-visible {
  display: block;
}

.grid-overlay-tile {
  width: 100vw;
  height: 100vh;
  background-image: url("../uploads/images/grid.png");
  background-repeat: repeat;
  background-size: var(--grid-scale, 100%) auto;
}

.bg-media-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.bg-video,
.bg-youtube {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 0;
  display: none;
  transform: translate(-50%, -50%);
}

.bg-video {
  width: 100vw;
  height: 100vh;
  object-fit: cover;
}

.bg-youtube {
  width: 177.78vh;
  height: 56.25vw;
  min-width: 100vw;
  min-height: 100vh;
}

.bg-media-layer.is-video .bg-video {
  display: block;
}

.bg-media-layer.is-youtube .bg-youtube {
  display: block;
}

