/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background: #f5f5f5 url('../assets/background.jpg') repeat;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5rem;
    color: #8B4513;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    animation: titleGlow 2s infinite alternate;
}

@keyframes titleGlow {
    from {
        text-shadow: 1px 1px 5px rgba(139, 69, 19, 0.2);
    }
    to {
        text-shadow: 1px 1px 15px rgba(139, 69, 19, 0.5);
    }
}

.game-info {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#status {
    font-size: 1.2rem;
    font-weight: bold;
    color: #8B4513;
}

/* 游戏容器 */
.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

/* 首页选项样式 */
.home-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 500px;
    margin-bottom: 30px;
    background-color: rgba(255, 255, 255, 0.85);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.home-options:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.game-mode-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 150px;
    height: 150px;
    border-radius: 10px;
    transition: all 0.3s ease;
    background-color: #8B4513;
    border: none;
    cursor: pointer;
}

.mode-btn:hover {
    transform: scale(1.05);
    background-color: #A0522D;
}

.btn-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.btn-text {
    font-size: 1.2rem;
    font-weight: bold;
}

.game-settings {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.setting-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(222, 184, 135, 0.3);
    padding: 10px 15px;
    border-radius: 8px;
}

.styled-select {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #DEB887;
    background-color: white;
    font-size: 1rem;
    min-width: 120px;
    cursor: pointer;
    transition: all 0.2s;
}

.styled-select:hover {
    border-color: #8B4513;
}

/* 游戏选项 */
.game-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.game-options .setting-group {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 5px;
    margin-left: 10px;
}

.game-options .styled-select {
    margin-left: 5px;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: white;
    font-size: 0.9rem;
}

/* 响应式调整 */
@media (max-width: 600px) {
    .game-options {
        flex-direction: column;
        align-items: center;
    }
    
    .game-options .setting-group {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
}
.btn {
    padding: 10px 20px;
    font-size: 1rem;
    background-color: #8B4513;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #A0522D;
}

.difficulty-selector {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border-radius: 5px;
}

select {
    padding: 5px;
    border-radius: 3px;
    border: 1px solid #ccc;
    margin-left: 5px;
}

/* 棋盘容器 */
.board-container {
    position: relative;
    margin: 0 auto;
}

#board {
    background-color: #DEB887;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

/* 页脚 */
footer {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    color: #666;
    font-size: 0.9rem;
}

/* 工具类 */
.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .board-container {
        width: 100%;
    }
    
    #board {
        width: 100%;
        height: auto;
    }
    
    .btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .game-mode-options {
        flex-direction: column;
        align-items: center;
    }
    
    .mode-btn {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 400px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .game-options {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .setting-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .styled-select {
        width: 100%;
    }
}

.sound-btn {
    background-color: #6b8e23;
    margin-left: 10px;
}

.sound-btn:hover {
    background-color: #556b2f;
}

/* 主题样式 */
.theme-classic #board {
    background-color: #DEB887;
}

.theme-modern #board {
    background-color: #f0f0f0;
}

.theme-dark {
    background: #222 url('../assets/background-dark.jpg') repeat;
    color: #eee;
}

.theme-dark #board {
    background-color: #444;
}

.theme-dark .game-info,
.theme-dark .home-options {
    background-color: rgba(40, 40, 40, 0.85);
    color: #eee;
}

.theme-dark .setting-group {
    background-color: rgba(60, 60, 60, 0.5);
}

.theme-dark .btn {
    background-color: #555;
}

.theme-dark .btn:hover {
    background-color: #666;
}

@media (max-width: 400px) {
    .sound-btn {
        margin-top: 10px;
        margin-left: 0;
    }
}

.undo-btn {
    background-color: #8b4513;
    margin-left: 10px;
}

.undo-btn:hover {
    background-color: #a0522d;
}

@media (max-width: 400px) {
    .undo-btn {
        margin-top: 10px;
        margin-left: 0;
    }
}