/* 本地字体声明 */
@font-face {
    font-family: 'Fredoka One';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('static/fonts/fredoka-one.ttf') format('truetype');
}

@font-face {
    font-family: 'Press Start 2P';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('static/fonts/press-start-2p.ttf') format('truetype');
}

:root {
    --mario-red: #E52521;
    --mario-green: #43B047;
    --mario-blue: #049CD8;
    --mario-yellow: #FBD000;
    --sky-blue: #5C94FC;
    --brick-color: #B84E00;
    --ground-color: #E69138;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Fredoka One', cursive, sans-serif;
    /* Match the sky gradient for seamless overscroll */
    background: linear-gradient(180deg,
            #87CEEB 0%,
            #5C94FC 30%,
            #4a82e0 60%,
            #6b9fff 100%);
    background-attachment: fixed;
    /* Ensure gradient doesn't scroll with bounce */
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    /* Mobile viewport height support */
    width: 100vw;
    /* Prevent rubber-banding on the body */
    overscroll-behavior: none;
}

/* ==================== LOADING SCREEN ==================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #E52521 0%, #ff6b6b 50%, #E52521 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease-out;
}

.mario-spinner {
    width: 120px;
    height: 120px;
    animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4));
}

.mario-head {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.loading-text {
    margin-top: 30px;
    color: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.98);
    }
}

/* ==================== MAIN CONTENT ==================== */
#main-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    /* Lock scroll and center content */
    overflow: hidden;
    justify-content: center;
    /* Center content vertically */
}

/* ==================== BEAUTIFUL SKY BACKGROUND ==================== */
.sky-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(180deg,
            #87CEEB 0%,
            #5C94FC 30%,
            #4a82e0 60%,
            #6b9fff 100%);
}

/* Sunbeams / Godrays */
.sky-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-conic-gradient(from 0deg,
            rgba(255, 255, 255, 0.05) 0deg,
            rgba(255, 255, 255, 0.05) 15deg,
            transparent 15deg,
            transparent 30deg);
    animation: rotateSunbeams 60s linear infinite;
    z-index: 0;
}

