html, body {
    margin: 0;
    padding-top: 20px;
    font-family: 'Roboto', sans-serif;
   // background-color: #fff7dc; 
    background-image: url('Images/692.jpg');
    background-size: cover;
    background-position: center;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.landing-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('Images/692.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.landing-content {
    text-align: center;
    background-color: rgba(249, 245, 219, 0.9);
    padding: 60px 80px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border: 4px solid rgb(229, 124, 140);
}

.landing-title {
    font-family:'Lonely Study';
    font-size: 4rem;
    font-weight: bold;
    color: rgb(229, 124, 140);
    margin: 0 0 40px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.start-btn {
    padding: 20px 60px;
    font-size: 2rem;
    font-weight: bold;
    border: 3px solid rgb(229, 124, 140);
    border-radius: 15px;
    background-color: rgb(229, 124, 140);
    color: rgb(249, 245, 219);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.start-btn:hover {
    background-color: rgb(200, 100, 120);
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

p2 {
    position: sticky;
    bottom: 12vh;
    left: 50%;
   // transform: translateX(-50%);
    background-color: rgba(229, 124, 140, 1);
    padding: 20px 20px;
    border-radius: 10px;
    border-style: Solid;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: rgb(249, 245, 219);
    font-size: 30px;
    font-weight: bold;
    z-index: 1000;
}

.container {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zones-grid {
    display: grid;
    grid-template-columns: repeat(5, 15vw);
    grid-template-rows: repeat(3, 25vh);
    gap: 0vw;
    padding: 5vw;
    padding-bottom: 25vh;
}

.drop-zone {
    background-color: rgba(249, 245, 219, 0.241);
    border: 2px solid rgb(229, 124, 140);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0px;
    color: rgb(249, 245, 219);
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

.drop-zone:hover {
    background-color: rgba(87, 84, 84, 0.2);
}

.drop-zone.occupied {
    background-color: rgba(255, 252, 204, 0.332);
}

.items-container {
    position: absolute;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    pointer-events: none;
}

.draggable-item {
    position: absolute;
    max-width: 25vw;
    max-height: 25vh;
    border: 2px solid white;
    border-radius: 8px;
    cursor: grab;
    pointer-events: auto;
    object-fit: contain;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.draggable-item:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.draggable-item.dragging {
    cursor: grabbing;
    opacity: 0.9;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    animation: jiggle 0.1s infinite;
}

@keyframes jiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-1.5deg);
    }
    75% {
        transform: rotate(1.5deg);
    }
}

.pin-image {
    position: fixed;
    object-fit: contain;
    pointer-events: none;
    z-index: 5;
}

/* FRAME FUNCTIONALITY COMMENTED OUT */
/* .frame-image {
    position: fixed;
    max-width: 50vw;
    max-height: 50vh;
    object-fit: contain;
    pointer-events: none;
    opacity: 0;
    z-index: 1;
}

.frame-image.fade-in {
    animation: fadeInSlow 10s ease-in-out forwards;
}

@keyframes fadeInSlow {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
} */

.item-label {
    position: absolute;
    background-color: rgb(249, 245, 219);
    padding: 10px;
    border-radius: 0px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    color: rgb(229, 124, 140);
    //font-family: 'Lonely Study';
    font-size: 12 px;
    font-weight: bold;
    text-align: center;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 15vw;
    display: none;
    pointer-events: none;
    line-height: 1.4;
    z-index: 10;
}

p3 {
    background-color: rgba(20, 8, 54, 0.95);
    padding: 10px 20px;
    border-radius: 10px;
    border-style: none;
  //  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: rgb(249, 245, 219);
    font-family: 'Lonely Study';
    font-size: 2.3rem;
    font-weight: bold;
    z-index: 1000;
}
p4{
    font-size: 1rem;
    font-weight: bold;
}
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: rgb(249, 245, 219);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 300px;
}

.modal-content h2 {
    margin-top: 0;
    color: rgb(229, 124, 140);
    margin-bottom: 20px;
}

.finish-modal-content {
    max-width: 80vh;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: auto;
}

.preview-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    max-height: 60vh;
    overflow: auto;
}

.preview-container img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#nameInput {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 2px solid rgb(229, 124, 140);
    border-radius: 8px;
    box-sizing: border-box;
    margin-bottom: 20px;
}

#nameInput:focus {
    outline: none;
    border-color: rgb(164, 111, 93);
    box-shadow: 0 0 8px rgba(255, 100, 50, 0.3);
}

