@keyframes floatPrompt {
    0%, 100% {
        transform: translate(-50%, 0);
    }

    50% {
        transform: translate(-50%, -6px);
    }
}

@font-face {
    font-family: "Splinters";
    src: url("../assets/fonts/splinters.ttf") format("truetype"), url("../assets/fonts/splinters.woff2") format("woff2"),;
    font-weight: normal;
    font-style: normal;
}

.float-prompt {
    animation: floatPrompt 0.8s ease-in-out infinite;
}
.coin-fly {
    position: fixed;
    width: 26px;
    height: 26px;
    pointer-events: none;
    z-index: 99999;
    transition:
        left .8s cubic-bezier(.2,.8,.2,1),
        top .8s cubic-bezier(.2,.8,.2,1),
        transform .8s,
        opacity .8s;
}
@keyframes coinPulse {
0%, 100% {
    transform: scale(1);
}
50% {
    transform: scale(1.05);
}
}

@keyframes coinFlip {
0%, 96%, 100% {
    rotate: y 0deg;
}

98% {
    rotate: y 180deg;
}

99% {
    rotate: y 360deg;
}
}

.coin {
animation:
    coinPulse 1s ease-in-out infinite,
    coinFlip 10s linear infinite;
transform-style: preserve-3d;
will-change: transform;
}
#buildModal {
    position: absolute;
    transform: translate(-50%, -100%);
}
#buildModal {
    transform: translate(-50%, -100%) scale(0.7);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

#buildModal.show {
    transform: translate(-50%, -100%) scale(1);
    opacity: 1;
    pointer-events: auto;
}
#mobileController,
#joyBase,
#joyThumb {
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}
/* Mobile (default) */
#game {
    width: 100vw;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

/* Desktop */
@media (min-width: 768px) {
    body {
        margin: 0;
        background: #1f2937; /* optional dark background */
        /* display: flex;
        justify-content: center;
        align-items: center; */
        height: 100vh;
    }

    #game {
        width: 700px;
        height: 720px;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0,0,0,.35);
    }
}

.game-btn{

    position:relative;

    overflow:hidden;

    padding:16px 34px;

    border-radius:20px;

    border:4px solid white;

    font-size:18px;

    font-weight:bold;

    letter-spacing:.5px;

    cursor:pointer;

    transition:.12s;

    color:white;

    text-shadow:0 2px 2px rgba(0,0,0,.25);

}


/* Shine */

.game-btn::before{

    content:"";

    position:absolute;

    left:14px;

    top:8px;

    width:70px;

    height:10px;

    border-radius:999px;

    background:rgba(255,255,255,.55);

}


/* Press */

.game-btn:active{

    transform:translateY(4px);

}


/* Disabled */

.game-btn:disabled{

    opacity:.45;

    filter:grayscale(100%);

    cursor:not-allowed;

    box-shadow:none;

    transform:none;

}

.game-btn:disabled::before{

    display:none;

}


/* Hover */

.game-btn:hover:not(:disabled){

    filter:brightness(1.08);

}


/* BLUE */

.blue{

    background:linear-gradient(

        to bottom,

        #4fc3ff,

        #2287ff,

        #0d47d8

    );

    box-shadow:0 6px 0 #1d4ed8;

}


/* GREEN */

.green{

    background:linear-gradient(

        to bottom,

        #a3f94b,

        #30c553,

        #157f3d

    );

    box-shadow:0 6px 0 #157f3d;

}


/* RED */

.red{

    background:linear-gradient(

        to bottom,

        #ff7a7a,

        #ff4343,

        #b71c1c

    );

    box-shadow:0 6px 0 #991b1b;

}


/* ORANGE */

.orange{

    background:linear-gradient(

        to bottom,

        #ffc15d,

        #ff8d1f,

        #b64900

    );

    box-shadow:0 6px 0 #9a3412;

}


/* PURPLE */

.purple{

    background:linear-gradient(

        to bottom,

        #c99dff,

        #8d49ff,

        #5b21b6

    );

    box-shadow:0 6px 0 #5b21b6;

}


/* PINK */

.pink{

    background:linear-gradient(

        to bottom,

        #ffb3e0,

        #ff4da0,

        #c2185b

    );

    box-shadow:0 6px 0 #be185d;

}


/* BROWN */

.brown{

    background:linear-gradient(

        to bottom,

        #d89d4f,

        #9a5d22,

        #4e342e

    );

    box-shadow:0 6px 0 #44403c;

}


