﻿
    :root

{
    --panel-w: 300px;
    --bank-w: 220px;
    --bank-h: 160px;
}

body {
    margin: 0;
    font-family: Inter, "Comic Sans MS", system-ui, sans-serif;
    background: radial-gradient(circle at center,#f5e0c6,#d5b28a);
    color: #3b2a12;
    overflow: hidden;
    height: 100vh;
}

#version {
    position: fixed;
    bottom: 5px;
    left: 5px;
}

#versionChanges {
    display: none;
    position: absolute;
    top: 100%; /* poniżej napisu Version */
    left: 0;
    background: rgba(255,248,225,0.95);
    border: 2px solid #8b4513;
    border-radius: 8px;
    padding: 10px;
    max-width: 320px;
    max-height: 200px; /* wysokość okienka */
    overflow-y: auto; /* scroll w pionie jeśli za dużo treści */
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}




#center-container {
    position: absolute;
    left: 50%;
    top: 45%;
    transform: translate(-50%,-50%);
    text-align: center;
}

#kebab {
    width: 200px;
    height: 300px;
    background: transparent;
    background-image: url('kebab2.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin: 0;
    transition: transform 0.1s ease;
    cursor: pointer;
    user-select: none;
    display: inline-block;
    padding: 0;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}

    #kebab:active {
        transform: scale(0.9);
    }

.kebab-name {
    text-align: center;
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 10px; /* przyklejenie do licznika */
    cursor: pointer;
    user-select: none;
    background: rgba(255, 255, 255, 0.6); /* lekkie półprzezroczyste tło */
    border-radius: 6px;
}



#counter {
    font-size: 22px;
    margin-bottom: 14px;
    display: block;
    white-space: pre-line;
}




#right-panel {
    position: fixed;
    right: 0;
    top: 0;
    width: var(--panel-w);
    height: 100%;
    padding: 14px;
    background: rgba(255,255,255,0.95);
    box-shadow: -6px 0 20px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 40;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

}

#upgradesPanel {
    display: block;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#menuButton {
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #8b4513;
    background: #fff3cd;
    cursor: pointer;

}

#menuPanel {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    background: #fff8e1;
    border: 2px solid #8b4513;

}

.upgrade {
    user-select: none; /* wyłącza zaznaczanie tekstu */
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #8b4513;
    background: #ffe8bf;
    transition: transform 0.1s ease, box-shadow 0.15s ease;
    cursor: pointer;

}


    .upgrade.locked {
        opacity: 0.45;
        filter: grayscale(60%);
        pointer-events: none;
    }

    .upgrade input {
        width: 64px;
        margin-left: 6px;
    }

    .upgrade:active {
        transform: scale(0.96);
        box-shadow: 0 0 12px rgba(255, 200, 0, 0.6);
    }

    .upgrade.disabled {
        opacity: 0.5;
        filter: grayscale(100%);
        pointer-events: none; /* blokuje kliknięcie */
        transition: 0.2s;
    }

    .upgrade.hidden {
        display: none !important;
    }





#kebabBank {
    position: fixed;
    left: 14px;
    bottom: 50px;
    width: var(--bank-w);
    height: var(--bank-h);
    border-radius: 10px;
    background: #fff6d9;
    border: 3px solid #8b4513;
    padding: 6px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    z-index: 50;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

#bankCounter {
    position: fixed;
    left: 60px;
    bottom: 14px;
    font-weight: 600;
    font-size: 18px;
    color: #3b2a12;
    background: rgba(255, 255, 255, 0.7);
    padding: 4px 8px;
    border-radius: 6px;
    border: 2px solid #8b4513;
    z-index: 999;
}

#bankInner {
    position: relative;
    width: 100%;
    height: 100%;
}

.stored-kebab {
    position: absolute;
    font-size: 22px;
    pointer-events: none;
    transform-origin: center;
    transition: transform 300ms ease, opacity 300ms ease;
}

#bankText {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -26px;
    font-weight: 600;
}

#tooltip {
    position: fixed;
    display: none;
    pointer-events: none;
    padding: 6px 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    border-radius: 6px;
    font-size: 13px;
    z-index: 80;
}

#saveNotice {
    position: fixed;
    left: 10px;
    top: 10px;
    padding: 8px 12px;
    background: rgba(0,128,0,0.9);
    color: #fff;
    border-radius: 6px;
    display: none;
    z-index: 90;
}

#bankNotice {
    position: fixed;
    left: calc(var(--bank-w)/2 + 14px);
    bottom: calc(var(--bank-h) + 26px);
    transform: translateX(-50%);
    padding: 6px 10px;
    background: rgba(255,140,0,0.95);
    color: #fff;
    border-radius: 6px;
    display: none;
    z-index: 90;
}

footer {
    position: fixed;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.8;
    font-size: 13px;
}
/* small responsive */
@media (max-width:600px) {
    #kebab {
        width: 200px;
        height: 300px;
    }

    :root {
        --panel-w: 240px;
        --bank-w: 180px;
        --bank-h: 130px;
    }
}


#kebabTruck {
    position: fixed;
    left: 20px;
    bottom: 40px;
    width: 240px;
    height: 140px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border-radius: 12px;
    background: #fffaf0;
    border: 3px solid #8b4513;
    padding-bottom: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    z-index: 50;
}

