:root {
  --bg: #090b10;
  --text: #e8ecf2;
  --accent: #4da3ff;
  --danger: #ff5f6d;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; padding: 0; background: var(--bg); color: var(--text); overflow: hidden; font-family: Inter, system-ui, -apple-system, sans-serif; }

#scene-root {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #080a0f;
}

.scene-layer {
  position: absolute;
  transform-origin: center center;
}

.scene-layer[data-layer-type='bg_image'] img,
.scene-layer[data-layer-type='main_image'] img,
.scene-layer[data-layer-type='sticker'] img,
.scene-layer[data-layer-type='parallax_far'] img,
.scene-layer[data-layer-type='parallax_near'] img,
.scene-layer[data-layer-type='parallax_ultra_near'] img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.scene-layer--text {
  white-space: pre-wrap;
  color: #f3f7ff;
  line-height: 1.2;
  pointer-events: none;
  user-select: none;
}

.scene-layer--menu-button {
  background: none !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.scene-layer--menu-button a {
  display: inline;
  align-items: center;
  color: #fff;
  padding: 0;
}

.bh-menu-link {
  position: relative;
  background-image: linear-gradient(
    to right,
    var(--menu-highlight-color, rgba(255, 230, 0, 0.45)) 100%,
    transparent 100%
  );
  background-size: 0% 100%;
  background-repeat: no-repeat;
  background-position: left center;
  transition: background-size 0.35s ease;
}

.bh-menu-link:hover {
  background-size: 100% 100%;
}

.scene-layer--clock {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
  pointer-events: none;
  user-select: none;
}

.scene-layer--selected {
  outline: 1px dashed rgba(96, 170, 255, 0.8);
  outline-offset: 2px;
}

.scene-layer--sticker-edit {
  cursor: move;
}

.sticker-hover-controls {
  position: absolute;
  inset: -14px -14px auto auto;
  display: none;
  gap: 4px;
  pointer-events: auto;
}

.scene-layer--sticker-edit:hover .sticker-hover-controls {
  display: inline-flex;
}

.sticker-hover-controls button,
.sticker-hover-controls .badge {
  border: 1px solid rgba(120, 170, 255, 0.8);
  background: rgba(4, 12, 24, 0.9);
  color: #dce7ff;
  border-radius: 4px;
  font-size: 11px;
  line-height: 1;
  padding: 4px 6px;
}

.sticker-resize-handle,
.sticker-rotate-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #1b8bff;
  pointer-events: auto;
}

.sticker-resize-handle--se { right: -6px;  bottom: -6px; cursor: nwse-resize; }
.sticker-resize-handle--sw { left: -6px;   bottom: -6px; cursor: nesw-resize; }
.sticker-resize-handle--ne { right: -6px;  top: -6px;    cursor: nesw-resize; }
.sticker-resize-handle--nw { left: -6px;   top: -6px;    cursor: nwse-resize; }
.sticker-rotate-handle { left: calc(50% - 6px); top: -18px; cursor: grab; }

.fallback-empty {
  position: absolute;
  left: 32px;
  top: 32px;
  max-width: 480px;
  background: rgba(7, 14, 25, 0.85);
  border: 1px solid rgba(120, 160, 255, 0.4);
  padding: 14px 16px;
  border-radius: 8px;
}

@media (max-width: 1919px) {
  html {
    overflow-x: auto;
    overflow-y: hidden;
  }
  body {
    min-width: 1920px;
    overflow: visible;
  }
  #scene-root {
    width: 1920px;
  }
}