/* WHITE */

.white{

    color:#2563eb;

    background:linear-gradient(

        to bottom,

        white,

        #eef2f7,

        #cbd5e1

    );

    box-shadow:0 6px 0 #94a3b8;

}

.white::before{

    background:#bde7ff;

}

/* ==========================================
   SMALL
========================================== */

.btn-sm{

    padding:8px 16px;

    font-size:14px;

    border-width:2px;

    border-radius:12px;

}

.btn-sm::before{

    left:8px;

    top:3px;

    width:32px;

    height:4px;

}


/* ==========================================
   MEDIUM
========================================== */

.btn-md{

    padding:12px 24px;

    font-size:16px;

    border-width:4px;

    border-radius:18px;

}

.btn-md::before{

    left:12px;

    top:5px;

    width:64px;

    height:8px;

}


/* ==========================================
   LARGE
========================================== */

.btn-lg{

    padding:16px 32px;

    font-size:18px;

    border-width:4px;

    border-radius:24px;

}

.btn-lg::before{

    left:16px;

    top:6px;

    width:96px;

    height:10px;

}

#happy-dialog {
    position: fixed;

    left: 50%;
    bottom: 2vh;

    transform: translateX(-50%);

    width: min(50vw, 100px);

    display: none;

    z-index: 99999;

    pointer-events: none;
}

#happy-dialog-img {
    display: block;
    width: 100%;
    height: auto;
}

/* Entire dialog container */

#dialog {
    position: fixed;

    left: 50%;
    bottom: 2vh;

    transform: translateX(-50%);

    width: min(80vw, 500px);

    display: none;

    z-index: 99;

    pointer-events: none;
}

/* Background */
#dialog-img {
    display: block;
    width: 100%;
    height: auto;
}

/* NPC Name */
#dialog-name {
    position: absolute;

    left: 7%;
    top: 12%;

    width: 85%;

    font-size: clamp(16px, 2vw, 22px);
    font-weight: bold;

    color: #f07a22;

    text-transform: uppercase;
}

/* Dialogue */
#dialog-text {
    position: absolute;

    left: 7%;
    top: 30%;

    width: 86%;
    height: 50%;

    font-size: clamp(14px, 1.8vw, 18px);
    line-height: 1.4;

    color: #fff;

    overflow: hidden;

    white-space: normal;
    overflow-wrap: break-word;
}

.dialog-img {
    display: block;
    width: 100%;
    height: auto;
}

.game-title {
    font-family: "Lilita One", sans-serif;
}

html,
body {
    font-family: "Nunito", sans-serif;
}

#gameNotifications{
    position:fixed;
    top:20px;
    right:20px;
    width:360px;
    display:flex;
    flex-direction:column;
    gap:12px;
    z-index:999999;
    pointer-events:none;
}

.game-notification{
    display:flex;
    align-items:center;
    gap:14px;
    padding:14px;
    border-radius:16px;

    background:rgba(26,26,36,.95);
    border:2px solid #FFD54F;

    color:#fff;

    box-shadow:
        0 0 18px rgba(255,213,79,.35),
        0 12px 30px rgba(0,0,0,.4);

    transform:translateX(420px);
    opacity:0;

    transition:
        transform .35s cubic-bezier(.18,.89,.32,1.28),
        opacity .35s;

    pointer-events:auto;
}

.game-notification.show{
    transform:translateX(0);
    opacity:1;
}

.game-notification.hide{
    transform:translateX(420px);
    opacity:0;
}

.game-notification img{
    width:56px;
    height:56px;
    border-radius:14px;
    flex-shrink:0;
}

.game-notification-title{
    font-size:16px;
    font-weight:800;
    margin-bottom:4px;
}

.game-notification-body{
    font-size:13px;
    opacity:.9;
}
#loading-screen{
    position:fixed;
    inset:0;
    background:#000;

    display:flex;
    justify-content:center;
    align-items:center;

    z-index:99999;
}

/* Container for the image and overlays */
#loading-container{
    position:relative;
    display:inline-block;
}

#loading-image{
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    background: #87CEEB; /* or your preferred color */
}

/* Progress bar */
#loading-box{
    position: absolute;
    left: 50%;
    bottom: 90px;
    transform: translateX(-50%);

    width: min(75vw, 500px);
    height: 24px;

    background: #333;
    border-radius: 20px;
    overflow: hidden;
}

#loading-bar{
    width:0%;
    height:100%;

    background:#ffc107;

    transition:width .15s linear;
}

