/* style.css */

/* --- গ্লোবাল এবং বেসিক রিসেট --- */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

#game-container {
    width: 100%;
    max-width: 550px; /* বোর্ডের জন্য যথেষ্ট জায়গা */
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    text-align: center;
}

.hidden {
    display: none !important;
}

/* --- লেভেল সিলেকশন গ্রিড --- */
#level-selection h1 {
    color: #007bff;
    margin-bottom: 30px;
}

#puzzle-path {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 কলামে গ্রিড */
    gap: 20px;
    padding: 10px;
}

.path-item {
    width: 100%;
    aspect-ratio: 1 / 1; /* বর্গাকার বাটন */
    border-radius: 10px;
    background-color: #a0a0a0; /* অসম্পূর্ণ ধূসর */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: default; 
    transition: background-color 0.2s;
}

/* ক্লিক করার যোগ্য/অসম্পূর্ণ আইটেম */
.path-item.playable {
    background-color: #28a745; /* সবুজ */
    cursor: pointer;
}

.path-item.playable:hover {
    background-color: #218838;
}

/* সম্পূর্ণ হওয়া আইটেম */
.path-item.unit-complete {
    background-color: #007bff; /* নীল */
    cursor: default;
}


/* --- পাজল এরিয়া (ন্যূনতম) --- */

#puzzle-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
}

#puzzle-board-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    aspect-ratio: 1 / 1; 
    padding: 5px;
    box-sizing: border-box;
}

#puzzle-board {
    display: grid;
    width: 100%;
    height: 100%;
    max-width: 500px; 
    max-height: 500px;
    border: 3px solid #007bff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.puzzle-piece {
    border: 1px solid #007bff;
    background-color: #ccc;
    background-clip: padding-box; 
    transition: transform 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.empty-piece {
    background-image: none !important;
    background-color: #f0f2f5 !important; 
    cursor: default;
    border: none;
    background-clip: border-box;
}

/* --- জেতার মেসেজ এবং বাটন --- */
#win-section {
    width: 100%;
    margin-top: 20px;
}

#win-message {
    padding: 15px;
    background-color: #d4edda;
    color: #155724;
    border-radius: 8px;
    margin-bottom: 10px;
}

.next-button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

.next-button:hover {
    background-color: #218838;
}

/* --- রেসপন্সিভনেস --- */
@media (max-width: 480px) {
    #game-container {
        padding: 10px;
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
    }
    #puzzle-path {
        grid-template-columns: repeat(2, 1fr); /* মোবাইলে 2 কলামে গ্রিড */
        gap: 15px;
    }
    #puzzle-board {
        border-width: 2px;
    }
    .puzzle-piece {
        border-width: 0.5px;
    }
}