/* Dragon's Crash stage — red temple, gold loader, falling coins, fire crash */

.graph-container.has-aviator-anim {
  position: relative;
  overflow: hidden;
  background: #7a1612 !important;
  border-color: rgba(212, 160, 48, 0.35) !important;
}

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

.graph-container.has-aviator-anim > *:not(.dc-stage):not(.dc-hud):not(.dc-side-mult) {
  position: relative;
  z-index: 5;
}

.graph-container.has-aviator-anim .graph-overlay {
  z-index: 8;
  align-items: flex-end;
  justify-content: center;
}

.graph-container.has-aviator-anim #multiplier-container {
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: 7.5% !important;
  transform: translateX(-50%) !important;
  text-align: center;
  opacity: 0 !important;
  pointer-events: none !important;
}

.graph-container.has-aviator-anim .multiplier-display {
  font-size: 1.8rem !important;
}

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

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

.dc-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  background: #7a1612;
}

.dc-world {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform: translateY(-30px);
  pointer-events: none;
}

.dc-bg {
  position: absolute;
  inset: 0;
  background-color: #7a1612;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.dc-rays {
  position: absolute;
  left: 50%;
  top: -12%;
  width: 55%;
  height: 48%;
  transform: translateX(-50%);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 140% auto;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.55;
  z-index: 2;
  animation: dc-rays-pulse 3.6s ease-in-out infinite;
}

@keyframes dc-rays-pulse {
  0%,
  100% {
    opacity: 0.75;
  }
  50% {
    opacity: 1;
  }
}

.dc-lanterns {
  position: absolute;
  left: 0;
  top: 4%;
  width: 78px;
  height: 68%;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: left top;
  z-index: 3;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35));
}

.dc-emblem {
  position: absolute;
  left: 50%;
  top: 34%;
  width: min(58%, 420px);
  height: min(58%, 420px);
  transform: translate(-50%, -50%);
  background: none;
  z-index: 7;
  opacity: 0;
  pointer-events: none;
}

.dc-stage.is-waiting .dc-emblem {
  opacity: 1 !important;
  border-radius: 50%;
  box-shadow:
    0 0 0 8px #e8c15a,
    0 0 20px rgba(255, 200, 70, 0.55);
}

.dc-count {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: Inter, "Segoe UI", sans-serif;
  font-weight: 900;
  font-size: clamp(3.4rem, 12vw, 5.8rem);
  line-height: 1;
  color: #fff6d2;
  text-shadow:
    0 2px 0 #7a3a08,
    0 0 18px rgba(255, 210, 80, 0.9),
    0 0 28px rgba(255, 160, 20, 0.55);
  pointer-events: none;
}

.dc-stage.is-waiting .dc-count {
  display: flex;
}

.dc-loader {
  position: absolute;
  inset: -4%;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.dc-stage.is-waiting .dc-loader {
  opacity: 1;
}

.dc-loader-track,
.dc-loader-arc {
  position: absolute;
  inset: 2%;
  border-radius: 50%;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 16px), #000 calc(100% - 14px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 16px), #000 calc(100% - 14px));
}

.dc-loader-track {
  background: conic-gradient(
    from 0deg,
    rgba(255, 210, 80, 0.18),
    rgba(255, 170, 40, 0.35),
    rgba(255, 210, 80, 0.18)
  );
}

.dc-loader-arc {
  background: conic-gradient(
    from -90deg,
    #fff6c0 0deg,
    #ffe36a 28deg,
    rgba(255, 200, 60, 0.05) 70deg,
    transparent 85deg,
    transparent 360deg
  );
  filter: drop-shadow(0 0 10px #ffd24a) drop-shadow(0 0 18px #ff9a1a);
  animation: dc-loader-spin 1.15s linear infinite;
}

@keyframes dc-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

.dc-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
}

.dc-coins {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 6;
  pointer-events: none;
}

