* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: transparent;
}

body {
  overflow: hidden;
  font-family: Arial, Helvetica, sans-serif;
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: transparent;
  isolation: isolate;
}

/* Transparent WebGL canvas. The Wix page remains visible behind it. */
#scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* CSS3DRenderer is layered above WebGL; only the actual screen iframe accepts input. */
.css3d-layer {
  position: absolute !important;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.css3d-layer > div {
  pointer-events: none;
}

.screen-surface {
  width: 1000px;
  height: 2100px;
  overflow: hidden;
  position: relative;
  border-radius: 9%;
  background: #050505;
  pointer-events: auto !important;
  transform-style: preserve-3d;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.screen-surface iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #050505;
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms ease;
}

.screen-surface.is-playing iframe {
  opacity: 1;
  pointer-events: auto;
}

.screen-activate {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 190px;
  min-height: 190px;
  border: 1px solid rgba(255,255,255,.62);
  border-radius: 50%;
  color: #fff;
  background: rgba(12, 12, 14, .52);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 45px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  cursor: pointer;
  font-size: 26px;
}

.play-icon { font-size: 54px; line-height: 1; }
.activate-label { font-size: 25px; letter-spacing: .02em; }
.screen-surface.is-playing .screen-activate { display: none; }

.loading {
  position: absolute;
  z-index: 5;
  color: #777;
  font-size: 13px;
  pointer-events: none;
}

.video-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  width: min(92%, 420px);
  padding: 11px 13px;
  border: 1px solid rgba(120,120,120,.22);
  border-radius: 14px;
  color: #fff;
  background: rgba(15,15,17,.88);
  box-shadow: 0 8px 28px rgba(0,0,0,.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.video-controls[hidden] { display: none; }
.control-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: 12px;
  margin-bottom: 9px;
}
.control-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.control-actions button {
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 9px;
  padding: 7px 11px;
  color: #fff;
  background: rgba(255,255,255,.10);
  font-size: 11px;
  cursor: pointer;
}
.control-actions button:hover { background: rgba(255,255,255,.2); }
#videoCount { min-width: 34px; text-align: center; font-size: 11px; }
.control-actions .close-button { margin-left: auto; }

.hint {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 8px;
  margin: 0;
  text-align: center;
  color: rgba(110,110,110,.82);
  font-size: 11px;
  pointer-events: none;
}

@media (max-width: 500px) {
  .stage { min-height: 360px; }
  .video-controls { bottom: 28px; width: min(94%, 390px); }
  .control-actions { gap: 6px; }
  .control-actions button { padding: 7px 8px; }
  .hint { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .screen-surface iframe { transition: none; }
}
