.sudoku-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.header-content h1 {
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 2.5rem;
}

.game-subtitle {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.game-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.info-box {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
    min-width: 120px;
}

.info-label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.info-value {
    font-size: 1.4rem;
    font-weight: 700;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* 游戏说明样式 */
.game-instructions {
    margin: 20px 0;
    text-align: center;
}

.instructions-button {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.instructions-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

.instructions-content {
    margin-top: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #4facfe;
    animation: slideDown 0.3s ease-out;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    text-align: left;
}

.instruction-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.instruction-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.instruction-item strong {
    color: #2d3748;
    margin-right: 5px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.select-input {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
}

.button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.button.secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.button.third {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.sudoku-board-container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    margin: 30px 0;
    align-items: start;
}

.sudoku-board {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(9, 1fr);
    gap: 2px;
    background: #2d3748;
    border: 4px solid #2d3748;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    aspect-ratio: 1;
}

.sudoku-cell {
    background: white;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sudoku-cell:hover {
    background: #f7fafc;
    transform: scale(1.05);
}

.sudoku-cell.selected {
    background: #667eea;
    color: white;
}

.sudoku-cell.given {
    background: #e2e8f0;
    color: #2d3748;
    font-weight: 900;
    cursor: not-allowed;
}

.sudoku-cell.error {
    background: #feb2b2;
    animation: shake 0.5s ease-in-out;
}

.sudoku-cell.hint {
    background: #c6f6d5;
    animation: pulse 1s ease-in-out;
}

.number-pad {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid #e2e8f0;
}

.number-pad h4 {
    text-align: center;
    margin-bottom: 15px;
    color: #2d3748;
    font-size: 1.2rem;
}

.number-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.number-btn {
    width: 50px;
    height: 50px;
    border: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #2d3748;
}

.number-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.number-btn.active {
    background: #667eea;
    color: white;
}

.number-btn.erase-btn {
    background: #f56565;
    color: white;
    grid-column: span 3;
    font-size: 1rem;
}

.number-btn.erase-btn:hover {
    background: #e53e3e;
}

.game-messages {
    text-align: center;
    margin: 20px 0;
}

.message {
    padding: 15px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 10px 0;
    animation: slideIn 0.3s ease-out;
}

.success-msg {
    background: #c6f6d5;
    color: #2f855a;
    border: 2px solid #68d391;
}

.error-msg {
    background: #fed7d7;
    color: #c53030;
    border: 2px solid #f56565;
}

.hint-msg {
    background: #bee3f8;
    color: #2b6cb0;
    border: 2px solid #63b3ed;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sudoku-container {
        padding: 10px;
    }
    
    .sudoku-board-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .sudoku-board {
        margin: 0 auto;
        max-width: 100%;
    }
    
    .sudoku-cell {
        font-size: 1.2rem;
    }
    
    .game-info {
        gap: 15px;
    }
    
    .info-box {
        min-width: 100px;
        padding: 10px;
    }
    
    .game-controls {
        gap: 10px;
    }
    
    .button {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .instructions-grid {
        grid-template-columns: 1fr;
    }
    
    .instruction-item {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .sudoku-cell {
        font-size: 1rem;
    }
    
    .number-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .number-pad {
        padding: 15px;
    }
}