/* 华容道游戏样式 */
.huarong-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: Arial, sans-serif;
    text-align: center;
}

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

.game-title {
    font-size: 28px;
    color: #776e65;
    margin: 0 0 10px 0;
}

.game-description {
    color: #776e65;
    margin: 0;
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
}

.info-item {
    text-align: center;
}

.info-label {
    font-size: 14px;
    color: #666;
}

.info-value {
    font-weight: bold;
    color: #1e3c72;
    font-size: 18px;
}

.puzzle-board {
    width: 400px;
    height: 450px;
    background: #d2b48c;
    border: 5px solid #8b4513;
    border-radius: 5px;
    margin: 20px auto;
    position: relative;
    box-sizing: border-box;
}

.puzzle-piece {
    position: absolute;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 20px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: opacity 0.2s ease;
    user-select: none;
}

.puzzle-piece:hover {
    opacity: 0.9;
}

.piece-caocao {
    background: linear-gradient(to bottom, #8B0000, #A52A2A);
    border: 2px solid #6b0000;
}

.piece-yuanyuan {
    background: linear-gradient(to bottom, #00008B, #4169E1);
    border: 2px solid #00006b;
}

.piece-huangzhong {
    background: linear-gradient(to bottom, #228B22, #32CD32);
    border: 2px solid #1e6b1e;
}

.piece-machao {
    background: linear-gradient(to bottom, #FF8C00, #FFA500);
    border: 2px solid #cc7000;
}

.piece-zhangfei {
    background: linear-gradient(to bottom, #800080, #DA70D6);
    border: 2px solid #600060;
}

.piece-soldier {
    background: linear-gradient(to bottom, #696969, #A9A9A9);
    border: 2px solid #494949;
}

.exit {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 30px;
    background: #ff6b6b;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.control-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    background: #8f7a66;
    color: #f9f6f2;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: #7c6b5d;
    transform: translateY(-2px);
}

.win-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    z-index: 100;
    display: none;
}

.win-title {
    font-size: 36px;
    color: #ff6b6b;
    margin-bottom: 20px;
}

.win-text {
    font-size: 20px;
    color: #776e65;
    margin-bottom: 30px;
}

/* 隐藏按钮和工作模式 */
.hidden-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    z-index: 9999;
    display: none;
}

.work-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.work-screen {
    background: #f0f0f0;
    width: 90%;
    height: 80%;
    border: 1px solid #ccc;
    padding: 20px;
    font-family: 'Courier New', monospace;
    overflow: auto;
}

.work-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

.work-content {
    line-height: 1.6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .puzzle-board {
        width: 300px;
        height: 350px;
    }
    
    .puzzle-piece {
        font-size: 14px;
    }
    
    .huarong-container {
        margin: 10px;
        padding: 15px;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .control-btn {
        width: 100%;
        max-width: 200px;
    }
}