@keyframes rotateSunbeams {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Magic Particles - Enhanced with colorful sparkles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-image:
        radial-gradient(circle, #fff 1px, transparent 1px),
        radial-gradient(circle, #FFD700 1px, transparent 1px),
        radial-gradient(circle, #fff 1px, transparent 1px),
        radial-gradient(circle, rgba(255, 215, 0, 0.6) 1.5px, transparent 1.5px);
    background-size: 50px 50px, 80px 80px, 100px 100px, 60px 60px;
    background-position: 0 0, 15px 15px, 25px 25px, 40px 40px;
    opacity: 0.4;
    animation: floatingParticles 20s linear infinite;
}

@keyframes floatingParticles {
    0% {
        background-position: 0 0, 15px 15px, 25px 25px, 40px 40px;
    }

    100% {
        background-position: 50px 100px, 35px 115px, 75px 125px, 90px 140px;
    }
}

/* Animated gradient overlay */
.sky-background::after {
    /* Changed from ::before to ::after to keep the original gradient overlay */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 50%,
            rgba(255, 255, 255, 0.05) 100%);
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

/* Fluffy Clouds - Enhanced with more variety */
.clouds-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 50%;
    background-image:
        radial-gradient(ellipse 80px 55px at 8% 25%, rgba(255, 255, 255, 0.98) 45%, transparent 50%),
        radial-gradient(ellipse 60px 40px at 12% 20%, rgba(255, 255, 255, 0.92) 45%, transparent 50%),
        radial-gradient(ellipse 100px 65px at 30% 35%, rgba(255, 255, 255, 0.98) 45%, transparent 50%),
        radial-gradient(ellipse 70px 50px at 35% 28%, rgba(255, 255, 255, 0.92) 45%, transparent 50%),
        radial-gradient(ellipse 55px 40px at 55% 18%, rgba(255, 255, 255, 0.95) 45%, transparent 50%),
        radial-gradient(ellipse 90px 60px at 75% 30%, rgba(255, 255, 255, 0.98) 45%, transparent 50%),
        radial-gradient(ellipse 65px 45px at 80% 22%, rgba(255, 255, 255, 0.92) 45%, transparent 50%),
        radial-gradient(ellipse 75px 50px at 95% 28%, rgba(255, 255, 255, 0.95) 45%, transparent 50%),
        radial-gradient(ellipse 85px 58px at 5% 12%, rgba(255, 255, 255, 0.96) 45%, transparent 50%),
        radial-gradient(ellipse 68px 48px at 52% 8%, rgba(255, 255, 255, 0.94) 45%, transparent 50%);
    filter: blur(1px) drop-shadow(0 2px 4px rgba(255, 255, 255, 0.3));
    animation: slideClouds 50s linear infinite;
}

@keyframes slideClouds {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Rolling Hills */
.hills-layer {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 200%;
    height: 220px;
    background:
        radial-gradient(ellipse 200px 200px at 80px 100%, #2d8a2d 48%, transparent 50%),
        radial-gradient(ellipse 140px 140px at 200px 100%, #3da53d 48%, transparent 50%),
        radial-gradient(ellipse 180px 180px at 380px 100%, #2d8a2d 48%, transparent 50%),
        radial-gradient(ellipse 160px 160px at 520px 100%, #4cb84c 48%, transparent 50%),
        radial-gradient(ellipse 200px 200px at 700px 100%, #3da53d 48%, transparent 50%);
    filter: drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.1));
    animation: slideHills 35s linear infinite;
}

@keyframes slideHills {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Decorative Bushes */
.bushes-layer {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 200%;
    height: 55px;
    background:
        radial-gradient(ellipse 50px 35px at 40px 100%, #5cb85c 55%, transparent 58%),
        radial-gradient(ellipse 40px 28px at 70px 100%, #6dce6d 55%, transparent 58%),
        radial-gradient(ellipse 45px 32px at 100px 100%, #5cb85c 55%, transparent 58%),
        radial-gradient(ellipse 55px 38px at 250px 100%, #6dce6d 55%, transparent 58%),
        radial-gradient(ellipse 42px 30px at 290px 100%, #5cb85c 55%, transparent 58%),
        radial-gradient(ellipse 48px 34px at 450px 100%, #5cb85c 55%, transparent 58%);
    animation: slideBushes 18s linear infinite;
}

@keyframes slideBushes {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* ==================== ANIMATED MARIO ON DRAGON ==================== */
.mario-character {
    position: fixed;
    bottom: 85px;
    left: 0;
    /* Fixed to very edge */
    width: 80px;
    /* Slightly reduced */
    height: 70px;
    /* Slightly reduced */
    z-index: 30;
    pointer-events: none;
    animation: marioFloat 3s ease-in-out infinite;
    /* Floating animation instead of run */
    filter: drop-shadow(4px 4px 8px rgba(0, 0, 0, 0.35));
}

.mario-character img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Removed jump animation as it conflicts with float, or we can keep a subtle idle breath */
    animation: none;
}

@keyframes marioFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ==================== GROUND ==================== */

@keyframes marioJump {

    0%,
    100% {
        transform: translateY(0) scaleX(1);
    }

    20% {
        transform: translateY(-25px) scaleX(1);
    }

    40% {
        transform: translateY(0) scaleX(1);
    }

    60% {
        transform: translateY(-12px) scaleX(1);
    }

    80% {
        transform: translateY(0) scaleX(1);
    }
}

/* ==================== GROUND ==================== */
.ground {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 80px;
    z-index: 10;
    animation: slideGround 4s linear infinite;
}

@keyframes slideGround {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.grass {
    height: 24px;
    width: 100%;
    /* Pixel art grass pattern */
    background-color: #5CB85C;
    background-image:
        linear-gradient(90deg, transparent 50%, #4FA332 50%),
        linear-gradient(#8ED973 50%, transparent 50%);
    background-size: 40px 100%, 100% 8px;
    border-top: 4px solid #2d5a1e;
    border-bottom: 4px solid #2d5a1e;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2) inset;
    z-index: 2;
    position: relative;
}

.dirt {
    height: 56px;
    width: 100%;
    background-color: #E69138;

    /* Complex pixel art dirt pattern (SMB3 Style) */
    background-image:
        linear-gradient(45deg, #C07020 25%, transparent 25%, transparent 75%, #C07020 75%, #C07020),
        linear-gradient(45deg, #C07020 25%, transparent 25%, transparent 75%, #C07020 75%, #C07020),
        linear-gradient(#D68C45 2px, transparent 2px),
        linear-gradient(90deg, #D68C45 2px, transparent 2px);

    background-size:
        40px 40px,
        40px 40px,
        20px 20px,
        20px 20px;

    background-position:
        0 0,
        20px 20px,
        0 0,
        0 0;

    border-top: none;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

/* ==================== CONTAINER ==================== */
.container {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 24px 80px 24px;
    /* Reduced top padding further as requested */
    z-index: 20;
    width: 100%;
}

/* ==================== LOGO / TITLE ==================== */
.logo-area {
    margin-bottom: 15px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.mario-title-wrapper {
    position: relative;
    display: inline-block;
    animation: titleFloat 3s ease-in-out infinite;
    user-select: none;
    -webkit-user-select: none;
}

.mario-title {
    font-size: 2.8rem;
    text-align: center;
    line-height: 1.15;
    letter-spacing: 2px;
    margin: 0;
    padding: 0;
}

.title-shadow {
    position: relative;
    z-index: 1;
    color: #FFD700;
    /* Fallback */
    color: transparent;

    /* Robust Outline & 3D Effect using Text-Shadow */
    text-shadow:
        /* Thick Black Outline Simulation */
        3px 3px 0 #000,
        -3px 3px 0 #000,
        -3px -3px 0 #000,
        3px -3px 0 #000,
        3px 0px 0 #000,
        -3px 0px 0 #000,
        0px 3px 0 #000,
        0px -3px 0 #000,
        /* 3D Depth */
        6px 6px 0 #000,
        /* Drop Shadow */
        6px 12px 10px rgba(0, 0, 0, 0.5);
}

.title-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;

    /* Enhanced Gold Gradient */
    background: linear-gradient(180deg,
            #FFF9C4 0%,
            #FFD700 25%,
            #FFA500 50%,
            #FF8C00 75%,
            #FFD700 100%);
    background-size: 100% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    animation: titleShine 4s ease-in-out infinite;
}

@keyframes titleShine {
    0% {
        background-position: 0% 0%;
    }

    50% {
        background-position: 0% 100%;
    }

    100% {
        background-position: 0% 0%;
    }
}

/* ==================== CORNER DECORATION ==================== */
.corner-decoration {
    position: absolute;
    top: -25px;
    left: -25px;
    width: 55px;
    height: 55px;
    z-index: 25;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
    animation: cornerFloat 3s ease-in-out infinite;
}

.corner-decoration img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes cornerFloat {

    0%,
    100% {
        transform: rotate(-5deg) scale(1);
    }

    50% {
        transform: rotate(5deg) scale(1.05);
    }
}

@keyframes titleFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes fireFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-8px) scale(1.1);
    }
}

/* Restored Fire Particles */
.fire-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.fire-particle {
    position: absolute;
    font-size: 1.2rem;
    opacity: 0;
}

.popup-fireball.active .fire-particle {
    animation: fireRise 1.5s ease-out infinite;
}

.fire-particle:nth-child(1) {
    bottom: 100%;
    left: 20%;
    animation-delay: 0s;
}

.fire-particle:nth-child(2) {
    bottom: 100%;
    left: 50%;
    animation-delay: 0.5s;
}

.fire-particle:nth-child(3) {
    bottom: 100%;
    left: 80%;
    animation-delay: 1s;
}

@keyframes fireRise {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }

    20% {
        opacity: 1;
        transform: translateY(-10px) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-50px) scale(0.3);
    }
}

/* ==================== NEW MARIO DECORATIONS ==================== */
.links-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 75%;
    max-width: 280px;
}

.mario-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 22px;
    background: linear-gradient(145deg,
            rgba(255, 215, 0, 0.95) 0%,
            rgba(255, 180, 0, 0.95) 50%,
            rgba(255, 140, 0, 0.95) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 3px solid rgba(0, 0, 0, 0.8);
    border-radius: 16px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: bold;
    position: relative;
    box-shadow:
        0 8px 0 #8B4513,
        0 10px 20px rgba(0, 0, 0, 0.25),
        inset 0 2px 0 rgba(255, 255, 255, 0.4);
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    animation: btnShimmer 4s ease-in-out infinite;

    /* Disable default touch/click highlight styles */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
}

@keyframes btnShimmer {

    0%,
    90% {
        transform: scale(1);
        filter: brightness(1);
    }

    95% {
        transform: scale(1.02);
        filter: brightness(1.1);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

/* Glassmorphism shine */
.mario-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg,
            rgba(255, 255, 255, 0.4) 0%,
            rgba(255, 255, 255, 0.1) 100%);
    border-radius: 13px 13px 50% 50%;
    pointer-events: none;
}

/* Button decoration image */
.btn-deco {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.9;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.2));
}

/* Prevent children from trapping touches which causes selection highlights */
.mario-btn>* {
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Global touch highlight reset */
* {
    -webkit-tap-highlight-color: transparent;
}

.mario-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 0 #8B4513,
        0 12px 25px rgba(0, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.5);
    filter: brightness(1.05);
}

.mario-btn:active {
    transform: translateY(6px);
    box-shadow:
        0 2px 0 #8B4513,
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.mario-btn .icon {
    font-size: 2rem;
    flex-shrink: 0;
    filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.2));
}

.mario-btn .text {
    flex: 1;
    text-align: left;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
}

/* ==================== FLOATING COINS ==================== */
.floating-coin {
    position: fixed;
    width: 28px;
    height: 28px;
    background:
        radial-gradient(circle at 40% 30%, #FFFACD 0%, transparent 50%),
        radial-gradient(circle at 30% 30%, #FFF9C4 0%, #FFD700 40%, #FFA500 80%, #FF8C00 100%);
    border: 3px solid #B8860B;
    border-radius: 50%;
    z-index: 5;
    box-shadow:
        inset -3px -3px 6px rgba(0, 0, 0, 0.3),
        inset 3px 3px 6px rgba(255, 255, 255, 0.4),
        2px 2px 8px rgba(255, 215, 0, 0.4),
        0 0 12px rgba(255, 215, 0, 0.3);
    animation: floatCoin 3.5s ease-in-out infinite;
}


.floating-coin:nth-child(1) {
    top: 12%;
    right: 12%;
    animation-delay: 0s;
}

.floating-coin:nth-child(2) {
    top: 22%;
    left: 10%;
    animation-delay: 0.7s;
}

.floating-coin:nth-child(3) {
    top: 32%;
    right: 18%;
    animation-delay: 1.4s;
}

@keyframes floatCoin {

    0%,
    100% {
        transform: translateY(0) rotateY(0deg);
        opacity: 1;
    }

    25% {
        transform: translateY(-12px) rotateY(90deg);
    }

    50% {
        transform: translateY(-20px) rotateY(180deg);
        opacity: 0.8;
    }

    75% {
        transform: translateY(-12px) rotateY(270deg);
    }
}

/* ==================== FLOATING MUSHROOMS ==================== */
.floating-mushroom {
    position: fixed;
    width: 45px;
    height: 45px;
    z-index: 5;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.25)) drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    animation: floatMushroom 4.5s ease-in-out infinite;
}

.floating-mushroom img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mushroom-1 {
    top: 18%;
    right: 6%;
    animation-delay: 0s;
}

.mushroom-2 {
    top: 38%;
    left: 0;
    width: 80px;
    height: 80px;
    animation-delay: 2s;
}

@keyframes floatMushroom {

    0%,
    100% {
        transform: translateY(0) rotate(-5deg) scale(1);
        filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.25)) drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
    }

    50% {
        transform: translateY(-25px) rotate(5deg) scale(1.08);
        filter: drop-shadow(3px 5px 8px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 12px rgba(255, 255, 255, 0.5));
    }
}


/* ==================== FLOATING MARIO ==================== */
.floating-mario {
    position: fixed;
    top: 55%;
    right: 3%;
    width: 50px;
    height: 50px;
    z-index: 5;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.25));
    animation: floatMario 5s ease-in-out infinite;
}

.floating-mario img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes floatMario {

    0%,
    100% {
        transform: translateY(0) rotate(-3deg);
    }

    50% {
        transform: translateY(-18px) rotate(3deg);
    }
}

/* ==================== FLOATING QUESTION BLOCKS ==================== */
.floating-block {
    position: fixed;
    width: 50px;
    height: 50px;
    z-index: 5;
    filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.3));
    animation: blockBounce 2.5s ease-in-out infinite;
}

.floating-block img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.block-1 {
    top: 8%;
    left: 15%;
    animation-delay: 0s;
}

.block-2 {
    top: 65%;
    right: 10%;
    width: 45px;
    height: 45px;
    animation-delay: 1.2s;
}

@keyframes blockBounce {

    0%,
    100% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.3)) brightness(1);
    }

    15% {
        transform: translateY(-8px) scale(1.05);
        filter: drop-shadow(3px 5px 8px rgba(0, 0, 0, 0.35)) brightness(1.1);
    }

    30% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(3px 3px 6px rgba(0, 0, 0, 0.3)) brightness(1);
    }

    45% {
        transform: translateY(-4px) scale(1.02);
    }

    60% {
        transform: translateY(0) scale(1);
    }
}

/* Custom Popup Image Positioning */

/* Shared styles for static centered placement could be used, but keeping separate classes for individual tweaks if needed */

/* Popup 1: Mario Head */
.custom-deco-head {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    z-index: 30;
    /* Animation removed as requested */
}

/* Popup 2: Basketball Mario */
.mario-basketball {
    position: absolute;
    top: -70px;
    /* Adjusted to sit nicely */
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    /* Slightly larger for center stage */
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    z-index: 25;
}

#popup-star .popup-title {
    margin-top: 30px;
}

/* Popup 3: Soccer Mario */
.mario-soccer {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    z-index: 25;
}

#popup-brick .popup-title {
    margin-top: 50px;
}

/* Popup 4: Coin Character (Luigi) */
.coin-char {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
    z-index: 25;
    /* Animation removed as requested */
}

/* Popup 5: Fireball Character (Mario & Yoshi) */
.fire-char {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 110px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(255, 69, 0, 0.6));
    z-index: 30;
    /* Animation removed as requested */
}

