/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    transition: all 0.3s ease;
}

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

/* 头部样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 10px;
}

header h1 {
    color: #333;
    font-size: 28px;
    text-align: center;
    margin: 15px 0;
    width: 100%;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

#user-status {
    font-size: 16px;
    color: #666;
}

button {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #357abd;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* 主内容区域 */
main {
    display: flex;
    gap: 20px;
}

.game-container {
    flex: 3;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

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

.player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.avatar {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f0f0f0;
}

.vs {
    font-size: 20px;
    font-weight: bold;
    color: #999;
}

.game-status {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: #4a90e2;
    margin-bottom: 10px;
    min-height: 24px;
}

/* 棋盘样式 */
.board-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#board {
    background-color: #e9c396;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 游戏控制按钮 */
.game-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.game-controls .main-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.game-controls .secondary-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.game-controls button {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 80px;
    height: auto;
    padding: 8px;
    white-space: normal;
}

/* 音乐控制区域 */
.music-controls {
    margin-top: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.control-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.control-group label {
    width: 100%;
    font-size: 14px;
    color: #555;
    margin-bottom: 5px;
}

.control-group select {
    width: 100%;
    max-width: 200px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.control-group input[type="range"] {
    width: 100%;
    max-width: 200px;
    height: 5px;
    margin-bottom: 10px;
}

.volume-controls {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.volume-markers {
    display: flex;
    gap: 2px;
    width: 100%;
    max-width: 200px;
    margin-top: 5px;
    padding: 0 2px;
}

.volume-markers button {
    flex: 1;
    padding: 4px 8px;
    font-size: 12px;
    color: white;
    background-color: #9E9E9E;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.volume-markers button.active {
    background-color: #2196F3;
}

.volume-controls button {
    padding: 8px 16px;
    color: white;
    background-color: #9E9E9E;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.volume-controls button.active {
    background-color: #2196F3;
}

.control-group {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.control-group label {
    width: 100px;
    font-size: 14px;
    color: #555;
}

.control-group select {
    flex: 1;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.control-group input[type="range"] {
    flex: 1;
    height: 5px;
}

/* 聊天区域 */
.chat-container {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 600px;
}

.chat-header {
    padding: 10px 15px;
    background-color: #4a90e2;
    color: white;
    border-radius: 8px 8px 0 0;
    font-weight: bold;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 8px 12px;
    border-radius: 18px;
    max-width: 80%;
    word-break: break-word;
}

.message.self {
    align-self: flex-end;
    background-color: #dcf8c6;
}

.message.other {
    align-self: flex-start;
    background-color: #f0f0f0;
}

.message .sender {
    font-size: 12px;
    color: #666;
    margin-bottom: 3px;
}

.chat-input-container {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
}

#chat-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
}

#send-btn {
    margin-left: 10px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 24px;
    cursor: pointer;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 深色主题 */
body.dark-theme {
    background-color: #222;
    color: #eee;
}

body.dark-theme header {
    border-bottom-color: #444;
}

body.dark-theme header h1 {
    color: #eee;
}

body.dark-theme .game-container,
body.dark-theme .chat-container {
    background-color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

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

body.dark-theme .message.self {
    background-color: #2e7d32;
    color: #fff;
}

body.dark-theme .message.other {
    background-color: #444;
}

body.dark-theme #chat-input {
    background-color: #444;
    border-color: #555;
    color: #eee;
}

body.dark-theme .modal-content {
    background-color: #333;
    color: #eee;
}

/* 添加音乐控制区域的暗色主题样式 */
body.dark-theme .music-controls {
    background-color: #444;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

body.dark-theme .control-group label {
    color: #ddd;
}

body.dark-theme .control-group select {
    background-color: #555;
    border-color: #666;
    color: #eee;
}

/* 统一主题选择按钮样式 */
#theme-select {
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

#theme-select:hover {
    background-color: #357abd;
}

/* 音量滑块样式 */
.volume-markers {
    display: flex;
    justify-content: flex-start;
    gap: 4px;
    width: auto;
    margin-top: 5px;
    padding: 0 2px;
}

.volume-marker {
    width: auto;
    min-width: 24px;
    height: 20px;
    margin: 0 1px;
    border-radius: 4px;
    padding: 0 4px;
    line-height: 20px;
    font-size: 10px;
    color: white;
    background-color: #9E9E9E;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.volume-marker.active {
    background-color: #2196F3;
}

body.dark-theme .volume-marker {
    color: white;
}

/* 温馨提醒样式 */
.tips-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tips-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background-color: #e9ecef;
    cursor: pointer;
    transition: background-color 0.2s;
}

.tips-header:hover {
    background-color: #dee2e6;
}

.tips-icon {
    margin-right: 8px;
    font-size: 18px;
}

.tips-title {
    flex-grow: 1;
    font-weight: bold;
    color: #495057;
}

.tips-arrow {
    transition: transform 0.3s;
}

.tips-header.collapsed .tips-arrow {
    transform: rotate(-90deg);
}

.tips-content {
    padding: 15px;
    background-color: white;
    transition: max-height 0.3s ease-out;
    max-height: 200px;
    overflow: hidden;
}

.tips-content.collapsed {
    max-height: 0;
    padding: 0 15px;
}

.tips-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-content li {
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    padding-left: 20px;
    position: relative;
}

.tips-content li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #4a90e2;
}

.tips-content li:last-child {
    margin-bottom: 0;
}

.reminder-container {
    margin: 0 auto 20px;
    max-width: 800px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.reminder-header {
    padding: 10px 15px;
    background-color: #4a90e2;
    color: white;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reminder-header .arrow {
    transition: transform 0.3s ease;
}

.reminder-container.expanded .arrow {
    transform: rotate(180deg);
}

.reminder-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: white;
}

.reminder-container.expanded .reminder-content {
    max-height: 200px;
    padding: 15px;
}

.reminder-content ol {
    margin-left: 20px;
}

.reminder-content li {
    margin-bottom: 8px;
}

body.dark-theme .reminder-container {
    border-color: #444;
}

body.dark-theme .reminder-header {
    background-color: #357abd;
}

body.dark-theme .reminder-content {
    background-color: #333;
    color: #eee;
}

body.dark-theme .tips-container {
    background-color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark-theme .tips-header {
    background-color: #444;
}

body.dark-theme .tips-header:hover {
    background-color: #555;
}

body.dark-theme .tips-title {
    color: #ddd;
}

body.dark-theme .tips-content {
    background-color: #333;
}

body.dark-theme .tips-content li {
    color: #bbb;
}

/* 响应式设计 */
@media (max-width: 768px) {
    main {
        flex-direction: column;
    }
    
    .chat-container {
        height: 300px;
    }
    
    #board {
        width: 100%;
        height: auto;
    }
}