/* General Reset */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    background-color: #1E1E1E;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Header Styling */
header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #F0F0F0;
}

/* Game Container */
#game-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    background-color: #121212;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Canvas Styling */
canvas {
    background-color: #2E2E2E;
    border: 3px solid #FFFFFF;
    border-radius: 5px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Controls Section */
#controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

#new-puzzle-btn, #restart-btn, #pause-btn {
    background-color: #4CAF50;
    color: white;
    font-size: 1rem;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    margin: 5px;
}

#new-puzzle-btn:hover, #restart-btn:hover, #pause-btn:hover {
    background-color: #45A049;
    transform: scale(1.05);
}

#new-puzzle-btn:active, #restart-btn:active, #pause-btn:active {
    background-color: #3E8E41;
}

#move-counter {
    margin-top: 10px;
    font-size: 1.2rem;
    color: #B0B0B0;
}

/* Footer Styling */
footer {
    margin-top: 40px;
    text-align: center;
    font-size: 0.9rem;
    color: #888888;
}

/* Block Manipulation Feedback */
.selected-block {
    border: 2px solid #FFC107;
    box-shadow: 0 0 10px #FFC107;
}

/* Loading Icon for Button */
.loading {
    background-color: #FFA500;
    cursor: wait;
}

/* Slider Styling */
#difficulty-slider {
    margin: 10px 0;
    width: 100%;
}

/* Accessibility Improvements */
#difficulty-slider:focus {
    outline: 2px solid #FFC107;
}

/* Responsive Design */
@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }
    #game-container {
        width: 90%;
    }
}