body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    position: relative;
    background-image: url(images/cardboard.jpg);
    background-repeat: repeat;
    font-family: "Schoolbell", cursive;
    font-weight: 400;
    font-style: normal;
}

.pinnedNote {
    position: absolute;
    left: 20px;
    top: 20px;
    width: 300px;
    padding: 14px;
    filter: drop-shadow(10px 10px 0 rgba(0,0,0,0.35));
    transform-origin: top center;
    cursor: pointer;
    user-select: none;
    z-index: 0;
    background-color: antiquewhite;
}

.pin {
    position: absolute;
    width: 140px;
    height: 140px;
    cursor: grab;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease;
}

.pin:hover {
    animation: wiggle 0.3s ease-in-out;
}

@keyframes wiggle {
    0% {transform: rotate(0);}
    25% {transform: rotate(-8deg);}
    75%{transform: rotate(6deg);}
    100% {transform: rotate(0);}
}

.pin img {
    max-width: 85%;
    max-height: 85%;
    pointer-events: none;
    filter: drop-shadow(10px 10px 0 rgba(0,0,0,0.35));
}

.pin.toDelete {
    filter: brightness(0) saturate(100%) invert(18%) sepia(36%) saturate(7497%) hue-rotate(353deg) brightness(102%) contrast(133%) drop-shadow(10px 10px 0 rgba(0,0,0,0.35));
}

.dragging {
    cursor: grabbing;
    transform: scale(1.1) translateY(-5px);
    filter: drop-shadow(3px 6px 3px rgba(0,0,0,0.55));
    z-index: 5;
}

.drawer {
    position: fixed;
    top: 50%;
    right: -300px;
    transform: translateY(-50%);
    width: 310px;
    height: 100%;
    box-shadow: -2px 0 10px rgba(0,0,0,0.3);
    transition: right 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    background-image: url(images/paper.jpg);
    background-size: contain;
    background-repeat: repeat;
    border-left: 10px solid black;
}

.open {
    right: 0;
}

.drawerTab {
    position: absolute;
    left: -59px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center center;
    background: #d4b27c;
    padding: 5px 10px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
    text-align: center;
    font-size: 30px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.drawerContent {
    overflow-y: auto;
    overflow-x: hidden;
    min-width: 300px;
    min-height: 200px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: white grey;
}

.drawerPin {
    position: static;
    cursor: grab;
    justify-self: center;
}

.trashcan {
    position: fixed;
    bottom: 40px;
    left: 40px;
    opacity: 0;
    transform: translateY(0px) scale(4);
    transition: all 0.3s ease;
    pointer-events: none;
}

.trashcan.visible {
    opacity: 1;
    transform: translateY(0) scale(4);;
}

body.draggingPin .drawer {
    transition: none !important;
    transform: translateY(-50%) translateX(0) !important;
    pointer-events: none !important;
}

body.draggingPin .pin:hover {
    transform: none !important;
}

.swing {
    animation: swing 700ms ease-out;
}

@keyframes swing {
    0% {transform: rotate(0);}
    25% {transform: rotate(-12deg);}
    75% {transform: rotate(12deg);}
    100% {transform: rotate(0deg);}
}

.fall {
    animation: fall 900ms ease-in forwards;
    pointer-events: none;
}

@keyframes fall {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(120vh) scale(0.9);
        opacity: 0;
    }
}

#mobileSite {
    display: none;
}

@media (max-width:900px) {
    body {
        overflow-y: auto;
    }
    
    .pin, #drawerId, #infoNote {
        display: none;
    }
    
    #mobileSite {
        display: block;
        padding: 1rem;
    }
    
    .mobileNote {
        padding: 1rem;
        margin-bottom: 1.5rem;
        text-align: center;
        background-color: antiquewhite;
        filter: drop-shadow(10px 10px 0 rgba(0,0,0,0.35));
    }
    
    .mobileGrid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
        padding: 20px;
        justify-items: center;
    }
    
    .mobileGrid img {
        width: 120px;
        height: auto;
        object-fit: contain;
        filter: drop-shadow(10px 10px 0 rgba(0,0,0,0.35));
        cursor: default;
    }
    
    .mobileGrid img:hover {
        animation: wiggle 0.3s ease-in-out;
    }
}