﻿/* 全局变量 */
:root {
    --primary-color: #4e8cbb;
    --primary-dark: #3a7cb2;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg-color: #f5f5f5;
    --border-color: #e6d8b6;
    --hover-color: #b89b5b;
    --section-bg: #f9f6ec;
    --card-shadow: 0 2px 12px rgba(180,160,100,0.10);
    --gradient-bg: linear-gradient(135deg, #f9f6ec 0%, #f3e9d7 100%);
    --game-gradient: linear-gradient(135deg, #f3e9d7 0%, #e9d8b4 100%);
}

.chengyu-content {
    background: var(--section-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

/* 内容包装器样式 */
.content-wrapper {
    display: flex;
    gap: 6px;
    margin-bottom: 5px;
}

/* 左侧主要内容区样式 */
.main-content {
    flex: 1;
    min-width: 0;
    background: var(--gradient-bg);
    padding: 40px;
    border-radius: 20px 0 0 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    border-right: none;
    background:#fff;
}

/* 右侧互动区样式 */
.interactive-content {
    width: 380px;
    flex-shrink: 0;
    background: var(--gradient-bg);
    padding: 5px;
    border-radius: 0 20px 20px 0;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    border-left: none;
}



        .interactive-content > div:last-child {
            margin-bottom: 0;
        }

.chengyu-title {
    font-size: 48px;
    font-family: 'Microsoft YaHei', '微软雅黑', 'SimHei', '黑体', serif;
    font-weight: bold;
    letter-spacing: 8px;
    background: linear-gradient(135deg, #8B4513 0%, #D2691E 50%, #CD853F 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 2px 2px 4px rgba(139, 69, 19, 0.3);
    padding: 20px 0;
    position: relative;
    text-align: center;
}

    .chengyu-title:before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 80%;
        height: 2px;
        background: linear-gradient(90deg, transparent, #D2691E, transparent);
    }

    .chengyu-title:after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 80%;
        height: 2px;
        background: linear-gradient(90deg, transparent, #D2691E, transparent);
    }

.chengyu-pinyin {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 35px;
    font-size: 18px;
    letter-spacing: 2px;
    font-weight: 500;
}

/* 成语信息区域 - 卡片式布局 */
.chengyu-info {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 5px;
    box-shadow: none;
    border: none;
    backdrop-filter: none;
}

.info-item {
    background: rgba(255, 255, 255, 0.95);
    margin-bottom: 12px;
    line-height: 1.8;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: flex-start;
    box-shadow: 0 2px 8px rgba(180,160,100,0.08);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

    .info-item:hover {
        box-shadow: 0 4px 15px rgba(180,160,100,0.15);
        transform: translateY(-2px);
    }

    .info-item:last-child {
        margin-bottom: 0;
    }

.info-label {
    color: #5a4321;
    font-weight: bold;
    margin-right: 20px;
    display: inline-block;
    min-width: 100px;
    font-size: 16px;
    position: relative;
    padding-left: 15px;
}

    .info-label:before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 6px;
        height: 6px;
        background: var(--hover-color);
        border-radius: 50%;
    }

.info-content {
    color: #6d5b3b;
    line-height: 1.8;
    flex: 1;
    font-size: 16px;
    text-align: justify;
}

/* 底部成语接龙样式 */
.chengyu-jielong {
    background: #fff;
    padding: 10px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    margin-top: 5px;
}

    .chengyu-jielong h3 {
        color: #5a4321;
        font-size: 24px;
        margin-bottom: 25px;
        padding-bottom: 15px;
        border-bottom: 2px solid var(--hover-color);
        text-align: center;
        position: relative;
    }

        .chengyu-jielong h3:after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 2px;
            background: var(--hover-color);
        }

.jielong-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
}

    .jielong-list li {
 
        padding: 5px 10px;
        border-radius: 30px;
        color: #6d5b3b;
        transition: all 0.3s ease;
        border: 1px solid var(--border-color);
        font-size: 16px;
        font-weight: 500;
        box-shadow: 0 2px 8px rgba(180,160,100,0.1);
        background:#fff;
    }

        .jielong-list li:hover {
            background: linear-gradient(135deg, #e9d8b4 0%, #d5b788 100%);
            cursor: pointer;
            transform: translateY(-3px);
            box-shadow: 0 6px 15px rgba(180,160,100,0.2);
        }

/* 游戏区域标题通用样式 */
.chengyu-game h3,
.chengyu-riddle h3,
.chengyu-story h3 {
    color: #5a4321;
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--hover-color);
    text-align: center;
    position: relative;
    font-weight: 600;
}

    .chengyu-game h3:after,
    .chengyu-riddle h3:after,
    .chengyu-story h3:after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 2px;
        background: var(--hover-color);
    }

/* 游戏区域样式 */
.chengyu-game {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(180,160,100,0.08);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.game-area {
    text-align: center;
}

.current-word {
    font-size: 18px;
    color: #5a4321;
    margin-bottom: 20px;
    font-weight: bold;
}

    .current-word span {
        color: var(--hover-color);
        padding: 5px 15px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(180,160,100,0.1);
    }

.input-area {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

    .input-area input {
        width: 100%;
        max-width: 280px;
        padding: 8px 15px;
        border: 2px solid var(--border-color);
        border-radius: 30px;
        font-size: 14px;
        color: #5a4321;
        background: #fff;
        transition: all 0.3s ease;
    }

        .input-area input:focus {
            outline: none;
            border-color: var(--hover-color);
            box-shadow: 0 0 0 3px rgba(184,155,91,0.1);
        }

    .input-area button {
        padding: 8px 20px;
        border: none;
        border-radius: 30px;
        background: var(--hover-color);
        color: #fff;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
        white-space: nowrap;
    }

        .input-area button:hover {
            background: #a88a4a;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(180,160,100,0.2);
        }

.game-tips {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.6;
}

/* 成语猜谜样式 */
.chengyu-riddle {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(180,160,100,0.08);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.riddle-content {
    text-align: center;
    padding: 0 10px;
}

.riddle-text {
    font-size: 14px;
    color: #5a4321;
    margin-bottom: 20px;
    line-height: 1.6;
}

.answer-area {
    display: flex;
    gap: 15px;
    justify-content: center;
}

    .answer-area input {
        width: 100%;
        max-width: 250px;
        padding: 8px 15px;
        border: 2px solid var(--border-color);
        border-radius: 30px;
        font-size: 14px;
        color: #5a4321;
        background: #fff;
    }

    .answer-area button {
        padding: 8px 20px;
        border: none;
        border-radius: 30px;
        background: var(--hover-color);
        color: #fff;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.3s ease;
        white-space: nowrap;
    }

        .answer-area button:hover {
            background: #a88a4a;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(180,160,100,0.2);
        }

/* 成语故事样式 */
.chengyu-story {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(180,160,100,0.08);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.story-content {
    text-align: center;
    padding: 0 10px;
}

.story-text {
    font-size: 14px;
    color: #6d5b3b;
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: justify;
}

.story-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

    .story-actions button {
        padding: 6px 15px;
        border: 1px solid var(--border-color);
        border-radius: 25px;
        background: #fff;
        color: #5a4321;
        font-size: 13px;
        cursor: pointer;
        transition: all 0.3s ease;
        white-space: nowrap;
    }

        .story-actions button:hover {
            background: var(--game-gradient);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(180,160,100,0.15);
        }

/* 响应式布局更新 */
@media screen and (max-width: 1200px) {
    .content-wrapper {
        flex-direction: column;
        gap: 6px;
    }

    .main-content {
        border-radius: 20px 20px 0 0;
        border-right: 1px solid var(--border-color);
        border-bottom: none;
    }

    .interactive-content {
        width: 100%;
        border-radius: 0 0 20px 20px;
        border-left: 1px solid var(--border-color);
        border-top: none;
    }

        .interactive-content > div {
            margin-bottom: 5px;
        }
}

@media screen and (max-width: 768px) {


    .content-wrapper {
        gap: 6px;
    }

    .main-content,
    .interactive-content,
    .chengyu-jielong {
        padding: 1px;
    }

    .chengyu-title {
        font-size: 32px;
        padding: 15px 0;
    }

    .chengyu-info {
        padding: 0;
    }

    .info-item {
        margin-bottom: 5px;
        padding: 12px 15px;
        border-radius: 10px;
    }

    .info-label {
        min-width: 70px;
        font-size: 14px;
        margin-right: 15px;
    }

    .info-content {
        font-size: 14px;
        line-height: 1.6;
    }

    .jielong-list li {
        padding: 10px 20px;
        font-size: 15px;
    }

    .input-area {
        flex-direction: column;
        align-items: center;
    }

        .input-area input {
            width: 100%;
            max-width: 300px;
        }

    .answer-area {
        flex-direction: column;
        align-items: center;
    }

        .answer-area input {
            width: 100%;
            max-width: 250px;
        }

    .story-actions {
        flex-direction: column;
        align-items: center;
    }

        .story-actions button {
            width: 100%;
            max-width: 200px;
        }

    .chengyu-game h3,
    .chengyu-riddle h3,
    .chengyu-story h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .current-word {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .input-area,
    .answer-area {
        gap: 10px;
    }

        .input-area input,
        .answer-area input {
            padding: 6px 12px;
            font-size: 13px;
        }

        .input-area button,
        .answer-area button {
            padding: 6px 15px;
            font-size: 13px;
        }

    .game-tips,
    .riddle-text,
    .story-text {
        font-size: 13px;
        line-height: 1.5;
    }

    .story-actions button {
        padding: 5px 12px;
        font-size: 12px;
    }
}

.read-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    transition: background-color 0.3s;
}

    .read-btn:hover {
        background-color: #45a049;
    }

    .read-btn:active {
        background-color: #3d8b40;
    }

/* 米字格容器样式 */
.mizige-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    margin: 5px 0;
    box-shadow: 0 4px 20px rgba(180,160,100,0.12);
    border: 2px solid var(--border-color);
    text-align: center;
    backdrop-filter: blur(10px);
}

/* 米字格标题 - 简洁样式，供JS插件处理 */
.mizige-title {
    font-size: 24px;
    font-family: 'Microsoft YaHei', '微软雅黑', 'SimHei', '黑体', serif;
    color: #333;
    margin: 0;
    padding: 10px 0;
    line-height: 1.5;
    /* 保持简洁，让pinyin.js插件来处理显示效果 */
}

/* 移动端响应式 */
@media screen and (max-width: 768px) {

    
    .mizige-title {
        font-size: 25px;
        padding: 8px 0;
    }
}