#sudoku-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(400px, 90vw);
    max-height: 90vh;
    z-index: 1000;
    overflow: auto;
}

.window-content {
    padding: 8px;
    background: #c0c0c0;
    overflow: auto;
}

.game-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 4px;
    background: var(--win98-bg);
    border: 2px solid #808080;
    position: sticky;
    top: 0;
    z-index: 1;
}

.difficulty-selector {
    display: flex;
    gap: 4px;
}

.game-stats {
    display: flex;
    gap: 8px;
    align-items: center;
}

.game-stats span {
    font-family: 'MS Sans Serif', sans-serif;
    font-size: 12px;
}

#game-board {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 1px;
    background: #808080;
    padding: 4px;
    border: 2px solid #808080;
    margin-bottom: 8px;
    width: 100%;
    aspect-ratio: 1;
}

.cell {
    aspect-ratio: 1;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: min(20px, 4vw);
    cursor: pointer;
    user-select: none;
    min-width: 0;
    min-height: 0;
}

.cell.fixed {
    background: #e0e0e0;
    cursor: default;
}

.cell.selected {
    background: #000080;
    color: white;
}

.cell.error {
    color: #ff0000;
}

.cell:nth-child(3n) {
    margin-right: 2px;
}

.cell:nth-child(9n) {
    margin-right: 0;
}

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

.number-pad {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 4px;
    background: #c0c0c0;
    border: 2px solid #808080;
    position: sticky;
    bottom: 0;
    z-index: 1;
}

.number-btn {
    width: 100%;
    aspect-ratio: 1;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: min(16px, 3vw);
    min-height: 10px;
}

#clear {
    width: 100%;
    height: 100%;
    aspect-ratio: 1;
    font-family: 'MS Sans Serif', sans-serif;
    font-size: min(16px, 3vw);
    min-height: 10px;
}

#sudoku-window .window-controls button {
    width: 16px;
    height: 14px;
    border: 1px solid #fff;
    background: #c0c0c0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    cursor: default;
    color: #808080;
}

#sudoku-window .window-controls button#close {
    color: #000;
    cursor: pointer;
}

#sudoku-window .window-controls button#close:hover {
    background: #d4d4d4;
}

#sudoku-window .window-controls button#close:active {
    background: #b0b0b0;
    border-color: #808080 #fff #fff #808080;
}

@media (max-height: 600px) {
    #sudoku-window {
        top: 0;
        transform: translate(-50%, 0);
        max-height: 100vh;
    }
}

@media (max-width: 400px) {
    .cell {
        font-size: 16px;
    }
    
    .number-btn {
        font-size: 14px;
    }
}

.win-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}

.win-message .win98-window {
    width: 300px;
    background: #c0c0c0;
    border: 2px solid #000;
    padding: 4px;
}

.win-message .window-title {
    background: #000080;
    color: white;
    padding: 2px 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.win-message .window-content {
    padding: 16px;
    text-align: center;
}

.win-message p {
    margin: 8px 0;
    font-family: 'MS Sans Serif', sans-serif;
}

.win-message .button-98 {
    margin-top: 16px;
} 