/* Removed unused keyframes headBob, floatChar, fireFloat */
.btn-icon-img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    /* Make circular */
    object-fit: cover;
    /* Ensure it fills the circle */
    flex-shrink: 0;
    filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.2));
    border: 2px solid rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.mario-btn:active .btn-icon-img {
    transform: scale(0.95);
}

/* ==================== MARIO POPUPS - BASE STYLES ==================== */
.mario-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mario-popup.active {
    opacity: 1;
    visibility: visible;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 215, 0, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 80% 70%, rgba(255, 69, 0, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 50% 50%, rgba(92, 148, 252, 0.1) 0%, transparent 30%),
        rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: overlayPulse 3s ease-in-out infinite;
}

@keyframes overlayPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.95;
    }
}


.popup-content {
    position: relative;
    width: 85%;
    max-width: 320px;
    padding: 30px 25px;
    border-radius: 20px;
    text-align: center;
    z-index: 1;
    overflow: visible;
}

.popup-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 36px;
    height: 36px;
    border: 3px solid #000;
    border-radius: 50%;
    background: linear-gradient(145deg, #ff6b6b, #E52521);
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 0 #8B0000, 0 6px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.15s ease;
    z-index: 10;
}

.popup-close:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #8B0000, 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Popup Title - Adjusted padding/margin */
.popup-title {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.4rem;
    margin-bottom: 25px;
    margin-top: 10px;
    text-shadow: 2px 2px 0 #000;
    color: #fff;
    background: linear-gradient(180deg, #FBD000 0%, #F57C00 100%);
    padding: 12px 24px;
    border-radius: 50px;
    border: 3px solid #000;
    display: inline-block;
    transform: rotate(-2deg);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10;
}

.popup-subtitle {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 20px;
    opacity: 0.9;
}

.popup-contacts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    border: 3px solid rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3), 0 6px 15px rgba(0, 0, 0, 0.2);
}

