/* General game container styling */
#game-container {
    padding: 20px;
    background-color: #f0f4f8; /* Light background for the game area */
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 900px; /* Max width for the game */
    margin: 0 auto; /* Center the game container */
}

/* Canvas styling */
#puzzleCanvas {
    display: block; /* Remove extra space below canvas */
    cursor: grab; /* Indicate draggable */
    touch-action: none; /* Disable default touch actions for better drag */
    max-width: 100%; /* Ensure responsiveness */
    height: auto; /* Maintain aspect ratio */
}

/* Puzzle piece styling (handled by JS drawing, but visual cues for interaction) */
.puzzle-piece-outline {
    stroke: rgba(255, 255, 255, 0.5);
    stroke-width: 1px;
}

/* Controls styling */
#controls {
    margin-top: 20px;
}

.game-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 25px;
    border-radius: 9999px; /* Fully rounded */
    font-weight: 700; /* Bold */
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.game-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.game-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Specific button colors */
#shuffle-button {
    background-color: #FBBF24; /* Tailwind yellow-500 */
    color: #1F2937; /* Tailwind gray-900 */
}

#shuffle-button:hover {
    background-color: #FCD34D; /* Tailwind yellow-400 */
}

#shuffle-button:active {
    background-color: #D97706; /* Tailwind yellow-600 */
}

#reset-button {
    background-color: #D1D5DB; /* Tailwind gray-300 */
    color: #374151; /* Tailwind gray-800 */
}

#reset-button:hover {
    background-color: #9CA3AF; /* Tailwind gray-400 */
}

#reset-button:active {
    background-color: #6B7280; /* Tailwind gray-500 */
}

#difficulty-select {
    appearance: none; /* Remove default select arrow */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3e%3cpath d='M7 7l3-3 3 3m0 6l-3 3-3-3' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e"); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem; /* Space for the custom arrow */
}

/* Message Box Styling */
#message-box.success {
    background-color: #D1FAE5; /* Tailwind green-100 */
    border: 1px solid #34D399; /* Tailwind green-400 */
    color: #065F46; /* Tailwind green-700 */
}

#message-box.error {
    background-color: #FEE2E2; /* Tailwind red-100 */
    border: 1px solid #F87171; /* Tailwind red-400 */
    color: #991B1B; /* Tailwind red-700 */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #game-container {
        padding: 15px;
    }
    .game-button {
        width: 100%; /* Full width buttons on small screens */
        margin-bottom: 10px;
    }
    #difficulty-select {
        width: 100%;
        margin-bottom: 10px;
    }
}
