/* -------- RESET -------- */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #fff4d9;
    font-family: "Comic Sans MS", "Fredoka One", Arial, sans-serif;

}

body {
    background: #ffeecf;
    font-family: "Comic Sans MS", Arial, sans-serif;
    overflow: hidden;
    display: flex;
    background-image: url("assets/ui/bg_pattern2.png");
    /* ← your image */
    background-size: cover;
    /* fill entire screen */
    background-position: center;
    /* center the image */
    background-repeat: no-repeat;
}

/* -------- GAME CONTAINER -------- */
#game-container {
    margin: 20px;
    height: calc(100vh - 40px);
    background: white;
    transition: width 360ms ease;
    position: relative;
}

/* Sidebar visible */
#game-container.game-with-sidebar {
    width: calc(100vw - 25vw - 40px);
}

/* Sidebar hidden (full width) */
#game-container.game-full {
    width: calc(100vw - 40px);

}

/* -------- SIDEBAR -------- */
#sidebar {
    width: 25vw;
    height: 100vh;
    overflow-y: auto;
    background: #fff8e7;
    border-left: 4px solid #ff89ff;
    box-shadow: -4px 0 15px rgba(255, 0, 255, 0.12);
    padding: 15px;
    transition: transform 360ms ease, opacity 360ms ease;
}

.sidebar-hidden {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    display: none;
}

.sidebar-visible {
    transform: translateX(0%);
    opacity: 1;
    display: block;
}

/* -------- MOBILE TOGGLE -------- */
#mobileToggle {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4df0;
    color: white;
    border-radius: 10px;
    border: none;
    width: 52px;
    height: 52px;
    font-size: 26px;
    cursor: pointer;
    z-index: 9999;
    display: none;
}

/* -------- TOP CONTROLS -------- */
.top-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.top-controls button {
    height: 36px;
    min-width: 42px;
    border-radius: 10px;
    border: 0;
    cursor: pointer;
}

/* Add Layer */
#addLayerBtn {
    background: linear-gradient(90deg, #ff66cc, #ff99dd);
}

/* Undo/Redo */
#undoBtn,
#redoBtn {
    background: linear-gradient(90deg, #ffe566, #ffd24d);
}

/* Save */
#saveBtn {
    background: linear-gradient(90deg, #7eddfc, #4fa8f7);
    width: 100%;
}


/* ========= LAYER BOX ========= */
.layer-box {
    background: white;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 0 12px rgba(255, 170, 230, 0.2);
    border: 3px solid #ffd6f7;
}


/* ========= SLIDERS ========= */
.row {
    display: flex;
    justify-content: space-between;
}

input[type=range] {
    width: 100%;
    accent-color: #ff66cc;
    /* pink slider thumb */
}

/* ========= ICON BUTTONS ========= */
button {
    transition: transform 0.12s ease;
}

button:hover {
    transform: scale(1.12);
}

button:active {
    transform: scale(0.95);
}

/* -------- Preview -------- */
.preview-img {
    width: 68px;
    height: 68px;
    border-radius: 14px;
    border: 3px solid #ffb3f4;
    background: #ffeaff;
    box-shadow: 0 0 8px rgba(255, 150, 220, 0.25);
}

/* ========= DROPDOWN GRID ========= */
.thumb-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

/* -------- MOBILE -------- */
@media (max-width: 900px) {
    #mobileToggle {
        display: block;
    }

    #sidebar {
        width: 80vw;
        position: absolute;
        right: 0;
        top: 0;
        z-index: 999;
    }

    #game-container {
        width: 100vw !important;
    }
}

/* -------- NOTES -------- */
.center-note {
    text-align: center;
    margin: 12px 0;
    color: #9b9b9b;
}

.bold-note {
    font-weight: bold;
    color: #555;
}


.placeholder-anim {
    animation: preschoolWigglePop 1.2s infinite ease-in-out;
    border: 4px dotted #ff66cc !important;
    background: #fff2ff;
    border-radius: 16px;
    box-shadow: 0 0 12px rgba(255, 120, 200, 0.35);
}

@keyframes preschoolWigglePop {
    0% {
        transform: scale(1) rotate(0deg);
    }

    30% {
        transform: scale(1.12) rotate(2deg);
    }

    60% {
        transform: scale(0.98) rotate(-2deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* ========= MEDIA QUERY ========= */
@media (max-width: 900px) {
    #sidebar {
        width: 80vw;
    }
}


.icon-small {
    width: 28px;
    height: 28px;
    image-rendering: smooth;
}

button img {
    pointer-events: none;
}