:root {
  color-scheme: dark;
  --lime: #b8ff34;
  --cyan: #42e8e0;
  --ink: #020708;
  --panel: rgba(5, 15, 17, 0.78);
}
* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  color: #f4f8f7;
  font-family: Inter, sans-serif;
}
button,
a {
  font: inherit;
}
button {
  color: inherit;
}
#experience,
#xr-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}
#xr-canvas {
  display: block;
  touch-action: none;
}
#experience::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 7, 8, 0.8), transparent 45%),
    radial-gradient(
      circle at 70% 40%,
      transparent 20%,
      rgba(2, 7, 8, 0.36) 100%
    );
}
.topbar {
  position: fixed;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px clamp(20px, 4vw, 64px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}
.brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(184, 255, 52, 0.22));
}
.brand span {
  display: flex;
  flex-direction: column;
}
.brand strong {
  font:
    800 18px/1 "Exo 2",
    sans-serif;
  letter-spacing: 0.08em;
}
.brand strong i {
  color: var(--lime);
  font-style: normal;
}
.brand small {
  margin-top: 5px;
  color: #8fa3a2;
  font-size: 8px;
  letter-spacing: 0.24em;
}
.help-button,
.explore-button {
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 999px;
  background: rgba(3, 11, 12, 0.6);
  backdrop-filter: blur(12px);
  cursor: pointer;
}
.mode-toolbar {
  position: fixed;
  z-index: 6;
  top: 24px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 9px;
  transform: translateX(-50%);
}
.mode-switch {
  display: flex;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(3, 11, 12, 0.72);
  backdrop-filter: blur(15px);
}
.mode-button {
  padding: 10px 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #71817f;
  font:
    700 9px "Exo 2",
    sans-serif;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition:
    background 0.25s,
    color 0.25s;
}
.mode-button.active {
  color: #071003;
  background: var(--lime);
}
.mode-button span {
  margin-left: 4px;
  opacity: 0.72;
}
.showroom-theme-toggle {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(184, 255, 52, 0.42);
  border-radius: 50%;
  background: rgba(3, 11, 12, 0.82);
  color: var(--lime);
  cursor: pointer;
  box-shadow: 0 0 20px rgba(184, 255, 52, 0.08);
  backdrop-filter: blur(15px);
  transition:
    transform 0.2s,
    background 0.2s;
}
.showroom-theme-toggle:hover {
  background: #14231c;
  transform: translateY(-1px);
}
.showroom-theme-toggle:active {
  transform: scale(0.94);
}
.showroom-theme-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.showroom-theme-toggle svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}
.showroom-theme-toggle .moon-icon,
body.light-mode .showroom-theme-toggle .sun-icon {
  display: none;
}
body.light-mode .showroom-theme-toggle .moon-icon {
  display: block;
}
body.light-mode {
  background: #26342e;
}
body.light-mode #experience::after {
  background:
    linear-gradient(90deg, rgba(20, 35, 29, 0.55), transparent 45%),
    radial-gradient(
      circle at 70% 40%,
      transparent 25%,
      rgba(20, 35, 29, 0.25) 100%
    );
}
.floating-controls {
  position: fixed;
  z-index: 8;
  top: 50%;
  left: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 72px;
  opacity: 0;
  visibility: hidden;
  transform: translate(-16px, -50%);
  transition:
    opacity 0.3s,
    transform 0.3s,
    visibility 0.3s;
}
.exploring .floating-controls {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
}
.floating-mode-toggle,
.floating-xr-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 72px;
  min-height: 72px;
  padding: 9px 7px;
  border: 1px solid rgba(184, 255, 52, 0.34);
  border-radius: 14px;
  background: rgba(3, 11, 12, 0.82);
  color: #dce9e4;
  font:
    700 8px/1.15 "Exo 2",
    sans-serif;
  letter-spacing: 0.08em;
  cursor: pointer;
  backdrop-filter: blur(14px);
  box-shadow: 0 0 24px rgba(184, 255, 52, 0.08);
}
.floating-mode-toggle:hover,
.floating-xr-toggle:hover:not(:disabled) {
  border-color: var(--lime);
  color: var(--lime);
}
.floating-xr-toggle:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.floating-mode-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--lime);
  color: #071003;
  font-size: 24px;
  line-height: 1;
}
.xr-active .floating-controls {
  display: none;
}
.mobile-joystick {
  display: none;
}
.intro {
  position: fixed;
  z-index: 4;
  top: 50%;
  left: clamp(24px, 7vw, 110px);
  width: min(490px, calc(100vw - 48px));
  transform: translateY(-47%);
  transition:
    opacity 0.5s,
    transform 0.5s;
  pointer-events: none;
}
.intro > * {
  pointer-events: auto;
}
.intro.hidden {
  opacity: 0;
  transform: translate(-25px, -47%);
  pointer-events: none;
}
.intro.hidden > * {
  pointer-events: none;
}
.eyebrow {
  color: var(--lime);
  font:
    700 11px/1 "Exo 2",
    sans-serif;
  letter-spacing: 0.28em;
}
h1 {
  margin: 18px 0;
  font:
    800 clamp(48px, 6vw, 86px) / 0.9 "Exo 2",
    sans-serif;
  letter-spacing: -0.055em;
}
h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.7);
}
h1 span b {
  color: var(--lime);
  font: inherit;
  -webkit-text-stroke: 0;
  text-shadow: 0 0 22px rgba(184, 255, 52, 0.2);
}
.lead {
  max-width: 430px;
  color: #adc0be;
  font-size: 16px;
  line-height: 1.65;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.xr-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border: 0;
  border-radius: 4px;
  background: var(--lime);
  color: #071003;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 35px rgba(184, 255, 52, 0.2);
}
.xr-button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.compatibility {
  color: #6f8381;
  font-size: 11px;
  letter-spacing: 0.08em;
}
.help-panel {
  position: fixed;
  z-index: 10;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  padding: 90px 38px 38px;
  background: rgba(3, 10, 11, 0.94);
  border-left: 1px solid rgba(184, 255, 52, 0.18);
  backdrop-filter: blur(20px);
  transform: translateX(102%);
  transition: transform 0.35s ease;
}
.help-panel.open {
  transform: translateX(0);
}
.help-panel h2 {
  margin: 12px 0 36px;
  font:
    800 34px "Exo 2",
    sans-serif;
}
.close-help {
  position: absolute;
  top: 24px;
  right: 28px;
  border: 0;
  background: none;
  font-size: 32px;
  cursor: pointer;
}
.instruction {
  display: grid;
  grid-template-columns: 75px 1fr;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.instruction b {
  color: var(--lime);
  font-size: 12px;
}
.instruction span {
  color: #a7b8b7;
  font-size: 13px;
  line-height: 1.6;
}
.object-card {
  position: fixed;
  z-index: 4;
  right: clamp(22px, 5vw, 70px);
  bottom: clamp(50px, 8vh, 90px);
  display: none;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 2px solid var(--lime);
  backdrop-filter: blur(14px);
}
.object-card.visible {
  display: flex;
}
.object-card > span {
  color: var(--lime);
  font: 700 10px "Exo 2";
}
.object-card div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.object-card strong {
  font: 700 12px "Exo 2";
  letter-spacing: 0.08em;
}
.object-card small {
  color: #81918f;
  font-size: 10px;
}
.hint {
  position: fixed;
  z-index: 4;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  color: #778684;
  font-size: 9px;
  letter-spacing: 0.16em;
  white-space: nowrap;
}
.wasd-guide {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .exploring .wasd-guide {
    position: fixed;
    z-index: 8;
    left: 22px;
    bottom: 22px;
    display: grid;
    grid-template-columns: repeat(3, 27px);
    grid-template-rows: 27px 27px auto;
    gap: 4px;
    place-items: center;
    color: #a9bbb7;
    user-select: none;
    pointer-events: none;
  }
  .wasd-guide > kbd {
    grid-column: 2;
  }
  .wasd-guide > span {
    grid-column: 1 / -1;
    display: flex;
    gap: 4px;
  }
  .wasd-guide kbd {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border: 1px solid rgba(184, 255, 52, 0.48);
    border-radius: 5px;
    background: rgba(3, 11, 12, 0.82);
    box-shadow: inset 0 0 10px rgba(184, 255, 52, 0.08);
    color: var(--lime);
    font: 700 11px "Exo 2", sans-serif;
  }
  .wasd-guide small {
    grid-column: 1 / -1;
    margin-top: 2px;
    font: 700 7px "Exo 2", sans-serif;
    letter-spacing: 0.16em;
  }
  .xr-active .wasd-guide {
    display: none;
  }
}
.hands-status {
  display: none;
  position: fixed;
  z-index: 8;
  left: 50%;
  bottom: 28px;
  align-items: center;
  gap: 9px;
  padding: 10px 15px;
  border: 1px solid rgba(184, 255, 52, 0.28);
  border-radius: 999px;
  background: rgba(3, 11, 12, 0.7);
  color: #cde8d2;
  font:
    700 9px "Exo 2",
    sans-serif;
  letter-spacing: 0.13em;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
}
.hands-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
}
.xr-active .hands-status {
  display: flex;
}
.xr-active .hint {
  display: none;
}
.loading {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: #020708;
  transition:
    opacity 0.6s,
    visibility 0.6s;
}
.loading.done {
  opacity: 0;
  visibility: hidden;
}
.loading span {
  width: 46px;
  height: 46px;
  border: 2px solid rgba(184, 255, 52, 0.18);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
.loading p {
  color: #81918f;
  font: 700 9px "Exo 2";
  letter-spacing: 0.24em;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 700px) {
  .topbar {
    padding: 18px;
  }
  .help-button {
    padding: 10px 13px;
    font-size: 12px;
  }
  .mode-toolbar {
    top: 78px;
  }
  .mode-button {
    padding: 9px 11px;
    font-size: 8px;
  }
  .intro {
    top: clamp(190px, 30vh, 300px);
    top: clamp(190px, 30svh, 300px);
    bottom: auto;
    left: 20px;
    width: calc(100vw - 40px);
    transform: none;
  }
  .intro.hidden {
    transform: translateY(20px);
  }
  h1 {
    margin: 0 0 16px;
    font-size: clamp(38px, 11vw, 44px);
    line-height: 0.92;
  }
  .lead {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    max-width: 330px;
  }
  .actions {
    margin-top: 22px;
  }
  .compatibility {
    margin-top: 16px;
  }
  .object-card {
    left: 20px;
    right: auto;
    bottom: 60px;
  }
  .floating-controls {
    top: auto;
    bottom: 148px;
    left: 14px;
    width: 62px;
    transform: translateY(14px);
  }
  .exploring .floating-controls {
    transform: none;
  }
  .floating-mode-toggle,
  .floating-xr-toggle {
    width: 62px;
    min-height: 62px;
    padding: 7px 5px;
  }
  .floating-mode-icon {
    width: 32px;
    height: 32px;
    font-size: 20px;
  }
  .hint {
    display: none;
  }
}
@media (pointer: coarse) {
  .exploring .mobile-joystick {
    position: fixed;
    z-index: 9;
    bottom: 18px;
    left: 14px;
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    border: 1px solid rgba(50, 232, 242, 0.42);
    border-radius: 50%;
    background: rgba(3, 11, 12, 0.62);
    box-shadow:
      inset 0 0 24px rgba(50, 232, 242, 0.08),
      0 0 24px rgba(50, 232, 242, 0.08);
    touch-action: none;
    user-select: none;
    backdrop-filter: blur(8px);
  }
  .mobile-joystick-ring {
    position: absolute;
    inset: 17px;
    border: 1px solid rgba(184, 255, 52, 0.24);
    border-radius: 50%;
  }
  .mobile-joystick-thumb {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 18px rgba(184, 255, 52, 0.5);
    transform: translate(0, 0);
  }
  .mobile-joystick small {
    position: absolute;
    bottom: -16px;
    color: #9eb5ae;
    font: 700 7px "Exo 2", sans-serif;
    letter-spacing: 0.16em;
  }
  .xr-active .mobile-joystick {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
