/* Jungle Jango cartoon overlay */

@import url("https://fonts.googleapis.com/css2?family=Luckiest+Guy&family=Black+Ops+One&display=swap");

.graph-container.has-aviator-anim {
  position: relative;
  overflow: hidden;
  background: #9fd4ef !important;
  border-color: rgba(255, 255, 255, 0.12);
  min-height: 520px;
}

@media (min-width: 1024px) {
  .graph-container.has-aviator-anim {
    min-height: 0;
    height: 100%;
  }
  .game-container.has-jungle-theme .graph-area,
  .game-container.has-jungle-theme .graph-container {
    height: 100%;
    min-height: 0;
  }
}

.jj-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  background: #9fd4ef;
}

.graph-container.has-aviator-anim #orbital-scene,
.graph-container.has-aviator-anim #game-svg {
  opacity: 0 !important;
  pointer-events: none !important;
}

.graph-container.has-aviator-anim .graph-overlay {
  position: absolute !important;
  inset: 0;
  z-index: 50;
  background: transparent !important;
}

.graph-container.has-aviator-anim #multiplier-container,
.graph-container.has-aviator-anim #countdown-display,
.graph-container.has-aviator-anim #crashed-text,
.graph-container.has-aviator-anim .waiting-text,
.graph-container.has-aviator-anim .progress-container {
  display: none !important;
}

.graph-container.has-aviator-anim #waiting-state {
  background: transparent !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.jj-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.jj-wait {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 70;
  pointer-events: none;
  text-align: center;
  width: min(560px, 86%);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.jj-wait.is-on {
  opacity: 1;
}

.jj-logo {
  display: block;
  width: min(420px, 78%);
  max-height: 160px;
  margin: 0 auto 0.85rem;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: contrast(1.05) saturate(1.08);
}

.jj-bar {
  width: min(380px, 72%);
  height: 14px;
  margin: 0 auto 0.7rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 170, 70, 0.35);
}

.jj-bar-fill {
  height: 100%;
  width: 8%;
  border-radius: inherit;
  background: linear-gradient(180deg, #ffe08a 0%, #f5b13a 55%, #e08a18 100%);
  transition: width 0.12s linear;
}

.jj-wait-text {
  font-family: Inter, "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: clamp(0.78rem, 2.1vw, 1.05rem);
  letter-spacing: 0.12em;
  color: #fff;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.jj-powered {
  margin-top: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.jj-topspin {
  height: 28px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: screen;
}

.jj-mult {
  position: absolute;
  right: 8%;
  top: 38%;
  transform: translateY(-50%);
  z-index: 72;
  pointer-events: none;
  font-family: "Black Ops One", "Arial Black", Impact, sans-serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 7.2vw, 5.4rem);
  line-height: 0.9;
  color: #fff;
  letter-spacing: 0.01em;
  -webkit-text-stroke: 7px #1a5a2a;
  paint-order: stroke fill;
  text-shadow: 0 4px 0 #0d3318, 0 10px 18px rgba(0, 0, 0, 0.28);
  opacity: 0;
}

.jj-mult.is-on {
  opacity: 1;
}

.jj-crash {
  position: absolute;
  left: 8%;
  top: 46%;
  z-index: 73;
  pointer-events: none;
  max-width: 46%;
  opacity: 0;
  transform: rotate(-7deg) scale(0.92);
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.jj-crash.is-on {
  opacity: 1;
  transform: rotate(-7deg) scale(1);
}

.jj-crash div {
  font-family: "Luckiest Guy", "Arial Black", sans-serif;
  font-size: clamp(1.05rem, 3.1vw, 2.05rem);
  line-height: 1.05;
  color: #ffe14a;
  -webkit-text-stroke: 4px #6b3a12;
  paint-order: stroke fill;
  text-transform: uppercase;
  text-shadow: 0 3px 0 #4a2508;
}

.game-container.has-jungle-theme {
  background: #14301c;
  position: relative;
}

.game-container.has-jungle-theme .history-bar {
  background: transparent;
  backdrop-filter: none;
  border: none;
  justify-content: flex-start;
}

.game-container.has-jungle-theme .history-item {
  background: #f6e7b4 !important;
  border: none !important;
  color: #3a2a10;
  font-size: 11px;
  font-weight: 800;
  padding: 0.28rem 0.7rem;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12);
}

.game-container.has-jungle-theme .history-blue { color: #3b82f6 !important; background: #f6e7b4 !important; }
.game-container.has-jungle-theme .history-purple { color: #7c3aed !important; background: #f6e7b4 !important; }
.game-container.has-jungle-theme .history-pink { color: #e11d8a !important; background: #f4c6e4 !important; }
.game-container.has-jungle-theme .history-emerald { color: #16a34a !important; background: #f6e7b4 !important; }
.game-container.has-jungle-theme .history-yellow { color: #b45309 !important; background: #f6e7b4 !important; }
.game-container.has-jungle-theme .history-red { color: #e11d8a !important; background: #f4c6e4 !important; }
.game-container.has-jungle-theme .history-orange { color: #c2410c !important; background: #f6e7b4 !important; }

.game-container.has-jungle-theme .game-main {
  background: transparent;
  border: none;
  backdrop-filter: none;
}

@media (min-width: 1024px) {
  .game-container.has-jungle-theme {
    grid-template-areas:
      "main controls"
      "main sidebar";
    grid-template-rows: 1fr auto;
  }
  .game-container.has-jungle-theme .history-bar {
    position: absolute;
    top: 1.1rem;
    left: 1.1rem;
    right: calc(380px + 2.1rem);
    z-index: 90;
    pointer-events: none;
    padding: 0.35rem 0.75rem;
  }
  .game-container.has-jungle-theme .history-bar * {
    pointer-events: auto;
  }
}

@media (max-width: 768px) {
  .jj-mult {
    right: 6%;
    top: 34%;
    -webkit-text-stroke: 5px #1a5a2a;
  }
  .jj-crash {
    left: 4%;
    max-width: 58%;
  }
  .jj-logo {
    max-height: 110px;
  }
}
