#scene-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* so enlarged images don't spill out */
}

.scene-image {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  /* Always scale from top-left by default */
  transition: transform 0.9s cubic-bezier(.48,1.25,.76,1);
  width: 100%;
  /* or set height to 100% if you prefer, but keep aspect ratio in mind */
}
#scene-image-container {
  transform: scale(1);
  transform-origin: 50% 50%;
  height:100%;
}
  
/* Base image specific styles */
#scene-image-base {
  z-index: 1;
}

/* Overlay image specific styles */
#scene-image-overlay {
  z-index: 2;
  display: none;
}

/* Scene buttons: absolutely positioned over the video/image */
.scene-button-wrapper {
  position: absolute;
  z-index: 20;
}

.overlay-button-wrapper {
  position: absolute;
  z-index: 100;
}

.back-button {
  z-index: 100;
}

.scene-button {
  padding: calc(var(--base-unit) * 6);
  border: none;
  cursor: pointer;
  border: 1px solid var(--color-accent-2);
  border-radius: 64px;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-color: rgba(30, 35, 43, 0.4);
  transition: background-color 0.15s ease-in-out;
  gap: calc(var(--base-unit) * 2);
}

.scene-button:hover {
  background-color: rgba(30, 35, 43, 0.9);
}

.overlay-button {
  background-color: transparent;
}

.overlay-button:hover {
  background-color: var(--color-accent-2);
}



.scene-button .button-text,
.scene-button .button-icon, .button-icon-large {
  position: relative;
  z-index: 1;
  color: #fff;
}

.button-text{
  font-family: var(--font-family) ;
  line-height: calc(var(--base-unit-2)* 6);
  font-size: var(--font-size-button);
  font-weight: var(--font-weight-medium);
  white-space: pre-line;
}

.button-icon{
  width: calc(var(--base-unit-3) * 3);
  height: calc(var(--base-unit-3) * 3);
}

.button-icon-large{
  width: calc(var(--base-unit-3) * 6);
  height: calc(var(--base-unit-3) * 6);
}

.button-backdrop {
  height: 100%;
  left: 0px;
  overflow: hidden;
  position: absolute;
  top: 0px;
  width: 100%;
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  background-color: rgba(var(--color-neutral-1-rgb), 0.6);
  border-radius: 64px;
  box-shadow: rgba(0, 0, 0, 0.25) 0px 1px 12px 0px;
  opacity: 1;
}

/* Iframe overlay */
#iframe-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease;
}

#iframe-overlay.visible {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.iframe-container {
  position: relative;
  width: 90vw;
  height: 85vh;
  max-width: 1400px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  transform: scale(0.92);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#iframe-overlay.visible .iframe-container {
  transform: scale(1);
  opacity: 1;
}

.iframe-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(30, 35, 43, 0.85);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.iframe-close-btn:hover {
  background: rgba(60, 65, 73, 0.95);
}

.iframe-content {
  width: 100%;
  height: 100%;
  border: none;
}