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

body {
    font-family: 'Microsoft YaHei', 'SimHei', sans-serif;
    background: linear-gradient(135deg, #2c1810 0%, #1a0f0a 100%);
    color: #f5e6d3;
    min-height: 100vh;
    padding: 20px;
}

.game-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* 标题区 */
.game-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(139, 69, 19, 0.3);
    border-radius: 10px;
    border: 2px solid #8b4513;
}

.game-header h1 {
    font-size: 2.5em;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    color: #daa520;
    font-style: italic;
}

/* 主游戏区域 */
.main-game {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* 信息面板 */
.info-panel {
    flex: 0 0 300px;
    background: rgba(101, 67, 33, 0.6);
    border: 2px solid #8b4513;
    border-radius: 10px;
    padding: 20px;
}

.info-panel h3 {
    color: #ffd700;
    margin-bottom: 10px;
    border-bottom: 1px solid #8b4513;
    padding-bottom: 5px;
}

.info-panel > div {
    margin-bottom: 20px;
}

.player-info p {
    margin: 8px 0;
}

.turn-red {
    color: #ff4444;
    font-weight: bold;
}

.turn-black {
    color: #333;
    font-weight: bold;
}

/* 按钮样式 */
.btn {
    width: 100%;
    padding: 10px 15px;
    margin: 5px 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary {
    background: #d4af37;
    color: #1a0f0a;
    font-weight: bold;
}

.btn-primary:hover {
    background: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: #8b4513;
    color: #f5e6d3;
}

.btn-secondary:hover {
    background: #a0522d;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.difficulty-control {
    margin-top: 10px;
}

.difficulty-control label {
    display: block;
    margin-bottom: 5px;
    color: #daa520;
}

.difficulty-control select {
    width: 100%;
    padding: 8px;
    border-radius: 5px;
    background: #2c1810;
    color: #f5e6d3;
    border: 1px solid #8b4513;
    font-family: inherit;
}

/* 战斗日志 */
.log-content {
    max-height: 200px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 5px;
    font-size: 0.9em;
}

.log-content p {
    margin: 5px 0;
    padding: 3px 0;
    border-bottom: 1px dotted rgba(139, 69, 19, 0.3);
}

/* 棋盘容器 */
.board-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 棋盘 */
.chess-board {
    background: #d2b48c;
    border: 4px solid #654321;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: grid;
    grid-template-rows: repeat(10, 60px);
    grid-template-columns: repeat(9, 60px);
    gap: 0;
    position: relative;
}

.chess-cell {
    width: 60px;
    height: 60px;
    border: 1px solid #8b7355;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    background: #f5deb3;
    transition: all 0.2s;
}

.chess-cell:hover {
    background: #ffe4b5;
}

.chess-cell.selected {
    background: #ffd700;
    box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.8);
}

.chess-cell.valid-move {
    background: #90ee90;
}

.chess-cell.valid-move::after {
    content: '';
    width: 20px;
    height: 20px;
    background: rgba(0, 128, 0, 0.3);
    border-radius: 50%;
    position: absolute;
}

/* 棋子 */
.chess-piece {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    transition: all 0.2s;
    border: 3px solid;
    pointer-events: none; /* 让点击事件穿透到cell */
}

.chess-piece:hover {
    transform: scale(1.1);
}

.chess-piece.red {
    background: radial-gradient(circle, #ff6b6b 0%, #c92a2a 100%);
    color: #fff;
    border-color: #8b0000;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.chess-piece.black {
    background: radial-gradient(circle, #495057 0%, #212529 100%);
    color: #f8f9fa;
    border-color: #000;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* 音乐控制按钮 */
.btn-music {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 8px 12px;
    font-size: 1.1em;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.btn-music:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.btn-music:active {
    transform: translateY(0);
}

/* 音乐播放列表 */
.music-playlist-content {
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.music-track-item {
    background: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
    border: 2px solid #34495e;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.music-track-item:hover {
    border-color: #667eea;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.music-track-item.playing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #FFD700;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
}

.music-track-number {
    font-size: 1.5em;
    font-weight: bold;
    color: #667eea;
    min-width: 30px;
    text-align: center;
}

.music-track-item.playing .music-track-number {
    color: #FFD700;
}

.music-track-info {
    flex: 1;
}

.music-track-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
}

.music-track-desc {
    font-size: 0.9em;
    color: #bbb;
}

.music-track-item.playing .music-track-desc {
    color: #FFE4B5;
}

.music-track-icon {
    font-size: 1.5em;
}

.music-track-item.playing .music-track-icon {
    animation: musicPulse 1s infinite;
}

@keyframes musicPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* 游戏消息 */
.game-message {
    margin-top: 20px;
    padding: 15px 30px;
    background: rgba(212, 175, 55, 0.2);
    border: 2px solid #d4af37;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1em;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: linear-gradient(135deg, #3e2723 0%, #1b0f0a 100%);
    padding: 40px;
    border-radius: 15px;
    border: 3px solid #d4af37;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

.modal-content h2 {
    color: #ffd700;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.8em;
}

/* 角色选择 */
.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.character-card {
    background: rgba(139, 69, 19, 0.4);
    padding: 20px;
    border: 2px solid #8b4513;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.character-card:hover {
    background: rgba(139, 69, 19, 0.6);
    border-color: #ffd700;
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(255, 215, 0, 0.3);
}

.character-card h3 {
    color: #ffd700;
    margin-bottom: 10px;
}

.character-card p {
    margin: 10px 0;
    font-size: 0.9em;
}

.character-card .bonus {
    display: block;
    margin-top: 10px;
    padding: 5px;
    background: rgba(212, 175, 55, 0.3);
    border-radius: 5px;
    font-size: 0.85em;
    color: #daa520;
}

/* 剧情内容 */
.story-content p {
    line-height: 1.8;
    margin: 15px 0;
    font-size: 1.1em;
}

.story-effect {
    color: #90ee90;
    font-style: italic;
    padding: 10px;
    background: rgba(0, 128, 0, 0.1);
    border-left: 3px solid #90ee90;
    margin: 15px 0;
}

.story-choices {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.story-choices button {
    padding: 12px 30px;
    background: #d4af37;
    color: #1a0f0a;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s;
}

.story-choices button:hover {
    background: #ffd700;
    transform: scale(1.05);
}

/* 结局界面 */
.ending-content {
    text-align: center;
}

.ending-content #ending-text {
    white-space: pre-line;
    line-height: 1.8;
    margin: 20px 0;
}

.achievement {
    color: #ffd700;
    font-size: 1.2em;
    font-weight: bold;
    margin: 20px 0;
    padding: 15px;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 8px;
}

.ending-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.ending-buttons button {
    padding: 12px 30px;
    font-size: 1.1em;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-game {
        flex-direction: column;
    }

    .info-panel {
        flex: 1;
        width: 100%;
    }

    .chess-board {
        grid-template-rows: repeat(10, 50px);
        grid-template-columns: repeat(9, 50px);
    }

    .chess-cell {
        width: 50px;
        height: 50px;
    }

    .chess-piece {
        width: 42px;
        height: 42px;
        font-size: 1.1em;
    }
}

/* 滚动条样式 */
.log-content::-webkit-scrollbar {
    width: 8px;
}

.log-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.log-content::-webkit-scrollbar-thumb {
    background: #8b4513;
    border-radius: 4px;
}

.log-content::-webkit-scrollbar-thumb:hover {
    background: #a0522d;
}

/* 分享模态框样式 */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.share-modal-content {
    background: linear-gradient(135deg, #3e2723 0%, #1b0f0a 100%);
    border: 3px solid #d4af37;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid #8b4513;
}

.share-modal-header h3 {
    color: #ffd700;
    font-size: 1.5em;
    margin: 0;
}

.share-close-btn {
    background: transparent;
    border: none;
    color: #f5e6d3;
    font-size: 1.8em;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.share-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffd700;
    transform: rotate(90deg);
}

.share-preview {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
}

.share-image {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid #8b4513;
}

.share-actions {
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.share-btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.download-btn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(76, 175, 80, 0.3);
}

.download-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(76, 175, 80, 0.4);
}

.copy-btn {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(33, 150, 243, 0.3);
}

.copy-btn:hover {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(33, 150, 243, 0.4);
}

.native-share-btn {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(255, 152, 0, 0.3);
}

.native-share-btn:hover {
    background: linear-gradient(135deg, #F57C00 0%, #E65100 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 152, 0, 0.4);
}

.share-tips {
    padding: 15px 25px 25px;
    text-align: center;
    color: #daa520;
    font-size: 0.9em;
    line-height: 1.6;
    background: rgba(212, 175, 55, 0.1);
    border-top: 1px solid rgba(139, 69, 19, 0.3);
}

/* Toast提示 */
.share-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1em;
    z-index: 3000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    border: 2px solid #4CAF50;
    opacity: 0;
}

.share-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .share-modal-content {
        max-width: 95%;
        border-radius: 15px;
    }

    .share-modal-header h3 {
        font-size: 1.3em;
    }

    .share-btn {
        padding: 12px 16px;
        font-size: 0.95em;
    }

    .share-preview {
        padding: 15px;
    }

    .share-actions {
        padding: 15px 20px;
    }

    .share-tips {
        padding: 12px 20px 20px;
        font-size: 0.85em;
    }
}

/* ==== 新功能样式 ==== */

/* 模式选择卡片 */
.mode-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.mode-card {
    background: rgba(139, 69, 19, 0.4);
    padding: 25px;
    border: 3px solid #8b4513;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.mode-card:hover {
    background: rgba(139, 69, 19, 0.6);
    border-color: #ffd700;
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(255, 215, 0, 0.4);
}

.mode-card h3 {
    color: #ffd700;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.mode-card p {
    margin: 10px 0;
    line-height: 1.6;
}

.mode-card .mode-desc {
    display: block;
    margin-top: 15px;
    padding: 8px;
    background: rgba(212, 175, 55, 0.3);
    border-radius: 5px;
    font-size: 0.9em;
    color: #daa520;
}

/* AI分析面板 */
.analysis-panel {
    flex: 0 0 320px;
    background: rgba(101, 67, 33, 0.6);
    border: 2px solid #8b4513;
    border-radius: 10px;
    padding: 20px;
    max-height: 800px;
    overflow-y: auto;
}

.analysis-panel.hidden {
    display: none;
}

.analysis-panel h3 {
    color: #ffd700;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.2em;
}

.analysis-section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(139, 69, 19, 0.5);
}

.analysis-section h4 {
    color: #daa520;
    margin-bottom: 12px;
    font-size: 0.95em;
    border-bottom: 1px solid rgba(139, 69, 19, 0.5);
    padding-bottom: 5px;
}

.position-score {
    width: 100%;
}

.score-bar {
    height: 24px;
    background: linear-gradient(to right, #333 0%, #333 50%, #ff6b6b 50%, #ff6b6b 100%);
    border-radius: 12px;
    position: relative;
    margin-bottom: 12px;
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.score-indicator {
    position: absolute;
    width: 4px;
    height: 100%;
    background: #ffd700;
    box-shadow: 0 0 8px #ffd700;
    transition: left 0.5s ease;
}

.score-text {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
}

.score-text span {
    color: #f5e6d3;
}

.recommended-list, .move-analysis, .situation-text {
    min-height: 60px;
}

.recommended-list p, .move-analysis p, .situation-text p {
    margin: 8px 0;
    line-height: 1.6;
    font-size: 0.9em;
    color: #f5e6d3;
}

.placeholder {
    color: #999 !important;
    font-style: italic;
}

/* 语音助手按钮 */
.btn-voice {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.btn-voice:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.btn-voice.listening {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
}

.voice-feedback {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    min-height: 40px;
    font-size: 0.9em;
    color: #90ee90;
    display: none;
}

.voice-feedback.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* 残局选择界面 */
.endgame-content {
    max-width: 800px !important;
    width: 95%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close-btn {
    background: transparent;
    border: 2px solid #8b4513;
    color: #f5e6d3;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffd700;
    color: #ffd700;
    transform: rotate(90deg);
}

.endgame-progress {
    margin-bottom: 20px;
    text-align: center;
}

.endgame-progress p {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.progress-bar {
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #8b4513;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.difficulty-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.tab-btn {
    padding: 10px 20px;
    background: rgba(139, 69, 19, 0.4);
    border: 2px solid #8b4513;
    border-radius: 8px;
    color: #f5e6d3;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 0.95em;
}

.tab-btn:hover {
    background: rgba(139, 69, 19, 0.6);
    border-color: #d4af37;
}

.tab-btn.active {
    background: #d4af37;
    color: #1a0f0a;
    border-color: #ffd700;
    font-weight: bold;
}

.endgame-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.endgame-card {
    background: rgba(139, 69, 19, 0.4);
    padding: 15px;
    border: 2px solid #8b4513;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.endgame-card:hover {
    border-color: #ffd700;
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(255, 215, 0, 0.3);
    background: rgba(139, 69, 19, 0.6);
}

.endgame-card.completed {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.2);
}

.endgame-card.completed::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    color: #4CAF50;
    font-size: 1.5em;
    font-weight: bold;
}

.endgame-card h4 {
    color: #ffd700;
    margin-bottom: 8px;
    font-size: 1.1em;
}

.endgame-card p {
    font-size: 0.9em;
    margin: 5px 0;
    line-height: 1.4;
}

.endgame-difficulty {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-top: 5px;
}

.difficulty-easy {
    background: rgba(76, 175, 80, 0.3);
    color: #90ee90;
}

.difficulty-medium {
    background: rgba(255, 193, 7, 0.3);
    color: #ffd54f;
}

.difficulty-hard {
    background: rgba(255, 87, 34, 0.3);
    color: #ff6b6b;
}

.difficulty-expert {
    background: rgba(156, 39, 176, 0.3);
    color: #ce93d8;
}

/* 滚动条样式(分析面板和残局列表) */
.analysis-panel::-webkit-scrollbar,
.endgame-list::-webkit-scrollbar {
    width: 8px;
}

.analysis-panel::-webkit-scrollbar-track,
.endgame-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.analysis-panel::-webkit-scrollbar-thumb,
.endgame-list::-webkit-scrollbar-thumb {
    background: #8b4513;
    border-radius: 4px;
}

.analysis-panel::-webkit-scrollbar-thumb:hover,
.endgame-list::-webkit-scrollbar-thumb:hover {
    background: #a0522d;
}

/* 响应式优化 - 新功能 */
@media (max-width: 1400px) {
    .main-game {
        flex-wrap: wrap;
    }

    .analysis-panel {
        flex: 1 1 100%;
        max-height: 400px;
        order: 3;
    }
}

@media (max-width: 768px) {
    .mode-selection {
        grid-template-columns: 1fr;
    }

    .difficulty-tabs {
        flex-direction: column;
    }

    .tab-btn {
        width: 100%;
    }

    .endgame-list {
        grid-template-columns: 1fr;
    }

    .analysis-panel {
        max-height: 300px;
    }
}

/* ========== 🆕 新增功能样式 ========== */

/* 闪电战计时器 */
.blitz-timer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.timer-display {
    background: rgba(255, 0, 0, 0.9);
    color: white;
    font-size: 2em;
    font-weight: bold;
    padding: 15px 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
    animation: timerPulse 1s infinite;
}

@keyframes timerPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* 成就通知 */
.achievement-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 10000;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideInRight 0.5s ease-out;
    max-width: 300px;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.achievement-notification h3 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
}

.achievement-notification p {
    margin: 0;
    font-size: 0.9em;
}

/* 成就列表 */
.achievement-list {
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.achievement-card {
    background: rgba(101, 67, 33, 0.4);
    border: 2px solid #8b4513;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    cursor: pointer;
    transition: all 0.3s;
}

.achievement-card:hover {
    background: rgba(101, 67, 33, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.achievement-card.locked {
    opacity: 0.5;
    filter: grayscale(100%);
}

.achievement-card.unlocked {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.achievement-card h4 {
    color: #ffd700;
    margin: 0 0 10px 0;
}

.achievement-card p {
    margin: 5px 0;
    font-size: 0.9em;
}

.achievement-tabs {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    justify-content: center;
}

/* 复盘列表 */
.replay-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.replay-card {
    background: rgba(101, 67, 33, 0.4);
    border: 2px solid #8b4513;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    cursor: pointer;
    transition: all 0.3s;
}

.replay-card:hover {
    background: rgba(101, 67, 33, 0.6);
    border-color: #ffd700;
}

.replay-card h4 {
    color: #ffd700;
    margin: 0 0 10px 0;
}

.replay-card p {
    margin: 5px 0;
    font-size: 0.9em;
}

.replay-controls {
    display: flex;
    gap: 10px;
    padding: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.replay-controls button {
    padding: 10px 20px;
    background: #d4af37;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    color: #1a0f0a;
    font-weight: bold;
    transition: all 0.3s;
}

.replay-controls button:hover {
    background: #ffd700;
    transform: translateY(-2px);
}

/* 统计面板 */
.stats-content {
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
}

.stats-section {
    margin: 20px 0;
}

.stats-section h3 {
    color: #ffd700;
    border-bottom: 2px solid #8b4513;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-item {
    background: rgba(101, 67, 33, 0.3);
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #8b4513;
}

.stat-label {
    font-size: 0.9em;
    color: #daa520;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffd700;
    margin-top: 5px;
}

/* Boss卡片 */
.boss-card {
    background: rgba(139, 0, 0, 0.3);
    border: 3px solid #8b0000;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.boss-card:hover {
    background: rgba(139, 0, 0, 0.5);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
}

.boss-card h3 {
    font-size: 2em;
    margin: 10px 0;
}

.boss-difficulty {
    color: #ff6600;
    font-weight: bold;
}

/* 模态框头部 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
}

/* 成就进度 */
.achievement-progress {
    text-align: center;
    margin-bottom: 20px;
}

.achievement-progress p {
    margin-bottom: 10px;
}

/* 滚动条样式优化 */
.achievement-list::-webkit-scrollbar,
.replay-list::-webkit-scrollbar,
.stats-content::-webkit-scrollbar {
    width: 8px;
}

.achievement-list::-webkit-scrollbar-track,
.replay-list::-webkit-scrollbar-track,
.stats-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.achievement-list::-webkit-scrollbar-thumb,
.replay-list::-webkit-scrollbar-thumb,
.stats-content::-webkit-scrollbar-thumb {
    background: #8b4513;
    border-radius: 4px;
}

.achievement-list::-webkit-scrollbar-thumb:hover,
.replay-list::-webkit-scrollbar-thumb:hover,
.stats-content::-webkit-scrollbar-thumb:hover {
    background: #a0522d;
}
