/* css/contact-game.css */
/* ========== FINAL GAME SECTION ========= */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  min-height: 100%;
  background: #0a0a1a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #fff;
  overflow-x: hidden;
}

body {
  background: 
    radial-gradient(ellipse at 20% 10%, rgba(133,16,252,0.15), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(255,73,192,0.15), transparent 50%),
    radial-gradient(ellipse at 50% 50%, #15152a 0%, #0a0a1a 70%);
}

/* === LANDING === */
.landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px 20px;
  text-align: center;
  position: relative;
  z-index: 1;
  transition: opacity 0.6s ease;
}

.landing-label {
  display: inline-block;
  padding: 6px 18px;
  background: #fff;
  color: #212132;
  border-radius: 100vw;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.landing-title {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900;
  background: linear-gradient(135deg, #8510fc 0%, #ff49c0 50%, #ffdd65 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: transform 0.3s ease, filter 0.3s ease;
  padding: 20px 40px;
  display: inline-block;
  letter-spacing: 1px;
}

.landing-title::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, #8510fc 0%, #ff49c0 100%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s;
  filter: blur(30px);
}

.landing-title:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 30px rgba(133,16,252,0.6));
}

.landing-title:hover::before { opacity: 0.4; }

.landing-hint {
  margin-top: 20px;
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: hintPulse 2s infinite;
}

.landing-hint::before { content: '🏃 '; }

@keyframes hintPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* === GAME OVERLAY === */
.game-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(133,16,252,0.25), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(255,73,192,0.2), transparent 50%),
    radial-gradient(ellipse at 50% 50%, #15152a 0%, #0a0a1a 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  overflow: hidden;
}

.game-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  transition: all 0.3s;
}

.close-btn:hover {
  background: rgba(133,16,252,0.3);
  transform: rotate(90deg) scale(1.1);
  border-color: #8510fc;
}

/* === HUD === */
.hud {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  z-index: 10;
  width: 90%;
  max-width: 600px;
}

.hud-label {
  display: inline-block;
  padding: 6px 18px;
  background: #fff;
  color: #212132;
  border-radius: 100vw;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.hud-title {
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 800;
  background: linear-gradient(135deg, #8510fc 0%, #ff49c0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}

.hud-sub {
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  line-height: 1.5;
}

/* === GAME WORLD === */
.game-world {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255,255,255,0.6);
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(255,255,255,0.8);
}

/* === TEXT PLATFORMS === */
.ground-text {
  position: absolute;
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 900;
  color: #ffffff;
  white-space: nowrap;
  z-index: 5;
  will-change: transform;
  text-shadow: 
    0 0 15px rgba(133,16,252,0.9),
    0 0 35px rgba(255,73,192,0.7),
    0 6px 0 rgba(133,16,252,0.4);
  user-select: none;
  letter-spacing: 2px;
}

/* === Player === */
.player {
  position: absolute;
  width: 50px;
  height: 50px;
  left: 10%;
  z-index: 20;
  will-change: transform, top;
  filter: drop-shadow(0 0 15px rgba(133,16,252,0.8));
  transition: transform 0.1s;
}

.player-body {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #8510fc 0%, #ff49c0 100%);
  border-radius: 50% 50% 45% 45%;
  position: relative;
  box-shadow: 
    inset -5px -5px 15px rgba(0,0,0,0.3),
    inset 5px 5px 15px rgba(255,255,255,0.2);
}

.player-eye {
  position: absolute;
  width: 8px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  top: 15px;
  right: 10px;
  box-shadow: inset -2px 0 0 #212132;
}

.player-mouth {
  position: absolute;
  width: 12px;
  height: 6px;
  border: 2px solid #fff;
  border-top: none;
  border-radius: 0 0 12px 12px;
  bottom: 12px;
  right: 10px;
}

.player-legs {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 12px;
  display: flex;
  justify-content: space-between;
}

.leg {
  width: 8px;
  height: 12px;
  background: linear-gradient(180deg, #8510fc, #5a0bb0);
  border-radius: 0 0 4px 4px;
  transform-origin: top center;
}

.player.running .leg:nth-child(1) { animation: legRun1 0.2s infinite; }
.player.running .leg:nth-child(2) { animation: legRun2 0.2s infinite; }

/* NATURAL JUMP ANIMATIONS (Squash & Stretch) */
.player.windup {
  transform: scaleY(0.6) scaleX(1.3) translateY(10px) !important;
}

.player.jumping {
  transform: scaleY(1.2) scaleX(0.8) rotate(-10deg) !important;
}

@keyframes legRun1 {
  0%, 100% { transform: rotate(-40deg); }
  50% { transform: rotate(40deg); }
}
@keyframes legRun2 {
  0%, 100% { transform: rotate(40deg); }
  50% { transform: rotate(-40deg); }
}

/* === Score UI === */
.score-ui {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 100;
  pointer-events: none;
}

.score-item {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 10px 18px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
  color: rgba(255,255,255,0.9);
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-item strong {
  color: #ffdd65;
  font-size: 18px;
  font-weight: 800;
}

.instruction {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1px;
  text-transform: uppercase;
  z-index: 100;
  pointer-events: none;
}

.jump-hint {
  position: absolute;
  bottom: 150px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  z-index: 100;
  pointer-events: none;
  animation: jumpHintPulse 1.5s infinite;
}

@keyframes jumpHintPulse {
  0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.7; transform: translateX(-50%) translateY(-5px); }
}

/* === Mission Toast === */
.mission-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  z-index: 1400;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  background: rgba(10,10,26,0.9);
  padding: 40px;
  border-radius: 30px;
  border: 2px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.mission-toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.mission-toast.hide {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.3);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.mission-toast h2 {
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 900;
  background: linear-gradient(135deg, #8510fc, #ff49c0, #ffdd65);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.mission-toast p {
  color: rgba(255,255,255,0.85);
  font-size: clamp(14px, 2vw, 18px);
  margin-bottom: 20px;
}

.mission-toast .emoji {
  font-size: clamp(50px, 8vw, 80px);
  margin-bottom: 10px;
  display: inline-block;
  animation: targetSpin 1s ease-out;
}

@keyframes targetSpin {
  0% { transform: rotate(-360deg) scale(0); opacity: 0; }
  100% { transform: rotate(0) scale(1); opacity: 1; }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .hud { top: 15px; }
  .hud-sub { font-size: 11px; padding: 0 20px; }
  .score-ui { top: 15px; left: 15px; }
  .score-item { padding: 8px 14px; font-size: 12px; }
  .close-btn { top: 15px; right: 15px; width: 44px; height: 44px; font-size: 20px; }
  .landing-title { padding: 15px 25px; }
  .player { 
    width: 40px; 
    height: 40px; 
    left: 8%; /* Firmly on the left side for mobile */
  }
  .player-eye { width: 6px; height: 8px; top: 12px; right: 8px; }
  .player-mouth { width: 10px; height: 5px; bottom: 10px; right: 8px; }
}
/* ---------- HIDE STICKY HEADER WHEN CONTACT GAME IS OPEN ---------- */
.game-overlay.open ~ .sticky-header,
body.game-active .sticky-header {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}