.btn-text-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.btn-label {
    font-size: 1.1rem;
    font-weight: bold;
}

.account-id {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: normal;
    font-family: 'Press Start 2P', cursive;
    /* Optional: pixel font for ID? Or stick to sans */
    font-family: inherit;
    letter-spacing: 0.5px;
}

.contact-btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 2px 5px rgba(0, 0, 0, 0.2);
}

.contact-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.telegram-btn {
    background: linear-gradient(145deg, #2AABEE, #229ED9);
    border-color: #1a7fb5;
}

.whatsapp-btn {
    background: linear-gradient(145deg, #25D366, #128C7E);
    border-color: #075E54;
}

.popup-decoration {
    position: absolute;
    font-size: 2rem;
    z-index: -1;
    pointer-events: none;
}

/* ==================== POPUP 1: MUSHROOM STYLE ==================== */
.popup-mushroom .popup-content {
    background: linear-gradient(145deg, #ff6b6b 0%, #E52521 50%, #c41e1e 100%);
    border: 4px solid #000;
    box-shadow:
        0 8px 0 #8B0000,
        0 12px 30px rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
    transform: translateY(100%) scale(0.5);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.popup-mushroom.active .popup-content {
    transform: translateY(0) scale(1);
    opacity: 1;
    animation: mushroomBounce 0.6s ease-out;
}

@keyframes mushroomBounce {
    0% {
        transform: translateY(100%) scale(0.5);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }

    70% {
        transform: translateY(10px) scale(0.98);
    }

    85% {
        transform: translateY(-5px) scale(1.02);
    }

    100% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

/* Cleanup Emojis - Make them subtle background elements */
.mushroom-deco {
    top: -25px;
    right: 50px;
    left: auto;
    opacity: 0.85;
    transform: rotate(-15deg);
    font-size: 2.5rem;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.3));
    animation: mushroomFloat 3s ease-in-out infinite;
}

.mushroom-deco-2 {
    bottom: 15px;
    right: -15px;
    font-size: 2.2rem;
    opacity: 0.85;
    animation: mushroomFloat 3s ease-in-out infinite 0.5s;
    z-index: 20;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.3));
}

@keyframes mushroomFloat {

    0%,
    100% {
        transform: translateY(0) rotate(5deg);
    }

    50% {
        transform: translateY(-5px) rotate(10deg);
    }
}

.popup-coins {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.mini-coin {
    font-size: 0;
    /* Hide emoji text */
    width: 24px;
    height: 24px;
    background: radial-gradient(circle at 30% 30%, #FFF9C4 0%, #FFD700 40%, #FFA500 80%, #FF8C00 100%);
    border: 2px solid #8B4513;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    animation: coinSpin 1.5s linear infinite;
    /* changed to linear for smoother 3d flair or keep ease */
}

/* Add a pseudo-element for the "$" or inner detail if desired, or keep simple gold circle */
.mini-coin::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60%;
    height: 60%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.mini-coin:nth-child(2) {
    animation-delay: 0.3s;
}

.mini-coin:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes coinSpin {
    0% {
        transform: scale(1) rotateY(0deg);
    }

    50% {
        transform: scale(1.1) rotateY(180deg);
    }

    100% {
        transform: scale(1) rotateY(360deg);
    }
}

/* ==================== POPUP 2: STAR STYLE ==================== */
.popup-star .popup-content {
    background: linear-gradient(145deg, #FFD700 0%, #ffbf00 50%, #FF8C00 100%);
    border: 4px solid #000;
    box-shadow:
        0 8px 0 #B8860B,
        0 12px 30px rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.4);
    transform: scale(0) rotate(-180deg);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 24px;
}

.popup-star.active .popup-content {
    transform: scale(1) rotate(0deg);
    opacity: 1;
    animation: starPulse 2s ease-in-out infinite 0.6s;
}

@keyframes starPulse {

    0%,
    100% {
        box-shadow: 0 8px 0 #B8860B, 0 12px 30px rgba(0, 0, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.4);
    }

    50% {
        box-shadow: 0 8px 0 #B8860B, 0 12px 40px rgba(255, 215, 0, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.6);
    }
}

.popup-star .popup-subtitle {
    color: #1a1a1a;
}

/* Star Decorations */
.star-deco {
    top: -25px;
    right: 40px;
    left: auto;
    transform: none;
    font-size: 2.5rem;
    animation: starSpin 4s linear infinite;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
    z-index: 20;
}

.star-deco-2 {
    bottom: 15px;
    left: -20px;
    top: auto;
    font-size: 2rem;
    animation: sparkleFloat 2s ease-in-out infinite;
    z-index: 20;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.2));
}

.star-deco-3 {
    bottom: 15px;
    right: -20px;
    top: auto;
    font-size: 2rem;
    animation: starSpin 3s linear infinite reverse;
    z-index: 20;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.2));
}

