/* ==========================================================
   PLATINUM NETWORK - MINING SESSION FX (v2)
   Coin stays completely stable/static at all times.
   Only a golden neon glow pulses BEHIND it, and only while
   .mining-scene-visual has .session-active (toggled by
   mining-session-fx.js based on /api/mining/status)
========================================================== */

.mining-scene-visual {
    width: 220px !important;
    height: 220px !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    filter: none !important;
    animation: none !important;
}

/* The coin's own inner image has several conflicting fixed-size rules
   across breakpoints in the site's original CSS (150px/110px/220px),
   which left it sitting off-center (top-left) once we enlarged the
   outer container above. Force it to always be dead-center regardless
   of whatever size it ends up computing to. */
.mining-scene-visual .pnrp-coin-3d {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

@media (max-width: 480px) {
    .mining-scene-visual {
        width: 160px !important;
        height: 160px !important;
    }
}

/* The coin image itself was hardcoded at a fixed 220px (from the
   original site CSS), so it didn't scale up when we enlarged the
   ring container. Sized to fit inside the innermost ring (not
   overflow past it), with a small counter-rotation since the coin
   artwork itself is drawn at a slight diagonal angle. */
.mining-scene-visual .pnrp-coin-3d {
    width: 48% !important;
    height: 48% !important;
    transform: translate(-50%, -50%) !important;
}

/* The coin's 3D-flip "back face" layer was showing through on some
   devices (a 3D backface-visibility rendering quirk), creating a
   ghosted/split look. Since the flip animation itself is disabled
   (coin-spin:none - coin is static), this layer is never needed. */
.mining-scene-visual .pnrp-coin-back {
    display: none !important;
}

.mining-scene-visual .golden-glow-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255,196,64,0.42) 0%, rgba(255,196,64,0.16) 50%, transparent 76%);
    box-shadow: 0 0 14px 4px rgba(255, 196, 64, 0.22);
    opacity: 0;
}

/* Sci-fi HUD ring layers - SVG rings that rotate independently at
   different speeds/directions around the (always-static) coin. */
.mining-scene-visual .hud-ring-svg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
}

.mining-scene-visual .hud-ring-r1      { transform-origin: 50% 50%; }
.mining-scene-visual .hud-ring-r2      { transform-origin: 50% 50%; }
.mining-scene-visual .hud-ring-r3      { transform-origin: 50% 50%; }
.mining-scene-visual .hud-ring-r4      { transform-origin: 50% 50%; }
.mining-scene-visual .hud-particles    { transform-origin: 50% 50%; }

/* Everything else inside the coin (the logo image itself) stays above
   the effects layer and completely static/untouched. */
.mining-scene-visual > *:not(.golden-glow-bg):not(.hud-ring-svg) {
    position: relative;
    z-index: 2;
}

/* Session ACTIVE -> effects turn on. The coin/logo itself never moves. */

.mining-scene-visual.session-active .golden-glow-bg,
.mining-scene-visual.session-active .hud-ring-svg {
    opacity: 1;
}

.mining-scene-visual.session-active .golden-glow-bg {
    animation: goldenGlowPulseFX 3.5s ease-in-out infinite;
}

.mining-scene-visual.session-active .hud-ring-r1 {
    animation: hudRotateCW 22s linear infinite;
}

.mining-scene-visual.session-active .hud-ring-r2 {
    animation: hudRotateCCW 14s linear infinite;
}

.mining-scene-visual.session-active .hud-ring-r3 {
    animation: hudRotateCW 9s linear infinite;
}

.mining-scene-visual.session-active .hud-ring-r4 {
    animation: hudRotateCCW 34s linear infinite;
}

.mining-scene-visual.session-active .hud-particles {
    animation: hudRotateCW 46s linear infinite, hudTwinkle 2.2s ease-in-out infinite;
}

@keyframes goldenGlowPulseFX {
    0%, 100% {
        opacity: 0.5;
        box-shadow: 0 0 8px 2px rgba(255, 196, 64, 0.15);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 16px 6px rgba(255, 196, 64, 0.35);
    }
}

@keyframes hudRotateCW  { to { transform: rotate(360deg); } }
@keyframes hudRotateCCW { to { transform: rotate(-360deg); } }
@keyframes hudTwinkle {
    0%, 100% { opacity: 0.5; }
    50%      { opacity: 1; }
}

/* ==========================================================
   MINING RING / PLATINUM NETWORK LOGO FINAL FIX
   Keep the Platinum Network logo INSIDE all three visible rings.
   The original center artwork is 700x700 and contains its own
   circular border, so it must be smaller than Ring 1.
========================================================== */
.mining-scene-visual {
    position: relative !important;
    overflow: visible !important;
    isolation: isolate !important;
}

/* Three actual dashboard rings: all around the center logo. */
.mining-scene-visual .hud-ring-1,
.mining-scene-visual .hud-ring-2,
.mining-scene-visual .hud-ring-3 {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1 !important;
    pointer-events: none !important;
    display: block !important;
}

/* Keep the fourth decorative ring out so the dashboard has 3 rings. */
.mining-scene-visual .hud-ring-4 {
    display: none !important;
}

/* Platinum Network logo stays in the center, smaller than Ring 1. */
.mining-scene-visual .pnrp-coin-3d {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 42% !important;
    height: 42% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    transform: translate(-50%, -50%) !important;
    z-index: 5 !important;
}

.mining-scene-visual .pnrp-coin-side {
    z-index: 5 !important;
}

/* The injected SVG effect must stay behind the logo too. */
.mining-scene-visual .hud-ring-svg {
    z-index: 2 !important;
    pointer-events: none !important;
}

@media (max-width: 480px) {
    .mining-scene-visual .pnrp-coin-3d {
        width: 42% !important;
        height: 42% !important;
    }
}
