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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(135deg, #0a1628 0%, #102a3a 40%, #1a2a40 70%, #1e1a3a 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Background layer */
#background-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
}

#bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Columns container */
#columns-container {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding: 40px 60px;
}

/* Individual column */
.video-column {
  position: relative;
  aspect-ratio: 9 / 16;
  height: 90%;
  max-height: 90vh;
  cursor: pointer;
  flex-shrink: 0;
}

/* Video wrapper clips the video to the rounded frame */
.video-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
}

/* Video elements -- inset from glass frame edge */
.video-wrapper video {
  position: absolute;
  inset: 14px;
  width: calc(100% - 28px);
  height: calc(100% - 28px);
  object-fit: cover;
  border-radius: 20px;
}

.video-wrapper video.hidden {
  visibility: hidden;
}

/* Glass outline overlay */
.glass-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

/* Loading spinner -- matches video inset */
.loading-overlay {
  position: absolute;
  inset: 14px;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 20px;
}

.loading-overlay.hidden {
  display: none;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error overlay -- matches video inset */
.error-overlay {
  position: absolute;
  inset: 14px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  text-align: center;
  padding: 20px;
}

.error-overlay.hidden {
  display: none;
}

/* No videos message */
#no-videos {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 24px;
}

#no-videos.hidden {
  display: none;
}