@keyframes starSpin {
    0% {
        transform: rotate(0deg) scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
    }

    50% {
        transform: rotate(180deg) scale(1.2);
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.9));
    }

    100% {
        transform: rotate(360deg) scale(1);
        filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
    }
}

/* Sparkle Float Animation */
@keyframes sparkleFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.9;
    }

    50% {
        transform: translateY(-8px) scale(1.15);
        opacity: 1;
    }
}

/* ==================== POPUP 3: BRICK STYLE ==================== */
.popup-brick .popup-content {
    background: linear-gradient(145deg, #D2691E 0%, #B84E00 50%, #8B4513 100%);
    border: 4px solid #000;
    box-shadow:
        0 8px 0 #5D3A1A,
        0 12px 30px rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.2),
        inset 4px 4px 0 rgba(255, 255, 255, 0.1),
        inset -4px -4px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-150%) scale(0.8);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.55, 0.055, 0.675, 0.19);
    border-radius: 4px;
    overflow: visible;
    /* Allow decorations to show outside bounds */
}

.popup-brick.active .popup-content {
    transform: translateY(0) scale(1);
    opacity: 1;
    animation: brickDrop 0.6s ease-out;
}

@keyframes brickDrop {
    0% {
        transform: translateY(-150%) scale(0.8);
    }

    60% {
        transform: translateY(10px) scale(1.02);
    }

    70% {
        transform: translateY(0) scale(1);
    }

    75% {
        transform: translateX(-3px);
    }

    80% {
        transform: translateX(3px);
    }

    85% {
        transform: translateX(-2px);
    }

    90% {
        transform: translateX(2px);
    }

    95% {
        transform: translateX(-1px);
    }

    100% {
        transform: translateX(0);
    }
}

