body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(to bottom, #1a1a2e, #16213e);
    font-family: Arial, sans-serif;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.game-container {
    position: relative;
    min-width: 1000px;
    min-height: 600px;
    background: #fff;
    border: 2px solid #fff;
    border-radius: 5px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    gap: 20px;
}

.left-column {
    width: 140px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.center-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.right-column {
    width: 140px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

#new-game, #check {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#new-game:hover, #check:hover {
    background: #45a049;
}

.difficulty {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.difficulty-btn {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.difficulty-btn:hover {
    background: #e0e0e0;
}

.difficulty-btn.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

#board {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 1px;
    background: #000;
    padding: 1px;
    margin: 0 auto;
    max-width: 450px;
}

.cell {
    width: 48px;
    height: 48px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
}

.cell:hover {
    background: #f0f0f0;
}

.cell.fixed {
    background: #f8f8f8;
    cursor: not-allowed;
}

.cell.selected {
    background: #e3f2fd;
}

.cell.error {
    color: #ff0000;
}

.cell:nth-child(3n) {
    border-right: 2px solid #000;
}

.cell:nth-child(9n) {
    border-right: none;
}

.cell:nth-child(n+19):nth-child(-n+27),
.cell:nth-child(n+46):nth-child(-n+54) {
    border-bottom: 2px solid #000;
}

#message {
    margin-top: 20px;
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 20px;
    display: none;
    text-align: center;
    min-width: 200px;
    max-width: 100%;
}

#message.error {
    display: block;
    background: rgba(255, 0, 0, 0.8);
}

#message.success {
    display: block;
    background: rgba(76, 175, 80, 0.8);
}

.back-button {
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: background 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
} 