:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #05070c;
  color: #f6f8fb;
}

* {
  box-sizing: border-box;
}

html,
body,
.app-shell {
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  position: fixed;
  inset: 0;
}

button,
code {
  font: inherit;
}

.app-shell {
  display: grid;
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(17, 205, 255, 0.2), transparent 34rem),
    linear-gradient(145deg, #05070c 0%, #10131a 50%, #05070c 100%);
}

body.is-ar-active .app-shell {
  background: transparent;
}

.setup-panel {
  position: relative;
  z-index: 20;
  align-self: center;
  justify-self: center;
  width: min(34rem, calc(100vw - 2rem));
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(9, 12, 18, 0.88);
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.35);
}

body.is-ar-active .setup-panel {
  display: none;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #13c4ff;
  color: #061017;
  font-weight: 800;
}

h1,
p {
  margin: 0;
}

h1 {
  font-size: 1.25rem;
  line-height: 1.2;
}

.brand-row p,
.setup-note {
  margin-top: 0.25rem;
  color: #b8c2d3;
  font-size: 0.95rem;
}

.content-summary {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.875rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #111823;
}

.content-summary span {
  color: #b8c2d3;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.content-summary strong {
  overflow-wrap: anywhere;
  color: #f6f8fb;
  font-size: 1rem;
}

button {
  width: 100%;
  min-height: 2.75rem;
  border: 0;
  border-radius: 6px;
  padding: 0 0.95rem;
  background: #13c4ff;
  color: #061017;
  font-weight: 750;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

button[type="button"] {
  background: #232c3a;
  color: #f6f8fb;
}

#start-button {
  background: #13c4ff;
  color: #061017;
}

.setup-note {
  margin-top: 1rem;
}

.ar-stage,
a-scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
}

.ar-stage {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

body.is-ar-active .ar-stage {
  opacity: 1;
  pointer-events: auto;
}

a-scene {
  z-index: 1;
  background: transparent !important;
}

body.is-ar-active video,
body.is-ar-active .camera-feed,
body.is-ar-active .ar-stage video {
  position: fixed !important;
  inset: 0 !important;
  z-index: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  object-fit: cover !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.is-ar-active canvas,
body.is-ar-active .ar-stage canvas,
body.is-ar-active .ar-stage .a-canvas {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1 !important;
  width: 100vw !important;
  height: 100dvh !important;
  background: transparent !important;
}

.mindar-ui-overlay,
.mindar-ui-scanning {
  z-index: 6 !important;
}

body.is-setup .mindar-ui-overlay,
body.is-setup .mindar-ui-scanning {
  display: none !important;
}

.hud {
  position: fixed;
  z-index: 10;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  left: max(0.75rem, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  pointer-events: none;
}

.hud > * {
  pointer-events: auto;
}

.status-pill {
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 0.8rem;
  background: rgba(5, 7, 12, 0.7);
  color: #f6f8fb;
  font-size: 0.875rem;
  backdrop-filter: blur(12px);
}

#stop-button {
  width: auto;
  min-height: 2.25rem;
  background: rgba(5, 7, 12, 0.7);
  color: #f6f8fb;
  backdrop-filter: blur(12px);
}

.floating-layer {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.floating-content {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  transform-origin: center center;
  transform-style: preserve-3d;
  pointer-events: auto;
  transition: opacity 140ms linear;
}

.content-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: #070a10;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.35);
}

.content-frame.without-frame {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.floating-content.is-entering .content-frame {
  animation: panel-enter 420ms cubic-bezier(0.18, 0.9, 0.22, 1) both;
}

@keyframes panel-enter {
  0% {
    opacity: 0;
    transform: translate3d(0, 0.75rem, 0) scale(0.82);
    filter: blur(6px);
  }

  70% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1.035);
    filter: blur(0);
  }

  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-content.is-entering .content-frame {
    animation: none;
  }
}

.content-host,
.content-host iframe,
.content-host img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.content-host iframe,
.content-host img {
  display: block;
  border: 0;
  object-fit: cover;
}

.content-host {
  z-index: 1;
}

.youtube-preview {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(19, 196, 255, 0.18), transparent 45%),
    linear-gradient(135deg, #101724, #05070c);
  background-position: center;
  background-size: cover;
}

.youtube-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
}

.youtube-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-paused-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0.75rem;
  background: rgba(7, 10, 16, 0.88);
  color: #dce4ef;
  font-size: 0.9rem;
  text-align: center;
}

.youtube-inline-shell {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(19, 196, 255, 0.16), transparent 48%),
    #070a10;
}

.youtube-inline-thumbnail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.youtube-inline-play {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(2.5rem, 18%, 4rem);
  aspect-ratio: 1;
  border-radius: 999px;
  background: #ff0033;
  color: #fff;
  font-size: clamp(1.2rem, 6vw, 1.8rem);
  line-height: 1;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.32);
}

.youtube-play {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(2.6rem, 18%, 4rem);
  aspect-ratio: 1;
  border-radius: 999px;
  background: #ff0033;
  color: #fff;
  font-size: clamp(1.1rem, 8vw, 1.8rem);
  line-height: 1;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.3);
}

.panel-frame {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

.action-bar {
  display: none;
}

.action-bar[hidden] {
  display: none;
}

.action-button {
  width: auto;
  min-width: 8rem;
  min-height: 3rem;
  padding: 0 1rem;
  border-radius: 999px;
  background: rgba(19, 196, 255, 0.96);
  color: #061017;
  font-size: 0.95rem;
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.32);
  pointer-events: auto;
}