.popup-brick .popup-subtitle {
    color: #FFD700;
    text-shadow: 2px 2px 0 #000;
}

/* Brick Decorations - Simplified */
.brick-deco {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    pointer-events: none;
}

/* Question Block - Center Top */
.brick-deco img:not(.mario-soccer) {
    width: 70px;
    height: 70px;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
    /* animation: questionBounce 2s ease-in-out infinite; */
}

@keyframes questionBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}



.popup-particles {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 50px;
    pointer-events: none;
}

.brick-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #8B4513;
    border: 1px solid #5D3A1A;
    opacity: 0;
}

.popup-brick.active .brick-particle {
    animation: particleBurst 0.6s ease-out forwards;
}

.brick-particle:nth-child(1) {
    left: 20%;
    animation-delay: 0s;
}

.brick-particle:nth-child(2) {
    left: 40%;
    animation-delay: 0.05s;
}

.brick-particle:nth-child(3) {
    left: 60%;
    animation-delay: 0.1s;
}

.brick-particle:nth-child(4) {
    left: 80%;
    animation-delay: 0.15s;
}

@keyframes particleBurst {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(-50px) rotate(180deg);
        opacity: 0;
    }
}

/* Brick Bottom Decorations */
.brick-bottom-left {
    position: absolute;
    bottom: -25px;
    left: -35px;
    font-size: 3rem;
    opacity: 1;
    transform: rotate(-20deg);
    animation: brickFloat 2.5s ease-in-out infinite;
    z-index: 25;
    filter: drop-shadow(0 0 8px rgba(255, 200, 150, 0.8)) drop-shadow(3px 3px 5px rgba(0, 0, 0, 0.6));
}

.brick-bottom-right {
    position: absolute;
    bottom: -25px;
    right: -35px;
    font-size: 3rem;
    opacity: 1;
    transform: rotate(20deg);
    animation: brickFloat 2.5s ease-in-out infinite 0.3s;
    z-index: 25;
    filter: drop-shadow(0 0 8px rgba(255, 200, 150, 0.8)) drop-shadow(3px 3px 5px rgba(0, 0, 0, 0.6));
}

@keyframes brickFloat {

    0%,
    100% {
        transform: rotate(-20deg) translateY(0);
    }

    50% {
        transform: rotate(-15deg) translateY(-12px);
    }
}

