/* Fire Crash overlay — original Spinmatic comet + starfield */

.graph-container.has-aviator-anim {
  position: relative;
  overflow: hidden;
  background: #05060a !important;
  border-color: rgba(78, 96, 255, 0.28);
}

.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;
}

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

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

.fc-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: hard-light;
}

.fc-stage.is-crashed .fc-flash {
  animation: fcBlink 0.8s ease-out forwards;
}

@keyframes fcBlink {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.fc-wait {
  position: absolute;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  z-index: 70;
  text-align: center;
  width: min(640px, 92%);
  opacity: 0;
  transition: opacity 0.18s ease;
}

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

.fc-count {
  font-family: Kanit, Inter, sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  color: #fff;
  text-shadow: 0 0 12px rgb(97 198 255);
  letter-spacing: 0.04em;
}

.fc-banner {
  margin-top: 0.35rem;
  font-family: Kanit, Inter, sans-serif;
  font-weight: 700;
  font-size: clamp(0.85rem, 2.2vw, 1.15rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 8px rgb(97 198 255);
}

.fc-mult {
  position: absolute;
  right: 4%;
  top: 14%;
  z-index: 72;
  pointer-events: none;
  font-family: Tomorrow, Inter, sans-serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.8rem, 5.4vw, 3.6rem);
  line-height: 1;
  color: #fff;
  padding: 0.35rem 0.85rem 0.45rem;
  border-radius: 12px;
  background: radial-gradient(ellipse at 50% 8px, rgb(67 84 233), rgb(10 16 43));
  box-shadow: 0 6px 6px rgb(0 0 0 / 25%);
  opacity: 0;
}

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

.fc-mult.is-hot,
.fc-stage.is-crashed .fc-mult.is-on {
  background: radial-gradient(ellipse at 50% 8px, rgb(233 67 67), rgb(43 10 10));
}

.fc-crash {
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translate(-50%, -8%) scale(0.94);
  z-index: 73;
  text-align: center;
  width: min(640px, 86%);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.fc-crash.is-on {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.fc-crash div {
  font-family: Kanit, Inter, sans-serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 3vw, 1.9rem);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 1px rgb(0 0 0 / 40%);
}

.fc-crash div:last-child {
  margin-top: 0.2rem;
  font-size: clamp(0.85rem, 2.2vw, 1.2rem);
  color: rgb(255 255 255 / 70%);
}

.game-container.has-fire-theme {
  background: #05060a;
  position: relative;
}

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

.game-container.has-fire-theme .history-item {
  background: #080c22 !important;
  border: none !important;
  color: rgba(255, 255, 255, 0.75);
  font-family: Tomorrow, Inter, sans-serif;
  font-style: italic;
  font-weight: 700;
  font-size: 11px;
  padding: 0.28rem 0.7rem;
  border-radius: 4px;
}

.game-container.has-fire-theme .history-pink,
.game-container.has-fire-theme .history-emerald,
.game-container.has-fire-theme .history-yellow,
.game-container.has-fire-theme .history-red,
.game-container.has-fire-theme .history-orange {
  background: #ab500a !important;
  color: #fff !important;
}

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

@media (max-width: 768px) {
  .fc-mult { top: 12%; right: 3%; }
  .fc-wait { top: 14%; }
  .fc-crash { top: 62%; }
}
