/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

/* 导航样式 */
nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    background-color: #3498db;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.nav-btn.active {
    background-color: #27ae60;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 主内容区 */
main {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 500px;
}

/* 游戏容器 */
.game-container {
    display: none;
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
}

.game-container.active {
    display: block;
}

.game-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

/* 游戏信息 */
.game-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.game-info p {
    margin: 5px 0;
}

.feedback {
    font-weight: bold;
    color: #e74c3c;
}

/* 游戏控制区 */
.game-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

input[type="text"] {
    padding: 10px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    width: 150px;
    text-align: center;
}

input[type="text"]:focus {
    outline: none;
    border-color: #3498db;
}

button {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#guess-btn {
    background-color: #3498db;
    color: white;
}

#guess-btn:hover {
    background-color: #2980b9;
}

#restart-guess-btn, #restart-sudoku-btn {
    background-color: #e74c3c;
    color: white;
}

#restart-guess-btn:hover, #restart-sudoku-btn:hover {
    background-color: #c0392b;
}

/* 猜测历史 */
.guess-history {
    margin-top: 30px;
}

.guess-history h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

#history-list {
    list-style-type: none;
    max-height: 200px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 10px;
}

#history-list li {
    padding: 5px 10px;
    border-bottom: 1px solid #eee;
}

#history-list li:last-child {
    border-bottom: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }

    .nav-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .game-container {
        padding: 20px;
    }

    .game-controls {
        flex-direction: column;
        align-items: center;
    }

    input[type="text"] {
        width: 100%;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .game-container h2 {
        font-size: 1.3rem;
    }

    .game-info {
        padding: 10px;
    }

    button {
        width: 100%;
        max-width: 200px;
    }
}