:root {
  --bg: #080b10;
  --panel: rgba(12, 18, 27, 0.86);
  --panel-strong: rgba(16, 24, 36, 0.96);
  --line: rgba(148, 163, 184, 0.24);
  --text: #eef6ff;
  --muted: #9fb2c8;
  --accent: #39d6e6;
  --accent-2: #f6b84b;
  --danger: #e75858;
}

* {
  box-sizing: border-box;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 22%, rgba(57, 214, 230, 0.18), transparent 28%),
    radial-gradient(circle at 78% 18%, rgba(246, 184, 75, 0.14), transparent 26%),
    linear-gradient(135deg, #080b10 0%, #111827 48%, #0b1018 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 78%);
  z-index: 1;
}

a-scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  min-height: 56px;
  padding: 8px 18px;
  color: var(--text);
  background: rgba(7, 10, 15, 0.86);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-title {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: clamp(0.9rem, 1.8vw, 1.15rem);
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
  text-align: right;
  color: #f8fbff;
}

.button-container {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.button-container > div {
  display: flex;
  align-items: center;
  min-height: 40px;
}

button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(57, 214, 230, 0.38);
  border-radius: 7px;
  background: rgba(57, 214, 230, 0.12);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  border-color: rgba(57, 214, 230, 0.72);
  background: rgba(57, 214, 230, 0.2);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

#container-zoom {
  width: min(300px, 34vw);
  display: flex;
  align-items: center;
  gap: 12px;
}

#container-zoom label {
  flex: 0 0 auto;
  margin: 0;
  color: #d8e7f7;
  font-size: 0.76rem;
  font-weight: 750;
}

#container-zoom input[type="range"] {
  flex: 1 1 auto;
  min-width: 160px;
  margin: 0;
}

.controls {
  position: fixed;
  top: 74px;
  left: 18px;
  z-index: 1000;
  width: min(304px, calc(100vw - 36px));
  padding: 14px 14px 10px;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(19, 28, 41, 0.94), rgba(10, 15, 24, 0.92));
  border: 1px solid rgba(120, 144, 172, 0.34);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(16px);
  user-select: none;
  overflow: hidden;
  transition: height 220ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.controls:hover {
  box-shadow: 0 30px 72px rgba(0, 0, 0, 0.46);
}

.controls.minimize {
  height: 55px;
}

.modal-header {
  min-height: 22px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header::before {
  content: "Rotación del campo";
  color: #f8fbff;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.btn-modal-maximize {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--accent);
  background: rgba(57, 214, 230, 0.12);
  cursor: pointer;
}

.btn-modal-maximize span {
  transform: rotateZ(180deg);
}

label {
  display: block;
  margin-bottom: 8px;
  color: #d8e7f7;
  font-weight: 750;
  font-size: 0.82rem;
  letter-spacing: 0;
}

input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  margin: 0 0 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #3de5f0 0%, #79e7b2 42%, #f8c45d 70%, #ff755f 100%);
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #071018;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(57, 214, 230, 0.18), 0 8px 16px rgba(0, 0, 0, 0.34);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid #071018;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(57, 214, 230, 0.18), 0 8px 16px rgba(0, 0, 0, 0.34);
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  min-height: 34px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 7px 16px;
  color: rgba(238, 246, 255, 0.68);
  background: rgba(7, 10, 15, 0.72);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
  font-size: 0.78rem;
  user-select: none;
}

@media (max-width: 720px) {
  header {
    align-items: stretch;
    flex-direction: column-reverse;
    gap: 8px;
    padding: 10px 12px;
  }

  .app-title {
    justify-content: flex-start;
    text-align: left;
  }

  .button-container {
    width: 100%;
    justify-content: space-between;
  }

  #container-zoom {
    width: min(240px, 48vw);
  }

  .controls {
    top: 112px;
    left: 12px;
  }
}


.controls[data-clone="1"],
.controls[data-clone="2"] {
  background:
    linear-gradient(180deg, rgba(19, 28, 41, 0.95), rgba(10, 15, 24, 0.93));
}

.controls[data-clone="1"] {
  border-color: rgba(121, 231, 178, 0.46);
}

.controls[data-clone="2"] {
  border-color: rgba(185, 144, 255, 0.48);
}

.controls label span,
#container-zoom label span {
  color: #ffffff;
  font-weight: 850;
}

@media (max-width: 1080px) {
  .controls {
    width: min(292px, calc(100vw - 24px));
  }
}


.btn-modal-maximize.is-minimized span {
  transform: rotateZ(0deg);
}

.controls.minimize .modal-header {
  margin-bottom: 0;
  border-bottom-color: transparent;
}
