/* =========================
   RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* =========================
   BASE
========================= */
html, body {
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

#scene {
  width: 100vw;
  height: 100vh;
}

.room {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: url("../img/bg.jpg") center / cover no-repeat;
  overflow: hidden;
}

/* =========================
   HOLOGRAM CONTAINER
========================= */

.hologram {
  position: absolute;
  top: 40%;
  left: 50%;
  width: 59vw;
  max-width: 1000px;
  aspect-ratio: 3 / 2;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.2s ease;
  z-index: 5;
  cursor: pointer;
}

.hologram.active {
  opacity: 1;
}

.hologram.active:hover {
  transform: translate(-50%, -50%) scale(1.01);
}

.hologram.active:active {
  transform: translate(-50%, -50%) scale(0.99);
}

/* =========================
   HOLOGRAM IMAGE
========================= */

.hologram img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  position: relative;
  z-index: 1;
}

.hologram.active img {
  opacity: 1;
  animation: holo-flicker 0.35s steps(2) 1;
}

@keyframes holo-flicker {
  0%   { opacity: 0; transform: translateX(0); }
  20%  { opacity: 1; transform: translateX(-2px); }
  40%  { opacity: 0.6; transform: translateX(2px); }
  60%  { opacity: 1; transform: translateX(-1px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* =========================
   HOLOGRAM FRAME (FIXED)
========================= */

.holo-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
}

.hologram.active .holo-frame {
  opacity: 1;
}

/* STATIC NEON BORDER */
.holo-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0px;

  border: 2px solid rgba(140, 220, 255, 0.75);

  box-shadow:
    0 0 10px rgba(140, 220, 255, 0.6),
    0 0 26px rgba(124, 0, 255, 0.45),
    inset 0 0 8px rgba(140, 220, 255, 0.35);

  opacity: 0.9;
}

/* SCANNING ENERGY */
.holo-frame::after {
  content: "";
  position: absolute;
  inset: -2px;
  padding: 2px;
  border-radius: 14px;

  background: linear-gradient(
    120deg,
    transparent 30%,
    rgba(140, 220, 255, 0.95),
    transparent 70%
  );

  animation: border-scan 2s linear infinite;

  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;

  filter: blur(0.2px) brightness(1.15);
}

@keyframes border-scan {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* =========================
   HOLOGRAM TEXT
========================= */

.holo-text {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
  max-width: 90%;
  text-align: center;

  font-size: clamp(18px, 2.4vw, 26px);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;

  color: #cfffff;

  text-shadow:
    0 0 4px rgba(200, 255, 255, 0.9),
    0 0 10px rgba(140, 220, 255, 0.8),
    0 0 22px rgba(120, 200, 255, 0.7),
    0 0 40px rgba(120, 200, 255, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.7);

  opacity: 0;
  pointer-events: none;
  z-index: 3;
}

.hologram.active .holo-text {
  opacity: 1;
  animation: holo-text-neon 0.45s ease-out;
}

@keyframes holo-text-neon {
  0% {
    opacity: 0;
    transform: translate(-50%, 10px);
    filter: blur(2px);
  }
  60% {
    opacity: 1;
    filter: blur(0.4px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0);
    filter: blur(0);
  }
}

/* =========================
   LANGUAGE BUTTONS
========================= */

.lang-buttons {
  position: absolute;
  bottom: clamp(75px, 13vh, 150px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
  z-index: 10;
}
.lang-buttons button {
  all: unset;
  cursor: pointer;
  padding: 14px 22px;
  font-size: 14px;
  letter-spacing: 0.5px;
  background: rgba(10, 20, 30, 0.6);
  border: 1px solid rgba(120, 200, 255, 0.35);
  box-shadow:
    0 0 6px rgba(120, 200, 255, 0.25),
    inset 0 0 8px rgba(120, 200, 255, 0.15);
  transition: all 0.25s ease;
  color: #9fdfff;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {
  .room {
    background-position: center calc(50% - 70px);
  }

  .hologram {
    top: 30%;
    width: 100vw;
    max-width: none;
  }

  .lang-buttons {
	bottom: 150px;  
    bottom: 12vh;
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .lang-buttons button {
    width: 90vw;
    max-width: 260px;
    text-align: center;
    font-size: 15px;
    padding: 16px 20px;
  }
}
