/*
 * The 3D stage: the canvas inside the game field, and the notice for a device
 * that cannot run it. (The Classic / 3D switch and the 2D sprites are gone.)
 */

/* ---------------- 3D on ---------------- */
.stage3d-canvas,
.stage3d-flash {
  position: absolute;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.stage3d-canvas {
  z-index: -2;
}

.stage3d-flash {
  z-index: -1;
  background: #ffffff;
  opacity: 0;
}

body.visual-3d .stage3d-canvas,
body.visual-3d .stage3d-flash {
  display: block;
}

body.visual-3d .stage3d-canvas {
  animation: stage3d-in 420ms ease-out both;
}

@keyframes stage3d-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

body.visual-3d .game-field {
  background: #07122b;
}

/* The 3D camera does its own shake. */
body.visual-3d .game-field.big-impact {
  animation: none;
}

body.visual-3d .game-shade {
  background: linear-gradient(0deg, rgba(4, 24, 34, 0.24), transparent 24%);
}

/* Let the stadium show through the start panel instead of blurring it. */
body.visual-3d .game-start {
  background:
    radial-gradient(ellipse 70% 55% at 50% 50%, rgba(4, 31, 46, 0.58), rgba(4, 31, 46, 0.18) 70%, rgba(4, 31, 46, 0) 100%);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* ---------------- a device that cannot run 3D ---------------- */
.webgl-block {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(3, 20, 38, 0.96);
  color: #fff;
  text-align: center;
}
.webgl-block-box {
  max-width: 26rem;
  padding: 1.6rem 1.4rem;
  border: 1px solid rgba(243, 199, 68, 0.55);
  border-radius: 1rem;
  background: rgba(3, 32, 58, 0.95);
  box-shadow: 0 18px 50px rgba(0, 10, 28, 0.6);
}
.webgl-block-box h2 { margin: 0 0 0.6rem; font-size: 1.25rem; }
.webgl-block-box p { margin: 0 0 0.7rem; line-height: 1.45; }
.webgl-block-tip { color: rgba(255, 255, 255, 0.72); font-size: 0.9rem; }
.webgl-block-box button {
  margin-top: 0.4rem;
  padding: 0.55rem 1.3rem;
  border: 0;
  border-radius: 999px;
  background: #f3c744;
  color: #09263f;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
