body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px 0;
    background-color: #f0f0f0;
}

.container {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto 40px;
    position: sticky;
    top: 20px;
    z-index: 100;
}

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

.game-controls {
    margin-bottom: 20px;
}

.game-controls button,
.game-controls select {
    padding: 8px 16px;
    font-size: 16px;
    margin: 0 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background-color: #2196F3;
    color: white;
    border: none;
    transition: background-color 0.2s;
}

.game-controls button:hover {
    background-color: #1976D2;
}

.game-controls select {
    background-color: white;
    color: #333;
    border: 1px solid #ddd;
}

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

.cell {
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.cell.show-candidates {
    font-size: 10px;
    font-weight: normal;
    align-items: start;
    padding: 2px;
}

.candidates {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100%;
    height: 100%;
    gap: 0;
}

.candidate {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #666;
}

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

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

.cell.given {
    background-color: #f5f5f5;
    color: #333;
}

.cell.selected {
    background-color: #e3f2fd;
}

.cell.error {
    color: #f44336;
}

.number-pad {
    display: grid;
    grid-template-columns: repeat(5, 60px);
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.number-btn {
    padding: 15px;
    font-size: 18px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.number-btn:hover {
    background-color: #f0f0f0;
}

.erase-btn {
    grid-column: span 2;
}

.instructions {
    margin: 10px 0;
    font-size: 14px;
    color: #666;
}

.hint-display {
    margin: 10px 0;
    padding: 10px;
    background-color: #e3f2fd;
    border-radius: 4px;
    font-size: 14px;
    min-height: 20px;
    line-height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hint-display.active {
    opacity: 1;
}

.cell.hint-highlight {
    background-color: #ffeb3b;
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.lexicon {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.lexicon-header {
    color: #333;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lexicon-toggle {
    padding: 5px 15px;
    font-size: 14px;
    border: 1px solid #2196F3;
    background: #2196F3;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.lexicon-toggle:hover {
    background: #1976D2;
}

.lexicon-content {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.technique {
    margin-bottom: 25px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #2196F3;
}

.technique h3 {
    color: #2196F3;
    margin-bottom: 10px;
}

.technique p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 8px;
}

.technique .example {
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin-top: 10px;
    padding-left: 20px;
}

.difficulty-guide {
    margin-top: 30px;
    padding: 20px;
    background: #e3f2fd;
    border-radius: 8px;
}

.difficulty-guide h3 {
    color: #1976D2;
    margin-bottom: 15px;
}

.difficulty-guide p {
    margin-bottom: 10px;
    color: #555;
    line-height: 1.6;
}

.difficulty-guide strong {
    color: #333;
    display: inline-block;
    min-width: 70px;
}