
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: white;
  font-family: Arial, sans-serif;
}

#arjs-video {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  object-fit: cover !important;
  z-index: 0 !important;
}

a-scene {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 1 !important;
  pointer-events: auto !important;
}

a-scene canvas {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  pointer-events: auto !important;
}

#interface {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.7),
    transparent
  );
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 32px;
}

.brand h1 {
  margin: 0;
  font-size: 21px;
}

.brand p {
  margin: 4px 0 0;
  font-size: 12px;
  opacity: .7;
}

button {
  pointer-events: auto;
  cursor: pointer;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  color: white;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(12px);
}

button:hover {
  background: rgba(255,255,255,.28);
}

.icon-button {
  font-size: 22px;
}

#status {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  padding: 11px 17px;
  border-radius: 30px;
  background: rgba(0,0,0,.65);
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: orange;
}

#status.ready .status-dot {
  background: #42e88b;
}

#status.error .status-dot {
  background: #ff5252;
}

#instructions {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: min(90%,420px);
  padding: 32px;
  border-radius: 24px;
  text-align: center;
  background: rgba(15,15,15,.92);
  backdrop-filter: blur(20px);
  pointer-events: auto;
}

#instructions.hidden {
  display: none;
}

.instruction-icon {
  font-size: 48px;
}

#instructions h2 {
  margin: 16px 0 10px;
}

#instructions p {
  color: #ccc;
  line-height: 1.6;
  font-size: 14px;
}

#startBtn {
  width: 100%;
  margin-top: 20px;
  background: #e83b50;
  font-weight: bold;
}

#controls {
  position: absolute;
  bottom: 65px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(15px);
  pointer-events: auto;
}

.control-group {
  display: flex;
  gap: 6px;
}

#controls button {
  min-width: 44px;
  min-height: 44px;
  font-size: 20px;
}

#resetBtn {
  font-size: 13px;
}

#help {
  position: absolute;
  bottom: 20px;
  width: 100%;
  text-align: center;
  font-size: 12px;
  opacity: .8;
}

.mobile-help {
  display: none;
}

.desktop-help {
  display: inline;
}

#errorMessage {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%,500px);
  color: #ff7777;
  text-align: center;
  font-size: 13px;
}

@media(max-width:767px) {
  .header {
    padding: 16px;
  }

  .brand h1 {
    font-size: 18px;
  }

  #status {
    top: 85px;
  }

  #controls {
    bottom: 55px;
    padding: 8px;
    gap: 7px;
  }

  #controls button {
    min-width: 40px;
    min-height: 40px;
  }

  .mobile-help {
    display: inline;
  }

  .desktop-help {
    display: none;
  }

  #instructions {
    padding: 24px;
  }
}
