/* 简化版CSS - 四列布局 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Microsoft YaHei', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #2c3e50, #4a235a, #1a5276);
    min-height: 100vh;
    color: white;
    overflow-x: auto;
}

.container {
    display: flex;
    min-width: 1400px;
    width: 100%;
    gap: 20px;
    padding: 20px;
}

/* 四列布局 */
.col-skill {
    flex: 1;
    min-width: 200px;
    max-width: 200px;
}

.col-board {
    flex: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 500px;
}

/* 右侧容器 - 包含第三列和第四列 */
.col-right-container {
    flex: 3;
    display: flex;
    min-width: 600px;
    gap: 20px;
}

.col-log {
    flex: 1;
    min-width: 250px;
    max-width: 250px;
}

.col-info {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 350px;
}

/* 图片容器 - 减小高度和间距 */
.image-container {
    background-color: rgba(30, 40, 60, 0.8);
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#dynamic-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 5px;
}

.image-placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    text-align: center;
}

/* 技能面板 */
.skill-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: rgba(30, 40, 60, 0.8);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.skill-btn {
    width: 100%;
    text-align: left;
    padding: 12px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

.skill-btn:disabled {
    background-color: #7f8c8d;
    cursor: not-allowed;
    transform: none;
}

.skill-available {
    background-color: #27ae60;
}

.skill-available:hover {
    background-color: #219653;
}

.skill-activated {
    background-color: #f39c12;
}

.skill-activated:hover {
    background-color: #e67e22;
}

/* 按钮样式 */
button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

button:hover:not(:disabled) {
    background-color: #2980b9;
    transform: translateY(-2px);
}

button:disabled {
    background-color: #7f8c8d;
    cursor: not-allowed;
    transform: none;
}

/* 特殊按钮 */
.start-button {
    background-color: #ff9900 !important;
    font-weight: bold;
    animation: pulse-orange 1.5s infinite;
}

.award-button {
    background-color: #ff9900 !important;
    font-weight: bold;
    animation: pulse-orange 1.5s infinite;
}

.add-skill-button {
    background-color: #9b59b6 !important;
    font-weight: bold;
    margin-top: 10px;
}

.add-skill-button:hover {
    background-color: #8e44ad !important;
}

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

/* 棋盘区域 */
.board-container {
    position: relative;
    background-color: rgba(30, 40, 60, 0.8);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    padding: 20px;
    margin-bottom: 5px;
}

#board {
    background-color: #deb887;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    border-radius: 2px;
    display: block;
    transition: opacity 0.5s;
    cursor: pointer;
}

/* 玩家信息 */
.game-info {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 15px;
}

.player-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.15);
    min-width: 120px;
}

.player-name {
    font-size: 1.0rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.black-player .player-name {
    color: #000;
    text-shadow: 0 0 3px white;
}

.white-player .player-name {
    color: #fff;
    text-shadow: 0 0 3px black;
}

.player-input {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: white;
    padding: 5px 8px;
    width: 100px;
    text-align: center;
    margin-bottom: 5px;
}

/* 下拉框样式 - 改为与整体风格一致 */
.player-type-selector {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
    align-items: center;
}

.player-type-select {
    background-color: rgba(30, 40, 60, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: white;
    padding: 5px 8px;
    width: 120px;
    font-size: 12px;
    cursor: pointer;
}

.player-type-select:focus {
    outline: none;
    border-color: #3498db;
}

/* 状态显示 */
.status-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 2;
    font-size: 1.3rem;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    margin: 0 10px;
    flex-direction: column;
    gap: 5px;
}

.turn-info {
    font-size: 1.1rem;
}

.additional-info {
    font-size: 1rem;
    color: #ffcc00;
}

.black-turn {
    color: #000;
    background-color: rgba(255, 255, 255, 0.8);
}

.white-turn {
    color: #333;
    background-color: rgba(255, 255, 255, 0.9);
}

.warning {
    color: #ff3333;
    background-color: rgba(255, 255, 255, 0.9);
    animation: pulse 0.8s infinite;
}

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

/* 什刹海区域 - 减小与棋盘的间隙 */
.map-container {
    background-color: rgba(30, 40, 60, 0.8);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 500px;
    margin-top: 5px;
}

.map-title {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #ffcc00;
}

#shichahai-map {
    width: 100%;
    height: 100px;
    background-color: #3498db;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
    border: 2px solid #1f618d;
}

.removed-pieces {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    margin-top: 10px;
}

.removed-piece {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.black-piece {
    background-color: #000;
    color: white;
}

.white-piece {
    background-color: #fff;
    color: black;
}

/* 操作记录 - 增加高度上限，信息从新到旧显示 */
.action-log {
    background-color: rgba(30, 40, 60, 0.8);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.action-log h3 {
    color: #ffcc00;
    margin-bottom: 10px;
    text-align: center;
}

#action-log-content {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex: 1;
}

.log-entry {
    margin-bottom: 8px;
    padding: 5px;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.1);
    font-size: 14px;
    break-inside: avoid;
}

.log-black {
    border-left: 3px solid #000;
}

.log-white {
    border-left: 3px solid #fff;
}

/* AI思考模块 */
.ai-thinking-container {
    background: rgba(30, 40, 60, 0.95);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    display: none;
}

.ai-thinking-container h2 {
    color: #ffcc00;
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.3em;
    padding-bottom: 8px;
    text-align: center;
}

.ai-thinking-log {
    background: rgba(20, 30, 48, 0.95);
    border-radius: 8px;
    padding: 12px;
    min-height: 120px;
    max-height: 120px;
    overflow-y: auto;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #e8f4f8;
}

/* 规则说明 */
.instructions {
    background-color: rgba(30, 40, 60, 0.8);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    padding: 20px;
    overflow-y: auto;
    position: relative;
}

.instructions h2 {
    color: #ffcc00;
    margin-bottom: 15px;
    text-align: center;
}

.instructions p {
    margin-bottom: 10px;
    line-height: 1.5;
}

.instructions ul {
    text-align: left;
    margin: 10px 0;
    padding-left: 20px;
}

.instructions li {
    margin-bottom: 8px;
}

/* 创意信息 */
.credit-info {
    text-align: right;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.credit-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #ffcc00;
}

/* 标题和副标题 */
header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.subtitle {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #ffcc00;
}

/* 音量信息 */
.volume-info {
    background-color: rgba(30, 40, 60, 0.8);
    border-radius: 10px;
    padding: 10px;
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    color: #ffcc00;
}

/* 对话框样式 - 更简洁朴素 */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.dialog-content {
    background-color: rgba(30, 40, 60, 0.95);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    min-width: 280px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dialog-content h3 {
    color: #ffcc00;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.dialog-content input {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
}

.dialog-content input:focus {
    outline: none;
    border-color: #3498db;
}

.dialog-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.dialog-buttons button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

#save-skill-btn {
    background-color: #27ae60;
    color: white;
}

#save-skill-btn:hover {
    background-color: #219653;
}

#cancel-skill-btn {
    background-color: #7f8c8d;
    color: white;
}

#cancel-skill-btn:hover {
    background-color: #6c7a7d;
}

/* 动画效果 */
.piece-fade-out {
    animation: fadeOut 1s ease-out forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0);
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .container {
        min-width: 1200px;
    }
}

/* 隐藏音频元素 */
audio {
    display: none;
}
