body {
    font-family: sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to the top */
    min-height: 100vh;
    background-color: #f0f0f0;
    margin: 0;
    padding-top: 50px; /* Add some top padding */
}

.main-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.ranking-container {
    width: 250px;
    padding: 20px;
    background-color: #e9e9e9;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.ranking-container h2 {
    text-align: center;
    margin-bottom: 15px;
}

.ranking-container h3 {
    margin-top: 20px;
    margin-bottom: 10px;
}

.ranking-container ol {
    padding-left: 20px;
    margin: 0;
}

.ranking-container li {
    margin-bottom: 5px;
    font-size: 1.1em;
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

.controls {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

#difficulty-select, .controls button {
    padding: 10px 15px;
    font-size: 1em;
    border-radius: 5px;
    border: 1px solid #ccc;
    cursor: pointer;
}

.controls button {
    background-color: #4CAF50;
    color: white;
    border: none;
}

.controls button:hover {
    background-color: #45a049;
}

#timer {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
}

#sudoku-board {
    display: grid;
    grid-template-columns: repeat(9, 40px);
    grid-template-rows: repeat(9, 40px);
    gap: 1px;
    background-color: #333;
    border: 2px solid #333;
}

.sudoku-cell {
    width: 40px;
    height: 40px;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    font-weight: bold;
    border: 1px solid #eee;
}

.sudoku-cell.fixed {
    background-color: #e0e0e0;
    color: #333;
}

.sudoku-cell.user-input {
    color: #007bff;
}

.sudoku-cell.highlight {
    background-color: #ffffcc;
}

.sudoku-cell.error {
    background-color: #ffcccc;
}

.home-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}

.home-button:hover {
    background-color: #5a6268;
}