/* =========================================================
   NAMESPACE: #unhcr_game_wrapper
   این فایل فقط روی بازی اعمال می‌شود و هیچ اثری روی سایت ندارد.
   ========================================================= */

#unhcr_game_wrapper *,
#unhcr_game_wrapper *::before,
#unhcr_game_wrapper *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: none;
}

#unhcr_game_wrapper {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* Header ------------------------------------------------------ */

#unhcr_game_wrapper .unhcr-header {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 100;
    width: 90%;
    max-width: 500px;
}

#unhcr_game_wrapper .unhcr-title {
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
}

#unhcr_game_wrapper .unhcr-title h1 {
    font-size: 20px;
    color: #1e40af;
    margin-bottom: 5px;
}

#unhcr_game_wrapper .unhcr-title p {
    font-size: 13px;
    color: #64748b;
}

/* Scoreboard ------------------------------------------------------ */

#unhcr_game_wrapper .unhcr-score-board {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

#unhcr_game_wrapper .unhcr-score-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

#unhcr_game_wrapper .unhcr-score-correct {
    color: #10b981;
}

#unhcr_game_wrapper .unhcr-score-wrong {
    color: #ef4444;
}

/* Game Container ------------------------------------------------------ */

#unhcr_game_wrapper .unhcr-game-container {
    width: 100%;
    max-width: 500px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 140px 20px 20px;
    position: relative;
}

/* Folder ------------------------------------------------------ */

#unhcr_game_wrapper .unhcr-folder {
    width: 220px;
    height: 170px;
    margin: 0 auto;
    position: relative;
}

#unhcr_game_wrapper .unhcr-folder-tab {
    position: absolute;
    top: 0;
    left: 20px;
    width: 90px;
    height: 28px;
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 8px 8px 0 0;
    border: 3px solid #d97706;
    border-bottom: none;
}

#unhcr_game_wrapper .unhcr-folder-body {
    position: absolute;
    top: 22px;
    left: 0;
    width: 100%;
    height: 148px;
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 8px;
    border: 3px solid #d97706;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

#unhcr_game_wrapper .unhcr-folder-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 15px;
    font-weight: bold;
    color: #78350f;
    text-align: center;
    pointer-events: none;
    line-height: 1.4;
}

#unhcr_game_wrapper .unhcr-folder.highlight-correct .unhcr-folder-body {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.8);
    border-color: #10b981;
}

#unhcr_game_wrapper .unhcr-folder.highlight-wrong .unhcr-folder-body {
    animation: unhcr-shake 0.4s;
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.8);
    border-color: #ef4444;
}

@keyframes unhcr-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

/* Documents ------------------------------------------------------ */

#unhcr_game_wrapper .unhcr-documents-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: auto;
    padding: 10px;
}

#unhcr_game_wrapper .unhcr-document {
    width: 90px;
    height: 110px;
    background: white;
    border-radius: 6px;
    cursor: grab;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    border: 2px solid #e5e7eb;
    padding: 8px;
    gap: 5px;
}

#unhcr_game_wrapper .unhcr-document:active {
    cursor: grabbing;
}

#unhcr_game_wrapper .unhcr-document.dragging {
    opacity: 0.7;
    transform: scale(1.1) rotate(3deg);
    z-index: 1000;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

#unhcr_game_wrapper .unhcr-document.hidden {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

#unhcr_game_wrapper .unhcr-document.correct-answer {
    border-color: #10b981;
    background: linear-gradient(135deg, #fff 0%, #f0fdf4 100%);
}

#unhcr_game_wrapper .unhcr-document.wrong-answer {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fff 0%, #fef2f2 100%);
}

/* Feedback Animation ------------------------------------------------------ */

#unhcr_game_wrapper .unhcr-feedback-animation {
    position: fixed;
    font-size: 60px;
    pointer-events: none;
    animation: unhcr-float-up 1s ease-out forwards;
    z-index: 2000;
    font-weight: bold;
}

@keyframes unhcr-float-up {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) scale(1.5);
        opacity: 0;
    }
}

/* Win Message ------------------------------------------------------ */

#unhcr_game_wrapper .unhcr-win-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    text-align: center;
    z-index: 3000;
    display: none;
    max-width: 90%;
}

#unhcr_game_wrapper .unhcr-win-message.show {
    display: block;
    animation: unhcr-popup 0.5s ease-out;
}

@keyframes unhcr-popup {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

#unhcr_game_wrapper .unhcr-score-summary {
    background: #f3f4f6;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}

/* Color-coded document frames (namespaced) */

#unhcr_game_wrapper .doc-id {
    border-color: #ef4444;
}

#unhcr_game_wrapper .doc-passport {
    border-color: #10b981;
}

#unhcr_game_wrapper .doc-photo {
    border-color: #8b5cf6;
}

#unhcr_game_wrapper .doc-bank {
    border-color: #f59e0b;
}

#unhcr_game_wrapper .doc-certificate {
    border-color: #06b6d4;
}

#unhcr_game_wrapper .doc-contract {
    border-color: #ec4899;
}