﻿canvas {
    outline: none;
    -webkit-tap-highlight-color: transparent; /* dla Safari/Mobile */
    user-select: none;
}

    canvas:focus {
        outline: none;
    }


body {
    margin: 0;
    font-family: "Bricolage Grotesque", sans-serif;
    font-weight: 600;
    overscroll-behavior: contain;
    touch-action: none;
}

#game {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    background: #C1ADD5;
    border-radius: 24px;
    overflow: hidden;
    padding-top: 64px; /* zapewnia miejsce na ui-bar */
    box-sizing: border-box;
}


#ui-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 77px;
    background-color: #E2D8EC;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    z-index: 10;
}

#paw-group {
    position: absolute;
    width: 300px;
    height: 412px;
    left: 100px;
    top: 88px;
    transform-origin: center center;
    transition: transform 0.1s linear;
}

    #paw-group canvas {
        position: absolute;
    }

#fur {
    z-index: 3;
    left: 2px;
    top: 20px;
    pointer-events: none;
}

#pads {
    z-index: 2;
    left: 26px;
    top: 33px;
    pointer-events: none;
}

#claw1 {
    left: 24px;
    top: 64px;
    z-index: 1;
    pointer-events: auto;
}

#claw2 {
    left: 93px;
    top: 11px;
    z-index: 1;
    pointer-events: auto;
}

#claw3 {
    left: 177px;
    top: 5px;
    z-index: 1;
    pointer-events: auto;
}

#claw4 {
    left: 227px;
    top: 76px;
    z-index: 1;
    pointer-events: auto;
}

#claw5 {
    left: 236px;
    top: 201px;
    z-index: 1;
    pointer-events: auto;
}


#paw-bg {
    z-index: 0;
    pointer-events: none;
}

#patience {
    display: flex;
    gap: 4px;
    flex-direction: column;
    font-size: 1rem;
    color: #4D4A47;
}

#patience-bar {
    width: 128px;
    height: 18px;
    border: 4px solid #ffffff;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

#patience-fill {
    width: 100%;
    height: 100%;
    background: #B3E59F;
    transform-origin: left;
    transform: scaleY(1);
    transition: transform 0.1s ease;
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 999;
    pointer-events: none;
}

#end-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    color: #4D4A47;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

    #end-screen.hidden {
        display: none;
    }

#end-content {
    text-align: center;
    background: #ffffff;
    padding: 1rem;
    border-radius: 16px;
    max-width: 80%;
}

    #end-content h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        font-weight: 600;
    }

    #end-content p {
        margin-bottom: 1rem;
        font-size: 1.2rem;
    }

#restart-btn {
    background: #A1DB8A;
    border: none;
    padding: 0.5rem 1rem;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.2rem;
    cursor: pointer;
}

    #restart-btn:hover {
        background: #B3E59F;
    }

#score {
    
}

#score-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 1rem;
    color: #4D4A47;
    align-items: flex-end;
}

#claw-bar {
    display: flex;
    justify-content: center;
    width: 128px;
    height: 18px;
    border: 4px solid #ffffff;
    border-radius: 8px;
    background: #ffffff;
}

#claw-progress {
    display: flex;
    gap: 4px;
    align-items: center;
}

.claw-icon {
    width: 16px;
    height: 16px;
}

#nail-clipper {
    position: absolute;
    width: 100px;
    height: 105px;
    pointer-events: none;
    transform: translate(-16px, -16px);
    z-index: 9999;
    display: none;
}

#start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: #C1ADD5; /* lub inny kolor pasujący do gry */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#start-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    border-radius: 24px;
}

#start-btn {
    margin-top: 300px;
    background: #A1DB8A;
    border: none;
    font-family: "Bricolage Grotesque", sans-serif;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    color: white;
    border-radius: 32px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

    #start-btn:hover {
        background: #B3E59F;
    }
#show-scores-btn {
    margin-top: 16px;
    background: #A1DB8A;
    border: none;
    font-family: "Bricolage Grotesque", sans-serif;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    color: white;
    border-radius: 32px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
    #show-scores-btn:hover {
        background: #B3E59F;
    }

#back-to-start-btn {
    margin-top: 16px;
    background: #A1DB8A;
    border: none;
    font-family: "Bricolage Grotesque", sans-serif;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    color: white;
    border-radius: 32px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

    #back-to-start-btn:hover {
        background: #B3E59F;
    } 

    @media (max-width: 500px) {
        #nail-clipper {
        display: none !important;
    }

    #game {
        aspect-ratio: 6 / 9;
    }
}

.hidden {
    display: none !important;
}

#score-form {
    justify-content: center;
    display: flex;
    gap: 8px;
    margin: 1rem 0;
}

    #score-form input[type="text"] {
        padding: 0.5rem;
        border: 1px solid #ccc;
        border-radius: 8px;
        font-size: 1rem;
        font-family: "Bricolage Grotesque", sans-serif;
    }

    #score-form button[type="submit"] {
        background: white;
        color: #8ac14c;
        border: 2px solid #8ac14c;
        padding: 0.5rem 1rem;
        border-radius: 8px;
        cursor: pointer;
        font-weight: 600;
        font-size: 1rem;
        font-family: "Bricolage Grotesque", sans-serif;
    }

        #score-form button[type="submit"]:hover {
            border: 2px solid #9fcc66;
            color: #9fcc66;
        }

#scores-only-screen {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

#scores-only-content {
    background: #fff;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

#score-list-only {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

    #score-list-only li {
        margin-bottom: 0.5rem;
        font-weight: bold;
    }
