.aviator-anim-root {
  position: absolute;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  pointer-events: none;
  border-radius: inherit;
}

.aviator-anim-root.aviator-anim-transparent .tc-sky,
.aviator-anim-root.aviator-anim-transparent .tc-stars,
.aviator-anim-root.aviator-anim-transparent .tc-desert,
.aviator-anim-root.aviator-anim-transparent .tc-desert-back,
.aviator-anim-root.aviator-anim-transparent .tc-planet,
.aviator-anim-root.aviator-anim-transparent .tc-cactus {
  display: none;
}

.tc-sky,
.tc-stars {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  pointer-events: none;
  will-change: transform, opacity, background-position;
}

.tc-sky {
  background-size: cover;
  background-position: center bottom;
}

.tc-stars {
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  mix-blend-mode: screen;
}

.tc-desert,
.tc-desert-back {
  position: absolute;
  left: -4%;
  right: -6%;
  bottom: 0;
  top: auto;
  height: auto;
  pointer-events: none;
  will-change: transform, opacity;
}

.tc-desert-back {
  z-index: 1;
}

.tc-desert {
  z-index: 2;
}

.tc-desert img,
.tc-desert-back img {
  display: block;
  width: 108%;
  max-width: none;
  height: auto;
  object-fit: contain;
  object-position: left bottom;
}

.tc-planet {
  position: absolute;
  pointer-events: none;
  user-select: none;
  will-change: transform, opacity;
  top: 0;
  left: auto;
}

.tc-planet-green {
  width: min(28vw, 240px);
  right: 4%;
  top: -6%;
  opacity: 0.4;
}

.tc-planet-saturn {
  width: min(22vw, 190px);
  right: 8%;
  top: -8%;
  opacity: 0;
}

.tc-planet-mars {
  width: min(26vw, 220px);
  left: 2%;
  top: -12%;
  opacity: 0;
}

.tc-cactus {
  position: absolute;
  bottom: 0;
  z-index: 3;
  pointer-events: none;
  user-select: none;
  will-change: transform, opacity;
}

.tc-cactus img {
  display: block;
  height: 22%;
  min-height: 90px;
  width: auto;
  filter: brightness(0.35);
}

.tc-cactus-l {
  left: 14%;
}

.tc-cactus-l img {
  height: 140px;
}

.tc-cactus-r {
  right: 16%;
}

.tc-cactus-r img {
  height: 110px;
}

.aviator-anim-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 6px rgba(245, 212, 0, 0.55));
}

.tc-ship-wrap {
  position: absolute;
  left: 0;
  top: 0;
  width: 168px;
  height: 128px;
  z-index: 8;
  will-change: transform;
  pointer-events: none;
  user-select: none;
}

.tc-ship {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.45));
}

.tc-flame {
  position: absolute;
  left: -48%;
  right: auto;
  top: 50%;
  width: 58%;
  height: auto;
  transform: translateY(-50%);
  opacity: 0;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 8px rgba(255, 140, 0, 0.85));
}

.tc-boom {
  position: absolute;
  left: 0;
  top: 0;
  width: 120px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.08s linear;
}

.tc-boom.show {
  opacity: 1;
}

.tc-go {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(52%, 420px);
  transform: translate(-50%, -50%) scale(1.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.25s ease;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}

.tc-go.show {
  opacity: 0.92;
  transform: translate(-50%, -50%) scale(1);
}

.tc-count {
  position: absolute;
  left: 50%;
  top: 44%;
  height: min(42%, 280px);
  width: auto;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 18px rgba(160, 230, 255, 0.45));
}

.tc-count.show {
  opacity: 1;
}

.tc-debris {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.tc-debris.show {
  opacity: 1;
}

.tc-shard {
  position: absolute;
  left: 0;
  top: 0;
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: brightness(12) contrast(0.2);
}

.tc-title {
  position: absolute;
  left: 12px;
  top: 8px;
  z-index: 6;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
}

.tc-ruler {
  position: absolute;
  right: 6px;
  top: 0;
  bottom: 18px;
  width: 44px;
  z-index: 6;
  pointer-events: none;
}

.tc-tick {
  position: absolute;
  right: 0;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.52);
  font-variant-numeric: tabular-nums;
}

.tc-stage.is-crashed .tc-desert,
.tc-stage.is-crashed .tc-desert-back,
.tc-stage.is-crashed .tc-cactus,
.tc-stage.is-crashed .tc-planet,
.tc-stage.is-crashed .tc-stars {
  filter: blur(7px);
  transition: filter 0.2s ease;
}

@media (max-width: 768px) {
  .tc-ship-wrap {
    width: 112px;
    height: 86px;
  }
  .tc-title {
    font-size: 9px;
  }
  .tc-tick {
    font-size: 8px;
  }
}

/* Hide original orbital rocket visuals when overlay is active */
.graph-container.has-aviator-anim #game-svg {
  opacity: 0 !important;
  pointer-events: none !important;
}

.graph-container.has-aviator-anim .orbital-scene {
  z-index: 5;
}

#waiting-state.has-final-count #countdown-display,
#waiting-state.has-final-count .progress-container {
  opacity: 0;
}

#waiting-state.has-final-count .waiting-text {
  margin-top: min(38%, 168px);
  text-transform: none;
  letter-spacing: 0.02em;
  color: #fff;
  font-size: clamp(0.85rem, 2vw, 1.15rem);
  font-weight: 600;
}