#truckEmoji {
    position: absolute;
    bottom: -50px;
    left: 10px;
    font-size: 260px;
    user-select: none;
}

#truckCargo {
    position: absolute;
    bottom: 50px;
    left: 150px;
    width: 70%;
    height: 45px;
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
}

#truckCounter {
    position: absolute;
    bottom: -24px;
    font-size: 16px;
    font-weight: bold;
    background: rgba(255,255,255,0.8);
    padding: 4px 8px;
    border: 2px solid #8b4513;
    border-radius: 6px;
}

#kebabTank {
    position: absolute;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-end;
    justify-content: flex-start;
    gap: 2px;
    width: 110px;
    height: 80px;
    overflow: hidden;
}



.falling-box {
    position: absolute;
    pointer-events: none;
    user-select: none;
    transition: transform 1s ease, opacity 1s ease;
}
/*przyszly kawalek miesa */

.mobile-only {
    display: none;
    position: absolute;
    bottom: 50px; /* lub inna wartość */
    left: 50%;
    transform: translateX(-50%);
    background: #222;
    padding: 10px;
    border-radius: 8px;
    z-index: 1000;
}

.mobile-panel.open {
    display: block;
}

@media (min-width: 701px) {
    .mobile-only {
        display: none;
    }

    #mobileUpgradesPanel {
        display: none !important;
    }
    /* NA DESKTOP */
}

@media (max-width:700px) {

    #right-panel {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    /* truck na mobile */
    #kebabTruck {
        width: 160px;
        height: 90px;
        left: 10px;
        bottom: 20px;
        padding-bottom: 4px;
    }

    #truckEmoji {
        font-size: 140px;
        bottom: -32px;
        left: 0px;
    }

    #truckCargo {
        bottom: 10px;
        left: 70px;
        height: 28px;
        gap: 2px;
    }

    #truckCounter {
        bottom: -18px;
        font-size: 12px;
        padding: 2px 6px;
    }


    #toggleUpgradesButton {
        position: fixed;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        background: #ffcc00;
        padding: 10px 20px;
        border: none;
        border-radius: 12px 12px 0 0;
        font-size: 18px;
        font-weight: bold;
        z-index: 10001;
    }

    #upgradesPanel {
        position: fixed;
        bottom: -40%;
        left: 0;
        width: 100%;
        max-height: 60%;
        background: rgba(255, 248, 225, 0.95);
        border-top: 3px solid #8b4513;
        box-shadow: 0 -3px 10px rgba(0,0,0,0.3);
        padding: 14px;
        z-index: 9999;
        overflow-y: auto;
        transition: bottom 0.3s ease;

    }

        #upgradesPanel.open {
            bottom: 0;
        }

    #menuButton {
        display: block;
        position: fixed;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 110;
        background: #fff3cd;
        border: 2px solid #8b4513;
        border-radius: 8px;
        padding: 8px 14px;
        font-size: 16px;
	}

    #mobileUpgradesPanel {
        position: fixed;
        bottom: -100%;
        left: 0;
        width: 95%;
        max-height: 80%;
        overflow-y: auto;
        background: rgba(255, 248, 225, 0.95);
        border-top: 3px solid #8b4513;
        display: block;
        padding: 12px;
        z-index: 9999;
        transition: bottom 0.3s ease;
        display: flex;
        flex-direction: column;
        gap: 5px
    }

        #mobileUpgradesPanel.open {
            bottom: 5%;
        }

    #bank {
        width: 45vw; /* mniejsza szerokość */
        height: 18vw; /* proporcjonalna wysokość */
        left: 22vw; /* dopasowanie pozycji */
        bottom: 14vw;
    }

    #bankInner {
        width: 100%;
        height: 100%;
    }

    /* Przycisk otwierający menu */
    #mobileOptionsButton {
        position: absolute;
        bottom: 90%; /* lub inna wartość */
        left: 90%;
        transform: translateX(-50%);
        background: #ffcc00;
        padding: 10px;
        border-radius: 10px;
        z-index: 10030;
    }

    /* Panel mobilnego menu */
    #mobileOptionsPanel {
        position: fixed;
        top: -100%;
        left: 50%;
        width: 50%;
        transform: translateX(-50%);
        max-height: 80%;
        background: rgba(255, 248, 225, 0.97);
        border-top: 3px solid #8b4513;
        padding: 15px;
        overflow-y: auto;
        z-index: 10020;
        transition: top 0.3s ease;
        text-align: center;
    }

        #mobileOptionsPanel.open {
            top: 0%;
        }

        #mobileOptionsPanel button {
            display: block;
            width: 90%;
            margin: 6px auto;
            padding: 10px;
            background: #ffdd88;
            border: 2px solid #8b4513;
            border-radius: 10px;
            font-size: 16px;
        }

    #mobileMuteButton {
        background: #fff3cd;
        border: 2px solid #8b4513;
        border-radius: 8px;
        padding: 6px 12px;
        font-size: 16px;
        cursor: pointer;
        margin-bottom: 8px;
    }

    #version {
        position: fixed;
        top: 5px;
        left: 5px;
    }
}

