* {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  background: #12061c;
}

/* מסך המשחק */

#gameScreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#gameScreen .full-game-card {
  position: relative;
  width: 100%;
  height: 100%;
  background: transparent;
  overflow: hidden;
}

/* ROOT של Three.js */

#threeRoot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#threeRoot canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Top UI */

#gameScreen .topbar {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 10px);
  left: 12px;
  right: 12px;
  z-index: 30;
}


#gameScreen .game-stats {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 96px);
  left: 12px;
  right: 12px;
  z-index: 20;
}


/* HUD של השאלה והתשובות */
#wordPathSource {
  direction: ltr;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: clamp(26px, 7vw, 46px);
  font-weight: 900;
  line-height: 1.05;

  color: #ffffff;

  padding: 8px 14px;
  border-radius: 18px;

  background: rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(6px);

  box-shadow:
    0 10px 18px rgba(0,0,0,0.22),
    0 0 0 3px rgba(255,255,255,0.85),
    0 0 0 8px rgba(255,67,199,0.45);

  text-shadow:
    0 3px 0 rgba(0,0,0,0.28),
    0 8px 14px rgba(0,0,0,0.28);
}




#wordPathInstruction {
  direction: rtl;
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;

  padding: 8px 14px;
  border-radius: 16px;

  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);

  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}


#wordPathChoices {
  display: flex;
  gap: 14px;
}

#wordPathLeft,
#wordPathRight {
  background: #ffffff;
  color: #1a1a1a;
  padding: 12px 20px;
  border-radius: 18px;
  font-size: 20px;
  font-weight: 600;
  min-width: 120px;
  text-align: center;
}

/* ניקוי אלמנטים ישנים */

.wordpath-instructions {
  display: none;
}

#kpopGirl {
  display: none;
}
#wordPathHud {
  position: fixed;
  top: calc(env(safe-area-inset-top, 0px) + 170px);
  left: 12px;
  right: 12px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

body.screen-wrong::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(255, 60, 90, 0.22);
  pointer-events: none;
  z-index: 9999;
  animation: wrongFlash 0.28s ease-out;
}

@keyframes wrongFlash {
  0% {
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.tilt-intro {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
  pointer-events: auto;
  opacity: 1;
  transition: opacity 220ms ease;
}

.tilt-intro.fade-out {
  opacity: 0;
  pointer-events: none;
}


.tilt-intro-card {
  width: min(520px, 92vw);
  border-radius: 28px;
  padding: 26px 22px;
  text-align: center;
  background: radial-gradient(
    circle at top,
    #fff6fb 0%,
    #ffe6f3 45%,
    #ffd3ea 100%
  );
  box-shadow:
    0 30px 60px rgba(255, 79, 163, 0.35),
    0 10px 25px rgba(0, 0, 0, 0.18);
  animation: tiltIntroFloat 2.8s ease-in-out infinite;
  transform-origin: center;
}

@keyframes tiltIntroFloat {
  0% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-10px) scale(1.02);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}


.tilt-intro-title {
  font-size: 26px;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 8px;
  color: #2b1600;
}

.tilt-intro-hint {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  color: #2b1600;
  opacity: 0.92;
  margin-bottom: 14px;
}

.tilt-intro-tap {
  position: relative;
  display: inline-block;
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  padding: 14px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff4fa3, #ff7ac8);
  color: #ffffff;
  box-shadow:
    0 10px 20px rgba(255, 79, 163, 0.45),
    0 0 0 0 rgba(255, 79, 163, 0.6);
  transition:
    transform 120ms ease,
    box-shadow 220ms ease;
}

.tilt-intro-tap:active {
  transform: scale(0.92);
  box-shadow:
    0 0 0 18px rgba(255, 79, 163, 0),
    0 0 40px rgba(255, 79, 163, 0.8);
}

.tilt-intro.fade-out .tilt-intro-card {
  animation: tiltIntroExit 420ms ease forwards;
}

@keyframes tiltIntroExit {
  0% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  60% {
    transform: scale(1.06) translateY(-6px);
    opacity: 1;
  }
  100% {
    transform: scale(0.85) translateY(40px);
    opacity: 0;
  }
}