/* Percentage */
#loading-percent{
    position:absolute;

    left:50%;
    bottom:125px;

    transform:translateX(-50%);

    color:white;
    font-size:22px;
    font-weight:bold;
    text-shadow:2px 2px 4px #000;
}

/* Tip */
#loading-tip{
    position:absolute;

    left:50%;
    bottom:40px;

    transform:translateX(-50%);

    width:80%;

    color:#ffe17a;
    font-size:18px;
    text-align:center;
    text-shadow:2px 2px 4px #000;
}


#fixPrizes{
    display:flex;
    flex-direction:column;
    gap:10px;
    width: 100%;
}

.repair-btn{
    width:100%;
    /* padding:12px; */
    border:none;
    border-radius:8px;
    /* background:#2b9348; */
    color:#fff;
    cursor:pointer;
    font-size:16px;
    text-align:left;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.repair-btn strong{
    margin-left: auto;
}

.repair-btn:hover{
    background:#1f7a3b;
}

#gasPrizes{
    display:flex;
    flex-direction:column;
    gap:10px;
    width: 100%;
}

.game-modal{

    position:relative;

    overflow:hidden;

    padding:16px 34px;

    border-radius:20px;

    border:4px solid white;

    font-size:18px;

    font-weight:bold;

    letter-spacing:.5px;

    cursor:pointer;

    transition:.12s;

    color:white;

    /* text-shadow:0 2px 2px rgba(0,0,0,.25); */

}


/* Shine */

.game-modal::before{

    content:"";

    position:absolute;

    left:14px;

    top:8px;

    width:70px;

    height:10px;

    border-radius:999px;

    background:rgba(255,255,255,.55);

}
.game-blue-modal::before{

    content:"";

    position:absolute;

    left:14px;

    top:8px;

    width:70px;

    height:10px;

    border-radius:999px;

    background:rgba(225, 225, 225, 0.55);

}

.money{
    display:inline-flex;
    align-items:center;
    /* gap:1px; */
}

.currency-icon{
    width:18px;
    height:18px;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

#loading-image{
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: kenBurns 12s ease-in-out infinite alternate;
    transform-origin: center;
}

@keyframes kenBurns{
    0%{
        transform: scale(1.1) translate(0, 0);
    }
    25%{
        transform: scale(1.15) translate(-2%, -1%);
    }
    50%{
        transform: scale(1.2) translate(2%, -2%);
    }
    75%{
        transform: scale(1.15) translate(-1%, 2%);
    }
    100%{
        transform: scale(1.1) translate(2%, 1%);
    }
}

.hide-scrollbar::-webkit-scrollbar{
    display:none;
}

.hide-scrollbar{
    scrollbar-width:none;
}


#gameClock{

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: fit-content;

    padding: 4px 12px;
    margin-bottom: 6px;

    border-radius: 999px;

    background: rgba(18, 24, 39, 0.85);
    backdrop-filter: blur(8px);

    border: 1px solid rgba(255,255,255,.08);

    color: #ffffff;

    font-size: 13px;
    font-weight: 700;
    letter-spacing: .4px;

    box-shadow:
        0 4px 12px rgba(0,0,0,.25),
        inset 0 1px 0 rgba(255,255,255,.08);

    transition: .35s ease;

    z-index: 9999999;

    user-select: none;
    pointer-events: none;

    transition:
        background .4s,
        color .4s;
}

#gameClock.day{
    background: rgba(255,255,255,.90);
    color: #333;
}

#gameClock.night{
    background: rgba(16,22,44,.90);
    color: #fff;
}

/* @keyframes clockTick {

    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }

}

#gameClock.tick {
    animation: clockTick .25s ease;
    transform-origin: center;
} */

@keyframes clockTick {

    0% {
        transform: scale(1);
    }

    35% {
        transform: scale(1.12);
    }

    100% {
        transform: scale(1);
    }

}

#gameClock.tick {
    animation: clockTick 220ms ease-out;
}

.emoji{
    @apply text-2xl transition hover:scale-125 active:scale-95 flex-shrink-0;
}

#emojiBar::-webkit-scrollbar{
    display:none;
}

#emojiBar{
    scrollbar-width:none;
}

#profileBubble{
    position: fixed;
    
    border-radius:50%;
    cursor:pointer;
    user-select:none;
    touch-action:none; /* Important */
    z-index:9999;
}

#fartButton {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: none;
}
