@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;600;700;800&display=swap');

* {
    box-sizing: border-box;
    font-family: "Baloo 2", "Segoe UI", Arial, sans-serif;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;

    background:
        radial-gradient(circle at 15% 20%, rgba(255, 154, 0, 0.25), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(255, 55, 160, 0.25), transparent 40%),
        radial-gradient(circle at 80% 15%, rgba(55, 190, 255, 0.2), transparent 40%),
        linear-gradient(135deg, #1a0f00, #3b1f00 40%, #5c2000);

    color: white;
    position: relative;
}

/* ===== FLOATING AMBIENT BLOBS ===== */
body::before,
body::after {
    content: "";
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
    animation: blobFloat 18s ease-in-out infinite;
}

body::before {
    background: #ffae00;
    top: -120px;
    left: -120px;
}

body::after {
    background: #ff2ea6;
    bottom: -120px;
    right: -120px;
    animation-delay: -9s;
}

@keyframes blobFloat {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(60px, -40px) scale(1.15); }
    100% { transform: translate(0, 0) scale(1); }
}

/* ===== PARTICLE CANVAS ===== */
#bgCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.game {
    width: 100%;
    max-width: 1200px;
    margin: auto;
    padding: 30px;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* ===== HEADER ===== */
header h1 {
    font-size: 60px;
    margin: 10px;

    background: linear-gradient(90deg, #ffe66d, #ffae00, #ff66b2, #ffe66d);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 6s linear infinite;

    filter: drop-shadow(0 0 18px rgba(255, 174, 0, 0.6));
}

@keyframes shimmer {
    0%   { background-position: 0% center; }
    100% { background-position: 300% center; }
}

header p {
    font-size: 22px;
    color: #ffd9a3;
    text-shadow: 0 0 12px rgba(255, 174, 0, 0.4);
}

/* ===== STATS CARDS ===== */
.stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px;
}

.card {
    width: 220px;
    padding: 20px;
    border-radius: 20px;

    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);

    transition: transform .2s ease, box-shadow .3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 16px 40px rgba(255, 160, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.card h3 {
    margin: 0 0 6px 0;
    font-size: 15px;
    letter-spacing: 1px;
    color: #ffd9a3;
    text-transform: uppercase;
}

.card span {
    font-size: 35px;
    font-weight: 800;
    color: #ffe66d;
    text-shadow:
        0 0 12px rgba(255, 230, 109, 0.8),
        0 0 30px rgba(255, 174, 0, 0.5);
    font-variant-numeric: tabular-nums;
}

main {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

/* ===== CLICK BUTTON ===== */
.click-area {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    isolation: isolate;
}

#macaroniButton {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 170px;

    cursor: pointer;
    position: relative;

    background:
        radial-gradient(circle at 32% 28%, #fff7c9, #ffd75e 35%, #ffa200 70%, #ff7300);

    border: 4px solid rgba(255, 255, 255, 0.4);

    box-shadow:
        0 0 45px rgba(255, 190, 0, 0.85),
        0 0 90px rgba(255, 150, 0, 0.4),
        inset 0 0 45px rgba(255, 255, 255, 0.6),
        inset 0 -18px 40px rgba(200, 110, 0, 0.5);

    transition: transform .15s ease, box-shadow .15s ease;
    animation: pulse 2s infinite;
    user-select: none;
    -webkit-user-select: none;
}

#macaroniButton::after {
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #ffae00, #ff2ea6, #33ccff, #ffae00);
    z-index: -1;
    filter: blur(22px);
    opacity: 0.6;
    animation: spin 6s linear infinite;
}

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

#macaroniButton:hover {
    transform: scale(1.08);
}

#macaroniButton:active {
    transform: scale(.9) rotate(6deg);
}

@keyframes pulse {
    50% {
        box-shadow:
            0 0 80px #ffdd33,
            0 0 130px rgba(255, 170, 0, 0.5),
            inset 0 0 55px rgba(255, 255, 255, 0.7);
    }
}

/* ===== FLOATING NUMBERS ===== */
#floatingNumbers {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.float {
    position: absolute;
    font-size: 40px;
    font-weight: 800;
    color: #fff;
    text-shadow:
        0 0 12px #ffae00,
        0 0 25px #ff2ea6;
    animation: floatUp 1s forwards;
    white-space: nowrap;
}