.modal-buttons {
    display: grid;
    gap: 10px;
    justify-content: center;
}

.modal-btn {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.submit-btn {
    background-color: rgb(229, 124, 140);
    color: white;
}

.submit-btn:hover {
    background-color: rgb(200, 100, 120);
}

.cancel-btn {
    background-color: rgb(188, 188, 188);
    color: rgb(80, 80, 80);
}

.cancel-btn:hover {
    background-color: rgb(160, 160, 160);
}

/* Toolbar for collage elements */
.toolbar {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: 12vw;
    background-color: rgba(20, 8, 54, 0.95);
    box-shadow: -5px 4px 8px rgba(0, 0, 0, 0.3);
    border-left: 8px double rgb(229, 124, 140);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 3vw;
    padding-top: 2vh;
    padding-left: 10px;
    padding-right: 10px;
    z-index: 500;
}

/*.toolbar-header {
    background-color: rgba(229, 124, 140, 0.8);
    padding: 10px 16px;
    border-radius: 10px;
    border-style: solid;
   // box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: rgb(249, 245, 219);
    font-size: 2rem;;
    font-weight: bold;
    text-align: center;
} */

.edit-mode-section {
    width: 100%;
    padding-top: 1vh;
    padding-bottom: 0;
    border-top: 8px double rgb(229, 124, 140);
    /*border-bottom: 10px solid rgb(229, 124, 140);*/
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-btn {
    padding: 1vw 0vh;
    font-size: 1.2vh;
    font-weight: bold;
    border: 0.2vh solid rgb(229, 124, 140);
    border-radius: 1vw;
    background-color: rgba(255, 255, 255, 0.8);
    color: rgb(229, 124, 140);
    cursor: pointer;
    transition: all 0.2s ease;
}

.rotate-icon {
    width: 5.5vw;
    height: 5vh;
    object-fit: contain;
    display: block;
    justify-content: center;
    align-items: center;
}
#rotateBtn {
    margin-top: -2vw;
}
#paintBucketBtn {
    margin-top: -2vw;
}
.paint-bucket-icon {
    width: 5.5vw;
    height: 5vh;
    object-fit: contain;
    font-size: 2.5rem;
    display: block;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

.finish-icon {
    font-size: 3rem;
    display: block;
    line-height: 1;
    width: 5.5vw;
    height: 5vh;
    object-fit: contain;
    display: block;
    justify-content: center;
    align-items: center;
    padding 10px;
}

.toolbar-btn:hover {
    background-color: rgb(229, 124, 140);
    color: white;
    transform: scale(1.05);
}

.toolbar-btn.active {
    background-color: rgb(229, 124, 140);
    color: white;
    box-shadow: 0 0 1vh rgba(229, 124, 140, 0.5);
}

.toolbar-slot {
    width: 0vw;
    height: 5vh;
    background-color: rgba(255, 255, 255, 0);
    border: 0.2vh none rgb(229, 124, 140);
    border-radius: 1vw;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tape-piece {
    position: absolute;
    width: 12vw;
    height: 12vh;
    object-fit: contain;
    cursor: grab;
    pointer-events: auto;
    user-select: none;
    transition: transform 0.1s ease;
}

.toolbar-tape:hover {
    animation: shake 0.3s ease-in-out infinite;
}

.square-frame-piece {
    position: absolute;
    width: 16vw;
    height: 16vh;
    object-fit: contain;
    cursor: grab;
    pointer-events: auto;
    user-select: none;
    transition: transform 0.1s ease;
}

.toolbar-frame:hover {
    animation: shake 0.3s ease-in-out infinite;
}

.tape-piece:active {
    cursor: grabbing;
    animation: none;
}

.square-frame-piece:active {
    cursor: grabbing;
    animation: none;
}

@keyframes shake {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(-1px, -1px) rotate(-2deg);
    }
    50% {
        transform: translate(1px, 1px) rotate(2deg);
    }
    75% {
        transform: translate(-1px, 1px) rotate(-1deg);
    }
}