/* ==================== POPUP 4: COIN STYLE ==================== */
.popup-coin .popup-content {
    background: linear-gradient(145deg, #FFD700 0%, #DAA520 50%, #B8860B 100%);
    border: 4px solid #000;
    box-shadow:
        0 8px 0 #8B6914,
        0 12px 30px rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    transform: scale(0.3) rotateY(90deg);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup-coin.active .popup-content {
    transform: scale(1) rotateY(0deg);
    opacity: 1;
    animation: coinPop 0.8s ease-out;
}

@keyframes coinPop {
    0% {
        transform: scale(0.3) rotateY(90deg);
    }

    40% {
        transform: scale(1.1) rotateY(-10deg);
    }

    60% {
        transform: scale(0.95) rotateY(5deg);
    }

    80% {
        transform: scale(1.02) rotateY(-2deg);
    }

    100% {
        transform: scale(1) rotateY(0deg);
    }
}

.popup-coin .popup-subtitle {
    color: #1a1a1a;
}

/* Coin Decorations - Use new CSS coin style */
.coin-deco {
    /* Replace emoji with CSS coin logic via class change in HTML or style override if mostly div */
    /* Assuming we will update HTML to match, but here we style the container positions */
    position: absolute;
    top: -20px;
    left: 10px;
    transform: none;
    z-index: 20;
}

.coin-deco-2 {
    position: absolute;
    bottom: -20px;
    right: 30px;
    transform: none;
    z-index: 20;
}

/* Add custom animations for these specific placements */
.coin-deco .mini-coin,
.coin-deco-2 .mini-coin {
    width: 40px;
    height: 40px;
    animation: coinSpin 2s linear infinite;
    box-shadow:
        inset -3px -3px 6px rgba(0, 0, 0, 0.3),
        inset 3px 3px 6px rgba(255, 255, 255, 0.5),
        0 0 15px rgba(255, 215, 0, 0.6),
        0 0 30px rgba(255, 215, 0, 0.3);
}

@keyframes coinFlip {

    0%,
    100% {
        transform: rotateY(0deg) scale(1);
    }

    50% {
        transform: rotateY(180deg) scale(1.1);
    }
}

.coin-sparkles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.sparkle {
    position: absolute;
    font-size: 1rem;
    opacity: 0;
}

.popup-coin.active .sparkle {
    animation: sparkleAnim 1.5s ease-out infinite;
}

.sparkle:nth-child(1) {
    top: -10px;
    left: 10%;
    animation-delay: 0s;
}

.sparkle:nth-child(2) {
    top: 30%;
    right: -15px;
    animation-delay: 0.3s;
}

.sparkle:nth-child(3) {
    bottom: -10px;
    left: 30%;
    animation-delay: 0.6s;
}

.sparkle:nth-child(4) {
    top: 50%;
    left: -15px;
    animation-delay: 0.9s;
}

@keyframes sparkleAnim {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }

    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

/* Coin Corner Decorations */
.coin-corner-tl {
    position: absolute;
    top: -15px;
    left: -10px;
    font-size: 2rem;
    animation: coinBounce 2s ease-in-out infinite;
    z-index: 20;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.3));
}

.coin-corner-br {
    position: absolute;
    bottom: -15px;
    right: -10px;
    font-size: 2rem;
    animation: coinBounce 2s ease-in-out infinite 0.5s;
    z-index: 20;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.3));
}

@keyframes coinBounce {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-8px) scale(1.1);
    }
}

/* Fire Bottom Decoration */
.fire-bottom-left {
    position: absolute;
    bottom: 10px;
    left: -12px;
    font-size: 1.8rem;
    animation: electricPulse 1s ease-in-out infinite;
    z-index: 20;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.8));
}

@keyframes electricPulse {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* ==================== POPUP 5: FIREBALL STYLE ==================== */
.popup-fireball .popup-content {
    background: linear-gradient(145deg, #FF4500 0%, #E52521 50%, #8B0000 100%);
    border: 4px solid #000;
    box-shadow:
        0 8px 0 #5C0000,
        0 12px 30px rgba(255, 69, 0, 0.5),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
    transform: scale(0);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.popup-fireball.active .popup-content {
    transform: scale(1);
    opacity: 1;
    animation: fireballBurst 0.7s ease-out, fireGlow 2s ease-in-out infinite 0.7s;
}

@keyframes fireballBurst {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.15);
    }

    70% {
        transform: scale(0.95);
    }

    85% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes fireGlow {

    0%,
    100% {
        box-shadow: 0 8px 0 #5C0000, 0 12px 30px rgba(255, 69, 0, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.3);
    }

    50% {
        box-shadow: 0 8px 0 #5C0000, 0 12px 50px rgba(255, 69, 0, 0.8), 0 0 30px rgba(255, 165, 0, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.3);
    }
}

.popup-fireball .popup-subtitle {
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.fire-deco {
    top: -20px;
    left: 20px;
    font-size: 2rem;
    animation: fireFloat 1s ease-in-out infinite;
    z-index: 20;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.3));
}

.fire-deco-2 {
    top: -20px;
    right: 20px;
    left: auto;
    font-size: 2.2rem;
    animation: fireFloat 1s ease-in-out infinite 0.3s;
    z-index: 20;
    filter: drop-shadow(2px 2px 3px rgba(0, 0, 0, 0.3));
}

@keyframes fireFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-8px) scale(1.1);
    }
}