.dc-stage.is-waiting .dc-canvas {
  -webkit-mask-image: radial-gradient(
    circle at 50% 34%,
    #000 0,
    #000 min(28.6%, 208px),
    transparent min(29.4%, 214px)
  );
  mask-image: radial-gradient(
    circle at 50% 34%,
    #000 0,
    #000 min(28.6%, 208px),
    transparent min(29.4%, 214px)
  );
}

.dc-stage.is-crashed .dc-table {
  opacity: 0;
}

.dc-stage.is-crashed .dc-emblem {
  opacity: 0;
}

.dc-plate {
  position: absolute;
  left: 50%;
  bottom: 16%;
  width: 88%;
  height: 32%;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-size: contain;
}

.dc-table {
  display: none !important;
}

.dc-hud {
  position: absolute;
  left: 50%;
  bottom: 24%;
  transform: translateX(-50%);
  z-index: 12 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.dc-bets {
  display: none !important;
}

.dc-mult {
  min-width: 168px;
  padding: 0.42rem 1.45rem 0.48rem;
  border-radius: 999px;
  background: radial-gradient(ellipse at 50% 28%, #ffe98a 0%, #e4b03c 58%, #c48418 100%);
  border: 3px solid #8c1c14;
  color: #1f0c04;
  font: 900 1.85rem/1 Inter, "Segoe UI", sans-serif;
  letter-spacing: -0.03em;
  text-align: center;
  box-shadow: 0 6px 0 #6a140e, 0 10px 16px rgba(0, 0, 0, 0.35);
}

.dc-hud.is-wait {
  bottom: 24%;
}

.dc-hud.is-wait .dc-mult {
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.dc-hud.is-fly .dc-mult,
.dc-hud.is-crash .dc-mult {
  display: none;
}

.dc-hud.is-crash {
  opacity: 0;
  transition: opacity 0.12s linear;
}

.dc-side-mult {
  position: absolute;
  right: 3.5%;
  top: 18%;
  z-index: 14 !important;
  pointer-events: none;
  font-family: Inter, "Segoe UI", sans-serif;
  font-weight: 900;
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: #fff6d0;
  text-shadow:
    0 2px 0 #6a2a08,
    0 0 18px rgba(255, 210, 70, 0.85),
    0 0 32px rgba(255, 160, 20, 0.45);
  opacity: 0;
}

.dc-side-mult.is-on {
  opacity: 1;
}

.dc-side-mult.is-crash {
  color: #ff7a18;
  text-shadow:
    0 2px 0 #5a1408,
    0 0 20px rgba(255, 110, 20, 0.95);
}

.graph-container.has-aviator-anim #cashout-popups {
  right: 3%;
  top: 42%;
  z-index: 16;
  max-height: 48%;
}

.graph-container.has-aviator-anim .cashout-popup {
  background: rgba(40, 10, 8, 0.72);
  border: 1px solid rgba(232, 193, 90, 0.45);
}

.graph-container.has-aviator-anim .popup-mult {
  font-size: 0.95rem;
  color: #ffe27a;
}

.graph-container.has-aviator-anim .popup-user,
.graph-container.has-aviator-anim .popup-amount {
  font-size: 0.78rem;
}

.dc-stage.is-waiting .dc-plate {
  filter: brightness(0.95);
}

@media (max-width: 812px) {
  .dc-lanterns {
    width: 52px;
  }
  .dc-mult {
    font-size: 1.35rem;
    min-width: 130px;
    padding: 0.32rem 1.1rem;
  }
  .graph-container.has-aviator-anim .waiting-text {
    min-width: 168px;
    font-size: 1.05rem;
    padding: 0.42rem 1.2rem;
  }
  .dc-hud {
    bottom: 22%;
  }
  .dc-side-mult {
    font-size: clamp(2.1rem, 9vw, 3.4rem);
    right: 2.5%;
    top: 16%;
  }
}
