﻿#collage {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe3e3 100%);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.2);
}

#collage hr {
    border: none;
    border-top: 2px solid #ffb6c1;
    height: 1px;
    margin: 15px 0;
}

#collage #playPanel {
    float: left;
    width: 99%;
}

#collage #actualImageBox {
    float: right;
    font-size: 1em;
    margin: 10px 10px;
    vertical-align: top;
    width: 280px;
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(255, 182, 193, 0.1);
}

#collage #stepBox div {
    display: inline-block;
    padding: 20px 20px;
    font-size: 40px;
    margin: 0px auto;
    color: #ff6b81;
    font-family: 'Arial', sans-serif;
}

#collage img#actualImage {
    height: 280px;
    width: 280px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(255, 182, 193, 0.2);
}

#collage #sortable {
    border: 2px solid #ffb6c1;
    list-style-type: none;
    display: inline-block;
    margin: 10px;
    padding: 0;
    width: 700px;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.1);
}

#collage #sortable li {
    background-size: 400% 400%;
    border: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
    float: left;
    width: 100px;
    height: 100px;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s ease;
}

.sortable {
    list-style-type: none;
    margin: 0;
    padding: 0;
    width: 700px;
    height: 700px;
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #ffb6c1;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.1);
}

.sortable li {
    background-color: #fff;
    border: 1px solid #ccc;
    cursor: move;
    float: left;
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
    position: relative;
    transition: transform 0.2s ease;
}

.sortable li.dragging {
    opacity: 0.8;
    z-index: 1000;
}

.ui-draggable-dragging {
    transform: scale(1) !important;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.ui-draggable-helper {
    transform: scale(1) !important;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

#gameOver {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(255, 182, 193, 0.2);
}

#gameOver h2 {
    color: #ff6b81;
    font-family: 'Arial', sans-serif;
}

#restartButton, #playAgainButton {
    background: #ff6b81 !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 20px !important;
    font-family: 'Dancing Script', cursive !important;
    font-size: 18px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 3px 10px rgba(255, 107, 129, 0.2) !important;
}

#restartButton:hover, #playAgainButton:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(255, 107, 129, 0.3) !important;
    background: #ff4d6d !important;
}

#restartButton:active, #playAgainButton:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 5px rgba(255, 107, 129, 0.2) !important;
}

.message {
    font-family: 'Dancing Script', cursive !important;
    font-size: 24px !important;
    color: #ff6b81 !important;
    margin: 15px 0 !important;
    animation: fadeIn 0.5s ease-in !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    #collage #sortable {
        width: 100%;
        max-width: 500px;
        height: auto;
    }
    
    #collage #sortable li {
        width: calc(100% / 3);
        height: auto;
        padding-bottom: calc(100% / 3);
    }
    
    #collage #actualImageBox {
        width: 100%;
        float: none;
        text-align: center;
    }
    
    #collage img#actualImage {
        width: 100%;
        max-width: 280px;
        height: auto;
    }
    
    .sortable {
        width: 100%;
        max-width: 500px;
        height: auto;
    }
    
    .sortable li {
        width: calc(100% / 3);
        height: auto;
        padding-bottom: calc(100% / 3);
    }
}