/* Reposition Green Pipe & Piranha Plant to Bottom Right Corner Peeking */
.mario-pipe {
    position: absolute;
    bottom: -20px;
    right: -30px;
    width: 65px;
    height: 90px;
    z-index: 20;
    pointer-events: none;
    transform: rotate(10deg);
}

.piranha-plant {
    position: absolute;
    bottom: 75%;
    left: 50%;
    transform: translateX(-50%);
    width: 35px;
    height: 50px;
    animation: plantBite 2.5s infinite ease-in-out;
}


.plant-stem {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 25px;
    background: #00cc1b;
    border: 2px solid #000;
    z-index: 1;
}

.plant-head {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 35px;
    background: radial-gradient(circle at 30% 30%, white 0%, white 20%, #E52521 21%);
    border-radius: 50%;
    border: 3px solid #000;
    z-index: 2;
    background-color: #E52521;
}

.plant-head::before {
    /* Mouth */
    content: '';
    position: absolute;
    top: 40%;
    right: 0;
    width: 40%;
    height: 20%;
    background: #000;
    border-radius: 10px 0 0 10px;
}

@keyframes plantBite {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-25px);
    }
}

/* --- Lakitu Cloud --- */
.mario-cloud {
    position: absolute;
    top: -35px;
    left: -20px;
    width: 80px;
    height: 50px;
    background: #fff;
    border-radius: 30px;
    border: 3px solid #000;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.2);
    z-index: 5;
    animation: cloudBob 3s ease-in-out infinite;
}

.mario-cloud::before,
.mario-cloud::after {
    content: '';
    position: absolute;
    background: #fff;
    border-radius: 50%;
    border-top: 3px solid #000;
}

@keyframes cloudBob {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* --- Big Mushroom Image --- */
.big-mushroom-img {
    position: absolute;
    bottom: 12px;
    left: -20px;
    width: 75px;
    height: 75px;
    z-index: 20;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
    animation: bounce 2s infinite;
    transform-origin: bottom center;
}

/* --- Pixel Grass --- */
.pixel-grass {
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 15px;
    background:
        linear-gradient(90deg, #5CB85C 50%, transparent 50%),
        linear-gradient(90deg, transparent 50%, #4FA332 50%);
    background-size: 20px 100%, 20px 100%;
    border-top: 3px solid #000;
    z-index: 1;
}

/* ==================== USER PROVIDED ASSETS ==================== */

/* ==================== USER PROVIDED ASSETS & REPOSITIONING ==================== */

/* Asset A: Gold Flower/Plant - Move to Top Left Corner "Sitting" position */
.custom-deco-1 {
    position: absolute;
    top: -30px;
    left: -20px;
    width: 70px;
    height: 70px;
    object-fit: contain;
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.4));
    animation: sway 3s ease-in-out infinite;
    z-index: 20;
    pointer-events: none;
    transform-origin: bottom center;
}

@keyframes sway {

    0%,
    100% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

/* Asset B: Decoration 2 */
.custom-deco-2 {
    position: absolute;
    bottom: 15px;
    left: -15px;
    width: 65px;
    height: 65px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
    z-index: 20;
    pointer-events: none;
}

/* Sprite Sheet Base */
.mario-sprite {
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url('static/images/jDqAbkL8pb.png');
    background-size: 300% 200%;
    image-rendering: pixelated;
    filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, 0.3));
    z-index: 20;
    pointer-events: none;
}

/* Sprite 1 (Mario): Top Right Peeking */
.sprite-pos-1 {
    background-position: 0% 0%;
    top: -25px;
    right: 40px;
    /* Positioned between title and close button */
    transform: translateY(0);
    animation: peekFloater 3s ease-in-out infinite;
}

@keyframes peekFloater {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Sprite 2 (Luigi): Bottom Right Standing */
.sprite-pos-2 {
    background-position: 50% 0%;
    top: auto;
    bottom: 15px;
    right: -15px;
    transform: none;
    animation: hop 2s ease infinite;
}

@keyframes hop {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Sprite 3: Bottom Right */
.sprite-pos-3 {
    background-position: 100% 0%;
    bottom: 12px;
    right: -10px;
}

/* Sprite 4: Bottom Left */
.sprite-pos-4 {
    background-position: 0% 100%;
    bottom: 12px;
    left: -10px;
}

/* Sprite 5 & 6: Center Sides */
.sprite-pos-5 {
    background-position: 50% 100%;
    top: 50%;
    left: -25px;
    transform: translateY(-50%) rotate(-10deg);
}

.sprite-pos-6 {
    background-position: 100% 100%;
    top: 50%;
    right: -25px;
    transform: translateY(-50%) rotate(10deg);
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }
}