﻿/* =========================================================
   Banana Barrel Puzzle Page
   ========================================================= */

.puzzle-wrapper {
    position: relative;
}

.puzzle-host {
    position: relative;
    width: 100%;
    height: min(86vh, 1080px);
    min-height: 860px;
    border-radius: 18px;
    overflow: hidden;
}

.puzzle-preview.hidden {
    display: none !important;
}

.puzzle-preview {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 100;
    width: 320px;
    max-width: 50vw;
    background: rgba(255, 255, 255, 0.96);
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
    cursor: grab;
    user-select: none;
    touch-action: none;
    display: block;
}

    .puzzle-preview.dragging {
        cursor: grabbing;
    }

    .puzzle-preview img {
        width: 100%;
        height: auto;
        border-radius: 10px;
        border: 1px solid rgba(0, 0, 0, 0.10);
        pointer-events: none;
        display: block;
    }

#puzzlePreview {
    position: absolute !important;
    width: 320px !important;
    height: auto !important;
}

.puzzle-shell {
    max-width: 1400px;
    margin-inline: auto;
    padding-inline: 16px;
}

/* ---------------------------------------------------------
   Completion overlay
   --------------------------------------------------------- */

.pz-complete-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    border-radius: 18px;
    animation: pz-fade-in 0.4s ease;
}

@keyframes pz-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.pz-complete-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 2.5rem 2rem;
    text-align: center;
    max-width: 360px;
    width: 90%;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
    animation: pz-pop-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pz-pop-in {
    from {
        transform: scale(0.7);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.pz-complete-icon {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.pz-complete-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 0.5rem;
}

.pz-complete-sub {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0 0 1.5rem;
}

.pz-complete-btn {
    width: 100%;
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 768px) {
    .puzzle-host {
        min-height: 640px;
        height: 80vh;
    }

    .puzzle-preview,
    #puzzlePreview {
        width: 200px !important;
        max-width: 55vw;
        right: 10px;
        bottom: 10px;
    }
}

@media (min-width: 1200px) {
    .puzzle-shell {
        max-width: 1500px;
    }
}

@media (min-width: 1600px) {
    .puzzle-shell {
        max-width: 1600px;
    }
}
