﻿
:root
{
    --outer-bg: #f5e6CC;
    --outer-card: #E6D5B8;
    --outer-text: #8B5A2B;
    --outer-line: #C18C5D;
   
    --paper-bg: #dddddd;
    --paper-text: #333333;
    --font-read: "KaiTi", sans-serif;
    --font-size-read: 16px;
}

body, .sidebar-card, .content-card, .top-bar, .bottom-bar, .control-panel
{
    transition: background-color 1s ease, color 1s, border-color 1s, font-size 1s;
}


body
{
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: var(--outer-bg);
    color: var(--outer-text);
    /*font-size: 16px;*/
}

.control-panel
{
    display: flex;
    flex-direction: column; 
    gap: 15px;
    position: fixed;
    bottom: 20px;
    right: 10px;
    z-index: 2000;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 15px 10px 15px 5px;
    border-radius: 10px;
    backdrop-filter: blur(5px);  
    box-shadow: 0px 5px 10px rgba(0,0,0,0.8); 
    border-bottom: 0.5px solid var(--outer-line); 
}

.control-group
{
    display: flex;
    gap: 8px;
    align-items: center;
}

.control-label
{
    font-size: 12px;
    color: #ffffff;
    width: 40px;
    text-align: right;
    margin-right: 5px;
}

.color-btn
{
    width: 20px;
    height: 20px;
    border: 1px solid #999;
    cursor: pointer;
    padding: 0;
    border-radius: 4px; 
}

    .color-btn.dark
    {
        border: 1px solid #fff; 
    }

.font-btn
{
    background: #f0f0f0;
    border: 1px solid #ccc;
    cursor: pointer;
    padding: 2px 8px;
    font-size: 12px;
    color: #333;
    border-radius: 3px;
    transition: 0.2s;
}

    .font-btn:hover
    {
        background: #fff;
        transform: scale(1.05); 
    }

p, div, li, h1, h2, h3, h4, h5, h6
{
    overflow-wrap: break-word; 
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal; 
}

h1
{
    font-size: 26px !important;
    margin: 5px 0 10px 0 !important;
}

h2
{
    font-size: 24px !important;
    margin: 5px 0 10px 0 !important;
}

h3
{
    font-size: 14px !important;
    margin: 5px 0 10px 0 !important;
}

img
{
    max-width: 100% !important; 
    height: auto;
}

/* =========================================
   📱 手机端适配 (精简理顺版 - 宽度缩减优化)
   ========================================= */
@media screen and (max-width: 768px)
{
    /* 1. 基础重置 */
    body
    {
        padding-top: 50px !important; /* 稍微留出一点点空隙，紧贴顶栏 */
        padding-bottom: 20px !important;
        background-color: var(--outer-bg);
        overflow-x: hidden;
    }

    /* 2. 顶部条：隐藏通知栏，简化标题栏 */
    .notification-bar
    {
        display: none !important;
    }

    .title-bar
    {
        width: 100% !important; /* 宽度砍掉10% */
        height: 50px !important; /* 高度微调更精致 */
        left: 50% !important; /* 配合 transform 居中 */
        transform: translateX(-50%) !important;
        font-size: 18px !important;
        border-radius: 0 0 0 0 !important;
        box-shadow: 0px 5px 10px rgba(0,0,0,0.8) !important;
    }

    /* 3. 布局容器：宽度缩减并居中 */
    .content-row
    {
        width: 90% !important; /* 宽度砍掉10% */
        margin: 0 auto !important; /* 居中 */
        flex-direction: column !important;
        padding: 15px 0 !important; /* 左右不需要 padding，靠宽度控制 */
        gap:30px !important;
    }

    /* 4. 顺序调整：中间内容（书架）排在最前面 */
    .middle-column-wrapper
    {
        order: 1;
        width: 100% !important;
        height: auto !important; /* 覆盖 HTML 中的 1350px */
    }

    .nav-column
    {
        max-height: 480px !important;
        border-radius: 12px 12px 0 0 !important;
        background-color: rgba(0,0,0,0.03);
    }

    .pocket-card
    {
        height: 240px !important; /* 压缩藏宝袋高度 */
        min-height: 120px !important;
        border-radius: 0 0 12px 12px !important;
    }

    /* 5. 顺序调整：左侧介绍排在后面 */
    .left-column-wrapper
    {
        order: 2;
        width: 100% !important;
    }

    .intro-column
    {
        padding: 20px !important;
        margin-bottom: 10px;
        border-radius: 12px !important;
    }

        /* 修正头像容器大小 */
        .intro-column div[style*="width: 240px"]
        {
            width: 150px !important;
            height: 150px !important;
        }

        /* 压缩头像下方的文字间距 */
        .intro-column div[style*="margin-top: 60px"]
        {
            margin-top: 20px !important;
            margin-bottom: 10px !important;
        }

    /* 6. 页脚适配 */
    .footer-bar
    {
        width: 90% !important; /* 宽度砍掉10% */
        height: auto !important;
        flex-direction: column !important;
        padding: 10px 8px !important;
        margin:5px auto 20px auto !important;
    }

    .footer-logo
    {
        margin-bottom: 5px;
        width: 40px !important;
        height: 40px !important;
    }

    /* 7. 字体与间距微调 */
    p, span, a
    {
        font-size: 13px !important;
        line-height: 1.2 !important;
    }

    .jump-link
    {
        margin: 0 auto 2px auto !important; /* 极度压缩跳转链接空间 */
        padding: 2px !important;
        display: block;
        width: fit-content;
    }

    /* 针对书块图片的优化 */
    .book-block img
    {
        border-radius: 4px;
    }
}