@keyframes floatUp {
    from {
        opacity: 1;
        transform: translateY(0) scale(1) rotate(0deg);
    }
    to {
        opacity: 0;
        transform: translateY(-160px) scale(1.6) rotate(12deg);
    }
}

/* ===== SHOP ===== */
.shop {
    width: 420px;
    padding: 25px;
    border-radius: 25px;

    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 40px rgba(255, 174, 0, 0.08);

    margin: 0 auto;
}

.shop h2 {
    background: linear-gradient(90deg, #ffd54f, #ff9a3c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(255, 174, 0, 0.5));
}

.tabs {
    display: flex;
    gap: 10px;
}

.tabs button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

#upgradeList {
    width: 100%;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.upgrade {
    width: 100%;
    display: block;
    margin: 12px auto;
    padding: 18px;
    border: 1px solid rgba(255, 200, 80, 0.4);
    border-radius: 15px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    color: #2a1600;

    background: linear-gradient(135deg, #ffe066, #ffae33, #ff8c1a);
    background-size: 200% 200%;
    box-shadow: 0 0 18px rgba(255, 170, 0, 0.35);

    transition: transform .2s ease, box-shadow .3s ease;
}

.upgrade:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 12px 35px rgba(255, 150, 0, 0.65);
    animation: gradientShift 2.5s ease infinite;
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.upgrade span {
    display: block;
    margin-top: 8px;
}

.upgrade strong {
    display: block;
    color: #331a00;
}

/* ===== PRESTIGE ===== */
.prestige {
    margin-top: 35px;
    margin-left: auto;
    margin-right: auto;
    width: 90%;
    max-width: 800px;
    padding: 25px;
    border-radius: 25px;

    background: linear-gradient(135deg, rgba(106, 60, 255, 0.4), rgba(156, 39, 255, 0.35));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(180, 120, 255, 0.4);
    box-shadow: 0 0 45px rgba(156, 39, 255, 0.35);
}

.prestige h2 {
    background: linear-gradient(90deg, #ffd700, #b96bff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 12px rgba(178, 102, 255, 0.6));
}

#prestigeButton {
    padding: 15px 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    font-size: 22px;
    font-weight: 800;
    cursor: pointer;
    color: #3a2200;

    background: linear-gradient(135deg, #ffe066, #ffc400, #ffaa00);
    box-shadow: 0 0 28px rgba(255, 205, 0, 0.6);
    transition: transform .15s ease, box-shadow .2s ease;
}

#prestigeButton:hover {
    transform: scale(1.07);
    box-shadow: 0 0 45px rgba(255, 215, 0, 0.9);
}

#prestigeButton:active {
    transform: scale(0.95);
}

/* ===== STATISTICS ===== */
.events,
.statistics {
    margin-top: 25px;
    margin-left: auto;
    margin-right: auto;
    width: 90%;
    max-width: 800px;
    padding: 20px;
    border-radius: 20px;

    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.statistics span {
    font-weight: 800;
    color: #ffe66d;
    text-shadow: 0 0 10px rgba(255, 174, 0, 0.5);
}

/* ===== RESET ===== */
#reset {
    margin-top: 30px;
    padding: 15px 40px;
    border: 2px solid rgba(255, 80, 80, 0.6);
    border-radius: 15px;
    background: rgba(255, 48, 48, 0.2);
    backdrop-filter: blur(8px);
    color: #ffb3b3;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: background .2s, box-shadow .2s, transform .15s;
}

#reset:hover {
    background: rgba(255, 48, 48, 0.45);
    box-shadow: 0 0 30px rgba(255, 48, 48, 0.6);
    transform: translateY(-2px);
}

/* ===== GOLDEN MACARONI EVENT POPUPS ===== */
body .goldenEvent {
    filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.9));
    animation: goldenBob 0.8s ease-in-out infinite alternate;
    z-index: 1000;
}

@keyframes goldenBob {
    from { transform: translateY(0) rotate(-6deg); }
    to   { transform: translateY(-16px) rotate(6deg); }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(#ffae00, #ff2ea6);
    border-radius: 10px;
}

/* ===== MOBILE ===== */
@media (max-width: 700px) {
    #macaroniButton {
        width: 250px;
        height: 250px;
        font-size: 120px;
    }
    .shop {
        width: 100%;
    }
}
