﻿/* wwwroot/css/chessViewer.css */

/* 棋谱查看器Modal */
#chessViewerModal .modal-xl {
    max-width: 1200px;
}

/* 棋盘容器 */
#chessboard {
    border: 2px solid #4a4a4a;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.move-arrow-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* 控制按钮样式 */
.gap-2 {
    gap: 0.5rem;
}

#startBtn, #prevBtn, #nextBtn, #endBtn, #flipBtn {
    min-width: 80px;
    font-size: 0.9rem;
}

    #startBtn:disabled,
    #prevBtn:disabled,
    #nextBtn:disabled,
    #endBtn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* 着法计数器 */
#moveCounter {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

/* 对局信息卡片 */
#gameInfo dl {
    font-size: 0.9rem;
    line-height: 1.6;
}

#gameInfo dt {
    font-weight: 600;
    color: #e6b13e;
}

#gameInfo dd {
    color: #e0e0e0;
}

/* 着法列表样式 */
.move-list {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    line-height: 2;
}

.move-pair {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.move-number {
    display: inline-block;
    min-width: 35px;
    font-weight: bold;
    color: #888;
}

.move-item {
    display: inline-block;
    padding: 2px 8px;
    margin: 0 2px;
    border-radius: 3px;
    transition: all 0.2s ease;
    color: #e0e0e0;
}

    .move-item:hover {
        background-color: rgba(230, 177, 62, 0.3);
        transform: scale(1.05);
    }

    .move-item.current-move {
        background-color: #e6b13e !important;
        color: #1a1a1a !important;
        font-weight: bold !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

/* 滚动条美化 */
#movesList::-webkit-scrollbar,
#gameInfo::-webkit-scrollbar {
    width: 8px;
}

#movesList::-webkit-scrollbar-track,
#gameInfo::-webkit-scrollbar-track {
    background: #2c2c2c;
}

#movesList::-webkit-scrollbar-thumb,
#gameInfo::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 4px;
}

    #movesList::-webkit-scrollbar-thumb:hover,
    #gameInfo::-webkit-scrollbar-thumb:hover {
        background: #5a5a5a;
    }

#movesList {
    max-height: 300px; 
    overflow-y: auto; 
}

/* 卡片样式 */
#chessViewerModal .card {
    background-color: #2c2c2c;
    border: 1px solid #4a4a4a;
}

#chessViewerModal .card-header {
    background-color: #3a3a3a;
    color: #e6b13e;
    font-weight: 600;
    border-bottom: 1px solid #4a4a4a;
}

#chessViewerModal .card-body {
    background-color: #242424;
    color: #e0e0e0;
}

/* Modal样式调整 */
#chessViewerModal .modal-content {
    background-color: #1e1e1e;
    border: 1px solid #4a4a4a;
}

#chessViewerModal .modal-header {
    background-color: #2c2c2c;
    border-bottom: 1px solid #4a4a4a;
}

#chessViewerModal .modal-title {
    color: #e6b13e;
}

#chessViewerModal .modal-footer {
    background-color: #2c2c2c;
    border-top: 1px solid #4a4a4a;
}

/* 按钮图标 */
.bi {
    font-size: 1rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #chessViewerModal .modal-xl {
        max-width: 95%;
    }

    #chessboard {
        max-width: 100% !important;
    }

    .move-list {
        font-size: 0.9rem;
    }

    #startBtn, #prevBtn, #nextBtn, #endBtn, #flipBtn {
        min-width: 60px;
        font-size: 0.8rem;
        padding: 0.375rem 0.5rem;
    }
}
