* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
            --primary-color: #2c3e50;
            --secondary-color: #2c3e50;
            --accent-color: #e74c3c;
            --light-color: #ecf0f1;
            --dark-color: #34495e;
            --success-color: #27ae60;
            --warning-color: #f39c12;
            --border-radius: 8px;
            --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            --transition: all 0.3s ease;
        }
        
        /* 活动记录样式 */
        .activities-list {
            max-height: 400px;
            overflow-y: auto;
        }
        
        /* 搜索框容器样式调整 */
        .search-box {
            position: relative;
            flex: 1;
            max-width: 400px;
        }

        /* 搜索结果列表样式 */
.search-results {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1001;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    display: none; /* 默认隐藏 */
    color: #333; /* 设置默认字体颜色为深灰色 */
}

.search-results h4 {
    margin: 0;
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
    color: #333; /* 设置标题字体颜色 */
}

.search-results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-results li {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    color: #333; /* 设置列表项字体颜色 */
}

.search-results li:hover {
    background-color: #f5f5f5;
}

.search-results li:last-child {
    border-bottom: none;
}
        
        .activity-item {
            padding: 10px;
            border-bottom: 1px solid #eee;
            font-size: 14px;
        }
        
        .activity-item:last-child {
            border-bottom: none;
        }
        
        .activity-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 5px;
            font-size: 12px;
            color: #666;
        }
        
        .activity-content {
            margin-bottom: 5px;
        }
        
        .activity-action {
            font-weight: bold;
            color: #007bff;
            margin-right: 5px;
        }
        
        .activity-person {
            color: #333;
        }
        
        .activity-details {
            font-size: 12px;
            color: #666;
            margin-top: 3px;
        }
        
        /* 增强触摸友好性 */
        .btn,
        .node circle,
        .modal-content {
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }
        
        /* 调整节点点击区域 */
        .node {
            pointer-events: bounding-box;
        }
        
        body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* 允许页面滚动，确保footer可见 */
    overflow: auto;
}
        
        /* 头部导航 */
header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--box-shadow);
    z-index: 100;
    position: relative;
}

/* 左侧区域 - 包含汉堡菜单和logo */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 汉堡菜单样式 */
.hamburger-icon {
    width: 35px;
    height: 30px;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 6px;
    transition: var(--transition);
    background: transparent;
    border: none;
}

.hamburger-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background: #ffffff !important;
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
    margin: 2px 0;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
}

.hamburger-icon:hover span {
    background: var(--secondary-color);
}

.hamburger-icon.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.hamburger-icon.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-icon.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

/* 菜单遮罩层 - 使用绝对定位避免影响header布局 */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 9999;
    pointer-events: none; /* 默认不响应事件 */
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* 激活时响应事件 */
}
        
        /* 响应式调整 - 手机版 */
        @media (max-width: 768px) {
            body {
                /* 允许页面滚动，确保footer可见 */
                overflow: auto;
                position: relative;
                min-height: 100vh;
            }
            
            header {
                padding: 0.8rem 1rem; /* 减少内边距 */
                position: sticky;
                top: 0;
                left: 0;
                right: 0;
                z-index: 1000;
                /* 确保header不会遮挡内容 */
                min-height: 60px;
            }
            
            .hamburger-menu {
                margin-left: 0; /* 移除负边距 */
                order: -1;
            }
            
            .hamburger-icon {
                width: 35px;
                height: 30px;
                padding: 6px;
                margin-right: 12px;
                /* 增加点击区域 */
                min-width: 35px;
            }
            
            .hamburger-icon span {
                margin: 2px 0; /* 调整横杠间距使其垂直居中 */
                /* 手机版横杠更粗更明显 */
                height: 4px;
                background: #ffffff !important;
                box-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
            }
            
            .logo {
                font-size: 1.2rem;
                margin-right: 8px;
                flex: 1;
                min-width: 0;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
            
            .menu-content {
                width: 280px; /* 手机版菜单宽度 */
                left: -280px;
            }
            
            #login-btn {
                padding: 0.5rem 0.8rem; /* 手机版登录按钮稍小 */
                font-size: 0.85rem;
                min-width: 60px;
                white-space: nowrap;
            }
            
            /* 修复手机版内容区域 */
            .main-content {
                flex-direction: column;
                /* 允许内容滚动，确保footer可见 */
                overflow: auto;
            }
            
            #tree-container {
                /* 与置顶信息栏宽度一致 */
                margin: 0 0.5rem 0 0.5rem;
                /* 自适应高度，避免底部空白 */
                min-height: 300px;
                /* 禁止滚动条 */
                overflow: hidden;
            }
            
            .info-panel {
                width: 100%;
                margin: 0.5rem;
                /* 禁止滚动条 */
                overflow: hidden;
            }
        }
        
        /* 响应式调整 - 电脑版 */
        @media (min-width: 769px) {
            .hamburger-menu {
                order: -1; /* 确保汉堡菜单在最左边 */
                margin-left: 0;
                /* 确保电脑版汉堡菜单可见 */
                opacity: 1 !important;
                visibility: visible !important;
            }
            
            .hamburger-icon {
                background: transparent;
                /* 电脑版横杠更精致 */
                width: 40px;
                height: 35px;
                padding: 8px;
            }
            
            .hamburger-icon span {
                background: #ffffff !important;
                height: 3px;
                /* 电脑版添加发光效果 */
                box-shadow: 0 0 6px rgba(255, 255, 255, 0.5);
                margin: 2px 0; /* 调整横杠间距使其垂直居中 */
            }
            
            header {
                justify-content: flex-start; /* 左对齐 */
                padding: 1rem 2rem;
            }
        }
        
        /* 超小屏幕调整 */
        @media (max-width: 480px) {
            .logo {
                font-size: 1rem; /* 超小屏幕logo更小 */
                max-width: 150px; /* 限制最大宽度 */
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
            }
            
            .hamburger-icon {
                width: 28px;
                height: 23px;
                margin-right: 8px;
            }
            
            header {
                padding: 0.8rem;
            }
            
            .menu-content {
                width: 250px;
                padding: 1rem;
            }
            
            .menu-header h3 {
                font-size: 1.3rem;
            }
            
            .menu-item {
                padding: 0.7rem 0.8rem;
                font-size: 0.85rem;
            }
            
            .menu-footer {
                padding: 15px 0 5px;
            }
        }
        
        /* 确保header内的元素正确排列 */
header {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    z-index: 1000; /* 确保header在最上层 */
    justify-content: space-between; /* 使内容两端对齐 */
}

header > * {
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    flex: 1; /* 让logo占据剩余空间 */
    min-width: 0; /* 允许logo收缩 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logo i {
    color: var(--secondary-color);
}

/* 搜索容器样式 */
.search-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    margin-left: auto; /* 确保搜索框靠右 */
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 0.5rem;
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    font-size: 0.9rem;
    width: 200px;
    max-width: 200px;
}

/* 搜索结果列表样式 */
.search-results {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 1001;
    min-width: 250px; /* 增加最小宽度 */
    max-width: 300px; /* 增加最大宽度 */
    max-height: 400px; /* 增加最大高度 */
    overflow-y: auto;
}

.search-results h4 {
    margin: 0;
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}

.search-results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.search-results li {
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    white-space: nowrap; /* 防止文字换行 */
    overflow: hidden;
    text-overflow: ellipsis; /* 超出部分显示省略号 */
}

.search-results li:hover {
    background-color: #f5f5f5;
}

.search-results li:last-child {
    border-bottom: none;
}

/* 手机版响应式调整 */
@media (max-width: 768px) {
    header {
        padding: 0.8rem 1rem;
        flex-wrap: nowrap;
    }
    
    .logo {
        font-size: 1.2rem;
        margin-right: 8px;
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .search-box input {
        width: 120px;
        max-width: 120px;
        font-size: 1rem; /* 从0.8rem改为1rem，避免iOS自动放大 */
        padding: 0.4rem 0.6rem;
        height: 36px; /* 增加高度以适应更大的字体 */
        box-sizing: border-box;
    }
    
    .search-results {
        min-width: 200px; /* 增加最小宽度 */
        max-width: 250px; /* 增加最大宽度 */
        max-height: 400px; /* 增加最大高度 */
    }
}

/* 超小屏幕调整 */
@media (max-width: 480px) {
    .logo {
        font-size: 1rem;
        max-width: 120px;
    }
    
    .search-box input {
        width: 100px;
        max-width: 100px;
        padding: 0.3rem 0.5rem;
        font-size: 1rem; /* 从0.75rem改为1rem，避免iOS自动放大 */
        height: 32px; /* 增加高度以适应更大的字体 */
        box-sizing: border-box;
    }
    
    .search-results {
        min-width: 150px; /* 增加最小宽度 */
        max-width: 200px; /* 增加最大宽度 */
        max-height: 350px; /* 增加最大高度 */
    }
}
        
        /* 控制面板 */
        .control-panel {
            background: white;
            padding: 1rem 2rem;
            display: flex;
            justify-content: flex-start; /* 改为左对齐 */
            align-items: center;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            flex-wrap: wrap;
            gap: 10px;
            transition: all 0.3s ease;
        }

/* 论坛链接样式 */
.forum-link-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.forum-link-container .btn {
    border-radius: 50px;
    padding: 12px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    box-shadow: var(--box-shadow);
}


        
        .control-panel.hidden {
            display: none;
        }
        
        .btn-group {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }
        
        .btn {
            padding: 0.6rem 1.2rem;
            border: none;
            border-radius: var(--border-radius);
            cursor: pointer;
            font-weight: 600;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .btn-primary {
            background: var(--secondary-color);
            color: white;
        }
        
        .btn-success {
            background: var(--success-color);
            color: white;
        }
        
        .btn-warning {
            background: var(--warning-color);
            color: white;
        }
        
        .btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }
        
        .btn:active {
            transform: translateY(0);
        }
        
        /* 响应式调整 */
        @media (max-width: 768px) {
            .control-panel {
                flex-direction: row;
                align-items: center;
                justify-content: flex-start;
                padding: 0.5rem;
            }
            
            /* 修改按钮组样式 */
            .btn-group {
                justify-content: flex-start;
                flex-wrap: nowrap;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                padding: 5px 0;
                flex: 1;
                min-width: 0; /* 允许收缩 */
            }
            
            .btn {
                flex-shrink: 0;
                margin: 0.25rem 0.5rem 0.25rem 0;
                padding: 0.5rem 0.8rem;
                font-size: 0.85rem;
            }
        }
        
        /* 调整主要内容区域布局 */
        .main-content {
            display: flex;
            flex-direction: column;
            /* 设置适当高度，为footer留出空间 */
            min-height: calc(100vh - 150px);
            /* 允许内容滚动，确保footer可见 */
            overflow: auto;
        }

        /* 隐藏添加根人物按钮 */
        #add-root-btn,
        #add-root-guide-btn {
            display: none !important;
        }
        
        /* 调整树形容器占满整个空间 */
        #tree-container {
            flex: 1;
            position: relative;
            background: white;
            /* 禁止滚动条 */
            overflow: hidden;
            border-radius: var(--border-radius);
            /* 与置顶信息栏宽度一致 */
            margin: 0 1rem 0 1rem;
            box-shadow: var(--box-shadow);
        }
        
        /* 信息面板 - 右侧栏目 */
        .info-panel {
            width: 300px;
            margin: 0 0 0 0;
            padding: 1rem;
            background: white;
            border-radius: var(--border-radius);
            box-shadow: var(--box-shadow);
            /* 禁止滚动条 */
            overflow: hidden;
            max-height: calc(100vh - 200px);
        }
        
        .info-panel h2 {
            color: var(--primary-color);
            margin-bottom: 1rem;
            padding-bottom: 0.5rem;
            border-bottom: 2px solid var(--secondary-color);
        }
        
        .person-info {
            margin-bottom: 1.5rem;
        }
        
        .person-info h3 {
            color: var(--dark-color);
            margin-bottom: 0.5rem;
        }
        
        /* 置顶表单样式 */
        .pin-form {
            background: white;
            border-radius: var(--border-radius);
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            box-shadow: var(--box-shadow);
            border: 1px solid #e0e0e0;
        }
        
        .pin-form h3 {
            color: var(--dark-color);
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .pin-form h3 i {
            color: var(--secondary-color);
        }
        
        .info-item {
            display: flex;
            margin-bottom: 0.5rem;
        }
        
        .info-label {
            font-weight: 600;
            width: 80px;
            color: var(--dark-color);
        }
        
        .info-value {
            flex: 1;
        }
        
        /* 节点样式 - 移除固定半径和描边宽度 */
.node circle {
    transition: var(--transition);
    /* 移除固定的 r 和 stroke-width，让JavaScript控制 */
}

.node circle:hover {
    stroke-width: 4px;
    transform: scale(1.2);
}

.node.selected circle {
    stroke-width: 5px;
}

/* 第一代节点样式 */
.node.generation-1 circle {
    r: 18px !important;
}

/* 第一代节点文本样式 - 字体等比放大 */
.node.generation-1 .name {
    font-size: 20px !important; /* 原16px放大到20px */
}

.node.generation-1 .dates {
    font-size: 18px !important; /* 原14px放大到18px */
}

.node.generation-1 .generation {
    font-size: 16px !important; /* 原12px放大到16px */
}
        
        .node.highlight circle {
            stroke: #e74c3c;
            stroke-width: 5px;
            fill: #fff5f5;
        }
        
        /* 节点文本样式 - 调整字体大小 */
        .node text {
            font: 16px sans-serif; /* 增大基础字体 */
            fill: #333;
        }
        
        .node .name {
            font-weight: bold;
            font-size: 16px; /* 确保姓名字体大小 */
        }
        
        .node .dates {
            font-size: 14px; /* 调整生卒年份字体 */
        }
        
        .node .generation {
            font-size: 12px; /* 代数信息字体更小 */
            font-weight: normal; /* 代数信息不加粗 */
        }
        
        /* 连线样式 */
        .link {
            fill: none;
            stroke-width: 2px;
        }
        
        /* 模态框样式 */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
            justify-content: center;
            align-items: center;
        }
        
        .modal-content {
            background-color: white;
            border-radius: var(--border-radius);
            width: 90%;
            max-width: 500px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
            animation: modalopen 0.4s;
        }
        
        /* 登录模态框样式 */
        #login-modal {
            display: none;
            position: fixed;
            z-index: 1001;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.4);
        }
        
        #login-modal .modal-content {
            background-color: #fff;
            margin: 15% auto;
            padding: 0;
            border: none;
            border-radius: 8px;
            width: 90%;
            max-width: 400px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }
        
        #login-modal .modal-header {
            padding: 20px;
            background-color: #f8f9fa;
            border-bottom: 1px solid #dee2e6;
            border-radius: 8px 8px 0 0;
        }
        
        #login-modal .modal-body {
            padding: 20px;
        }
        
        #login-modal .form-group {
            margin-bottom: 15px;
        }
        
        #login-modal label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
        }
        
        #login-modal input {
            width: 100%;
            padding: 10px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            box-sizing: border-box;
        }
        
        #user-info {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        #user-role {
            font-weight: bold;
        }
        
        @keyframes modalopen {
            from {opacity: 0; transform: translateY(-60px);}
            to {opacity: 1; transform: translateY(0);}
        }
        
        .modal-header {
            padding: 1rem;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .modal-body {
            padding: 1rem;
        }
        
        .modal-footer {
            padding: 1rem;
            border-top: 1px solid #eee;
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }
        
        .modal .close {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: none;
    z-index: 1002; /* 确保在最上层 */
}

.modal .close:hover {
    color: var(--accent-color);
}
        
        .close:hover {
            color: var(--accent-color);
        }
        
        .form-group {
            margin-bottom: 1rem;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
        }
        
        .form-group input,
        .form-group textarea {
            width: 100%;
            padding: 0.5rem;
            border: 1px solid #ddd;
            border-radius: var(--border-radius);
            font-family: inherit;
        }
        
        .form-group textarea {
            min-height: 80px;
            resize: vertical;
        }
        
        /* 工具提示 */
        #tooltip {
            position: absolute;
            text-align: left;
            padding: 8px;
            font: 12px sans-serif;
            background: rgba(0, 0, 0, 0.8);
            color: white;
            border-radius: 4px;
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.3s;
            z-index: 1000;
            max-width: 300px;
            word-wrap: break-word;
        }
        
        #tooltip .title {
            font-weight: bold;
            margin-bottom: 5px;
            font-size: 14px;
        }
        
        #tooltip .info-row {
            margin: 3px 0;
        }
        
        /* 待审核用户列表样式 */
        .pending-users-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 1rem;
        }
        
        .pending-users-table th,
        .pending-users-table td {
            padding: 0.5rem;
            text-align: left;
            border-bottom: 1px solid #ddd;
        }
        
        .pending-users-table th {
            background-color: #f5f5f5;
            font-weight: bold;
        }
        
        .pending-users-table tr:hover {
            background-color: #f9f9f9;
        }
        
        .pending-users-table .btn {
            padding: 0.25rem 0.5rem;
            font-size: 0.875rem;
            margin-right: 0.25rem;
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .main-content {
                flex-direction: column;
            }
            
            .info-panel {
                width: 100%;
                margin: 0 0 0 0;
                /* 移除max-height防止内容溢出 */
            }
            
            #tree-container {
                margin: 0 0 0 0;
            }
            
            /* 修改控制面板样式 */
            .control-panel {
                flex-direction: row;
                align-items: center;
                justify-content: flex-start;
                padding: 0.5rem;
            }
            
            /* 修改按钮组样式 */
            .btn-group {
                justify-content: flex-start;
                flex-wrap: nowrap;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                padding: 5px 0;
                flex: 1;
                min-width: 0; /* 允许收缩 */
            }
            
            .btn {
                flex-shrink: 0;
                margin: 0.25rem 0.5rem 0.25rem 0;
                padding: 0.5rem 0.8rem;
                font-size: 0.85rem;
            }
            
            /* 确保模态框在手机上正确显示 */
            .modal-content {
                width: 95%;
                max-width: none;
                margin: 5% auto;
            }
            
            /* 调整菜单在手机上的宽度 */
            .menu-content {
                width: 280px;
                padding: 1.5rem;
            }
            
            /* 确保菜单项在手机上正确显示 */
            .menu-item {
                padding: 0.8rem 1rem;
                font-size: 0.9rem;
            }
            
            /* 调整菜单底部按钮在手机上的样式 */
            .menu-footer .btn {
                padding: 0.6rem;
                font-size: 0.9rem;
            }
        }
        
        /* 针对小屏幕手机 - 增强版 */
        @media (max-width: 576px) {
            body {
                font-size: 14px; /* 统一基础字体大小 */
                /* 移除手机版底部空白 */
                padding-bottom: 0;
            }
            
            .main-content {
                flex-direction: column;
                padding: 0.5rem 0.5rem 0; /* 移除底部padding */
                gap: 0.5rem; /* 添加间距 */
            }
            
            .info-panel {
                width: 100%;
                margin: 0;
                /* 移除max-height防止内容溢出 */
                padding: 0.8rem;
                border-radius: 12px; /* 圆角更明显 */
                box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            }
            
            #tree-container {
                /* 与置顶信息栏宽度一致 */
                margin: 0 0.5rem 0 0.5rem;
                /* 自适应高度，避免底部空白 */
                min-height: auto;
                border-radius: 12px 12px 0 0; /* 顶部圆角，底部直角 */
                /* 禁止滚动条 */
                overflow: hidden;
                box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            }
            
            .control-panel {
                flex-direction: row;
                align-items: center;
                justify-content: space-between;
                padding: 0.5rem;
                background: rgba(255,255,255,0.95);
                backdrop-filter: blur(10px);
                border-radius: 12px;
                margin-bottom: 0.5rem;
            }
            
            .btn-group {
                justify-content: flex-start;
                flex-wrap: nowrap;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                padding: 5px 0;
                flex: 1;
                min-width: 0;
                scrollbar-width: none; /* 隐藏滚动条 */
            }
            
            .btn-group::-webkit-scrollbar {
                display: none; /* 隐藏Webkit滚动条 */
            }
            
            .btn {
                flex-shrink: 0;
                margin: 0.25rem 0.5rem 0.25rem 0;
                padding: 0.6rem 1rem; /* 增大触摸区域 */
                font-size: 0.85rem;
                border-radius: 8px;
                min-height: 36px; /* 最小高度确保易点击 */
            }
            
            .logo {
                font-size: 1.1rem;
                max-width: 120px;
            }
            
            .node text {
                font-size: 11px;
                font-weight: 500;
            }
            
            .node .name {
                font-size: 11px;
                font-weight: 600;
            }
            
            .node .dates {
                font-size: 9px;
                opacity: 0.8;
            }

            .modal-content {
                width: 95%;
                max-width: none;
                max-height: 85vh; /* 增加可视区域 */
                display: flex;
                flex-direction: column;
                border-radius: 16px;
                margin: 2vh auto;
            }
            
            .modal-body {
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
                flex: 1;
                max-height: calc(85vh - 140px);
                padding: 1rem;
            }
            
            .modal-footer {
                position: sticky;
                bottom: 0;
                background: white;
                z-index: 10;
                box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
                padding: 1rem;
                border-bottom-left-radius: 16px;
                border-bottom-right-radius: 16px;
            }
            
            .form-group input,
            .form-group textarea {
                padding: 0.6rem;
                font-size: 16px;
                border-radius: 8px;
                border: 1px solid #ddd;
            }
            
            .form-group label {
                font-size: 0.9rem;
                margin-bottom: 0.3rem;
                font-weight: 500;
            }
            
            /* 管理员按钮优化 */
            .admin-only .btn {
                padding: 0.5rem 0.8rem;
                font-size: 0.75rem;
            }
            
            /* 头部导航优化 */
            header {
                padding: 0.8rem 1rem;
                min-height: 56px;
            }
            
            .hamburger-icon {
                width: 32px;
                height: 28px;
                margin-right: 10px;
            }
            
            .hamburger-icon span {
                height: 3px;
                margin: 3px 0;
            }
            
            #login-btn {
                padding: 0.5rem 0.8rem;
                font-size: 0.8rem;
                min-width: 50px;
            }
            
            /* 搜索框优化 */
            .search-box input {
                padding: 0.5rem 0.8rem;
                font-size: 0.85rem;
                min-width: 120px;
            }
            
            /* 菜单优化 */
            .menu-content {
                width: 85vw;
                max-width: 300px;
            }
            
            .menu-item {
                padding: 0.9rem 1rem;
                font-size: 0.9rem;
                margin-bottom: 0.5rem;
                border-radius: 8px;
            }
            
            /* 确保所有可点击元素都有足够的大小 */
            button, .btn, [role="button"] {
                min-height: 44px; /* iOS推荐的最小触摸目标尺寸 */
                min-width: 44px;
            }
        }
        
        /* 针对横向手机/小平板 */
        @media (max-width: 812px) and (orientation: landscape) {
            .info-panel {
                /* 移除max-height防止内容溢出 */
            }
            
            #tree-container {
                min-height: 300px;
            }
            
            /* 横向模式下的搜索结果样式 - 再减小1号 */
            .search-results {
                max-height: 160px; /* 高度限制从180px减小到160px */
            }
            
            .result-text {
                font-size: 10px; /* 从11px减小到10px */
            }
            
            .search-result-item {
                padding: 4px 6px; /* 从5px 8px减小到4px 6px */
            }
        }
        
        /* 添加触摸友好的滚动行为 */
        html {
            -webkit-overflow-scrolling: touch;
        }
        
        /* 修复可能的内容溢出 - 保持隐藏滚动条 */
        #tree-container, .info-panel {
            overflow: hidden;
            -webkit-overflow-scrolling: touch;
        }
        
        /* 置顶信息栏样式 - 与画布协调 */
        .pinned-info-bar {
            background: white;
            border-radius: var(--border-radius);
            margin: 1rem 1rem 0.5rem 1rem;
            padding: 12px 20px;
            box-shadow: var(--box-shadow);
            border: 1px solid #e9ecef;
        }

        .pinned-info-content h4 {
            display: none; /* 隐藏"置顶信息"标题和图标 */
        }

        .pinned-persons-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .pinned-item {
            background: #f8f9fa;
            border: 1px solid #e9ecef;
            border-radius: 6px;
            padding: 8px 12px;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s ease;
            color: #495057;
        }

        .pinned-item .person-name {
            font-size: 15px; /* 大2号字体 */
            font-weight: bold;
        }

        .pinned-item:hover {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* 置顶人物选中状态 - 使用主题色 #2c3e50 */
.pinned-item.selected {
    background: #2c3e50;
    border-color: #2c3e50;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 12px rgba(44, 62, 80, 0.4);
    transform: translateY(-2px);
}
        
        /* 响应式调整 */
        @media (max-width: 768px) {
            .pinned-info-bar {
                margin: 0.5rem 0.5rem 0 0.5rem;
                padding: 8px 12px;
            }
            
            .pinned-persons-list {
                gap: 6px;
            }
            
            .pinned-item {
                padding: 6px 10px;
                font-size: 12px;
            }
            
            /* 修复移动端空白问题 */
            #info-panel {
                margin-bottom: 0;
            }
            
            .pinned-info-bar:empty {
                display: none;
            }
        }

        /* 确保所有滚动区域都支持平滑滚动 */
        #tree-container,
        .info-panel,
        .main-content,
        .activities-list,
        .search-results,
        #pinned-persons-list {
            -webkit-overflow-scrolling: touch;
            scroll-behavior: smooth;
        }
        
        /* 修复可能的内容溢出 */
        html, body {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            /* 禁止全局滚动条 */
            overflow: hidden;
        }
        
        /* 增强横杠在深色背景下的可见性 */
        header {
            background: var(--primary-color) !important;
        }
        
        .hamburger-icon span {
            /* 强制白色，确保在任何header背景下都可见 */
            background: #ffffff !important;
            /* 添加发光效果增强可见性 */
            filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.8));
        }
        


        /* 搜索结果显示 */
        #pin-person-results {
            position: absolute;
            background: white;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            max-height: 200px;
            overflow-y: auto;
            width: calc(100% - 2px);
            z-index: 1000;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        #pin-person-results-list {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        #pin-person-results-list li {
            padding: 10px 15px;
            cursor: pointer;
            border-bottom: 1px solid #f1f3f4;
        }

        #pin-person-results-list li:hover {
            background: var(--purple-color);
            color: white;
        }

        #pin-person-results-list li:last-child {
            border-bottom: none;
        }

        /* 探讨交流模态框样式 */
        .discussion-content {
            margin-bottom: 20px;
        }
        
        .discussion-content p {
            margin-bottom: 10px;
            line-height: 1.6;
        }
        
        .discussion-topics {
            margin-left: 20px;
            margin-top: 10px;
        }
        
        .discussion-topics li {
    margin-bottom: 5px;
}
        
        
        
        /* 手机响应式样式 - 探讨交流模态框 */
        @media (max-width: 768px) {
            /* 探讨交流模态框手机优化 */
            #discussion-modal .modal-content {
                width: 95% !important;
                max-width: none !important;
                margin: 5% auto !important;
                max-height: 90vh !important;
                border-radius: 16px !important;
            }
            
            #discussion-modal .modal-body {
                max-height: calc(90vh - 120px) !important;
                overflow-y: auto !important;
                -webkit-overflow-scrolling: touch !important;
                padding: 15px !important;
            }
            
            #discussion-modal .modal-header h3 {
                font-size: 1.5rem !important;
                text-align: center !important;
            }
            
            /* 探讨交流内容手机优化 */
            .discussion-content {
                padding: 20px 15px !important;
                margin-bottom: 15px !important;
            }
            
            .discussion-content p {
                font-size: 1rem !important;
                text-align: center !important;
            }
            
            .discussion-topics li {
                padding: 12px 15px !important;
                font-size: 0.95rem !important;
                margin: 8px 0 !important;
            }
            
            /* 图片展示手机优化 */
            .discussion-image-container {
                padding: 20px 15px !important;
                margin-top: 20px !important;
            }
            
            .discussion-image-container h4 {
                font-size: 1.2rem !important;
                margin-bottom: 15px !important;
            }
            
            .square-image {
                width: 200px !important;
                height: 200px !important;
            }
            
            .image-caption {
                font-size: 0.9rem !important;
                margin-top: 5px !important;
            }
            

        }
        
        /* 超小屏幕手机优化 */
        @media (max-width: 480px) {
            .square-image {
                width: 180px !important;
                height: 180px !important;
            }
            
            .discussion-content {
                padding: 15px 12px !important;
            }
            
            .discussion-topics li {
                padding: 10px 12px !important;
                font-size: 0.9rem !important;
            }
            
            .discussion-image-container {
                padding: 15px 12px !important;
            }
        }
        
        /* 探讨交流模态框动画效果 */
        #discussion-modal {
            animation: modalSlideIn 0.4s ease-out;
        }
        
        @keyframes modalSlideIn {
            from {
                opacity: 0;
                transform: translateY(-50px) scale(0.95);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }
        
        /* 关闭按钮样式增强 */
        #discussion-modal .close {
            background: rgba(255, 255, 255, 0.2) !important;
            border-radius: 50% !important;
            width: 40px !important;
            height: 40px !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            transition: all 0.3s ease !important;
            border: 1px solid rgba(255, 255, 255, 0.3) !important;
        }
        
        #discussion-modal .close:hover {
            background: rgba(255, 255, 255, 0.3) !important;
            transform: rotate(90deg) !important;
        }
        
        /* 探讨交流图片样式 - 高大上设计 */
        .discussion-image-container {
    text-align: center;
    margin-top: -5px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 12px;
    padding: 15px 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
        
        /* 探讨交流内容样式 - 高大上设计 */
        .discussion-content {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%);
            border-radius: 12px;
            padding: 25px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            margin-bottom: 20px;
        }
        
        .discussion-content p {
            color: #2c3e50;
            font-size: 1.1rem;
            line-height: 1.6;
            margin-bottom: 15px;
        }
        
        .discussion-topics {
            list-style: none;
            padding: 0;
            margin-top: 20px;
        }
        
        .discussion-topics li {
            background: rgba(255, 255, 255, 0.8);
            margin: 10px 0;
            padding: 15px 20px;
            border-radius: 8px;
            border-left: 4px solid var(--secondary-color);
            font-weight: 500;
            color: #2c3e50;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }
        
        .discussion-topics li:hover {
            transform: translateX(5px);
            background: rgba(255, 255, 255, 0.95);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }
        
        
        
        .discussion-image-container h4 {
            color: #2c3e50;
            font-size: 1.4rem;
            margin-bottom: 20px;
            font-weight: 600;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }
        
        .discussion-image {
            max-width: 100%;
            height: auto;
            border-radius: 12px;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
            transition: all 0.3s ease;
        }
        
        .discussion-image:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
        }
        
        .image-caption {
            margin-top: 15px;
            color: #5a6c7d;
            font-style: italic;
            font-size: 1rem;
            font-weight: 500;
        }
        
        /* 正方形图片样式 */
        .image-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            justify-content: center;
            margin-top: 15px;
        }
        
        .image-item {
            text-align: center;
            cursor: pointer;
            transition: transform 0.2s ease;
        }
        
        .image-item:hover {
            transform: scale(1.05);
        }
        
        .square-image {
            width: 250px;
            height: 250px;
            object-fit: cover;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            transition: box-shadow 0.3s ease;
        }
        
        .square-image:hover {
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
        }
        
        /* 图片预览样式 */
        .image-preview-content {
            max-width: 90vw;
            max-height: 90vh;
        }
        
        .preview-image {
            max-width: 100%;
            max-height: 70vh;
            object-fit: contain;
            border-radius: 8px;
            margin-bottom: 15px;
        }
        
        .preview-caption {
            text-align: center;
            color: #666;
            font-style: italic;
            margin-top: 10px;
        }
        
        /* 加载动画 */
        .loading {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
        }
        
        .spinner {
            border: 4px solid rgba(0, 0, 0, 0.1);
            border-left-color: var(--secondary-color);
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        /* 空状态 */
        .empty-state {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            color: #ddd;
        }
        
        .empty-state h3 {
            margin-bottom: 1rem;
            color: var(--dark-color);
        }
        
        /* 添加移动端模态框优化样式 */
        .modal.mobile-optimized .modal-content {
            width: 95%;
            max-width: none;
            margin: 5% auto;
            max-height: 90vh;
        }
        
        .modal.mobile-optimized .modal-body {
            max-height: calc(90vh - 120px);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }
/* 调整汉堡菜单图标垂直居中 */
.hamburger-icon {
    width: 35px;
    height: 30px;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center; /* 改为center实现垂直居中 */
    align-items: center; /* 水平居中 */
    padding: 6px;
    transition: var(--transition);
    margin-right: 8px; /* 减少与logo的间距 */
    background: transparent;
    border: none;
}

.hamburger-icon span {
    display: block;
    height: 3px;
    width: 100%;
    background: #ffffff !important;
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
    margin: 2px 0; /* 调整横杠间距，更紧凑 */
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 调整logo位置，更靠近横杠 */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: auto;
    flex-shrink: 0;
    margin-left: 0; /* 移除左边距，更靠近横杠 */
}

/* 手机版特定调整 */
@media (max-width: 768px) {
    header {
        padding: 0.8rem 1rem;
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        min-height: 60px;
        /* 确保header内容紧凑排列 */
        justify-content: flex-start;
        gap: 0.5rem; /* 减少元素间距 */
    }
    
    .hamburger-menu {
        margin-left: 0;
        order: -1;
        /* 确保汉堡菜单靠左 */
        flex-shrink: 0;
    }
    
    .hamburger-icon {
        width: 32px;
        height: 28px;
        padding: 5px;
        margin-right: 5px; /* 进一步减少与logo的间距 */
        min-width: 32px;
        /* 垂直居中优化 */
        justify-content: center;
        align-items: center;
    }
    
    .hamburger-icon span {
        margin: 2px 0; /* 手机版横杠间距更紧凑 */
        height: 3px;
        background: #ffffff !important;
        box-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
    }
    
    .logo {
        font-size: 1.1rem;
        margin-right: 5px; /* 减少右边距 */
        margin-left: 0; /* 移除左边距 */
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        /* 确保文字靠近横杠 */
        padding-left: 0;
    }
    
    /* 超小屏幕进一步优化 */
    @media (max-width: 480px) {
        header {
            padding: 0.7rem 0.8rem;
            gap: 0.3rem; /* 更小的间距 */
        }
        
        .hamburger-icon {
            width: 30px;
            height: 26px;
            margin-right: 3px;
        }
        
        .logo {
            font-size: 1rem;
            margin-right: 3px;
            max-width: 140px; /* 限制最大宽度 */
        }
        
        #login-btn {
            padding: 0.4rem 0.6rem;
            font-size: 0.8rem;
            min-width: 50px;
        }
    }
}

/* 电脑版也进行相应调整 */
@media (min-width: 769px) {
    .hamburger-icon {
        width: 38px;
        height: 33px;
        padding: 7px;
        margin-right: 10px;
        justify-content: center;
        align-items: center;
    }
    
    .hamburger-icon span {
        margin: 2px 0;
    }
    
    .logo {
        margin-left: 0;
    }
    
    header {
        justify-content: flex-start;
        padding: 1rem 2rem;
        gap: 0.8rem;
    }
}

/* 确保所有设备上横杠都垂直居中 */
.hamburger-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 调整动画位置以适应新的居中布局 */
.hamburger-icon.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg); /* 调整动画位置 */
}

.hamburger-icon.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg); /* 调整动画位置 */
}

.menu-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(5px);
            opacity: 0;
            visibility: hidden;
            transition: all 0.4s ease;
            z-index: 9999; /* 提高菜单遮罩层级 */
        }

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 确保菜单内容可以滚动以适应底部内容 */
.menu-content {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-color) 100%);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    transition: left 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.menu-overlay.active .menu-content {
    left: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.menu-header h3 {
    color: white;
    font-size: 1.5rem;
    margin: 0;
}

.menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.menu-close:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
    border-color: var(--secondary-color);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.menu-item i {
    margin-right: 1rem;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.menu-item:active {
    transform: translateX(5px);
}

/* 菜单动画效果 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.menu-item {
    animation: slideIn 0.3s ease forwards;
}

.menu-item:nth-child(1) { animation-delay: 0.1s; }
.menu-item:nth-child(2) { animation-delay: 0.2s; }
.menu-item:nth-child(3) { animation-delay: 0.3s; }

/* 菜单底部区域样式 */
.menu-footer {
    margin-top: auto;
    padding: 20px 0 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px; /* 添加底部距离 */
}

.menu-footer #menu-user-info {
    color: white;
    margin-bottom: 15px;
    text-align: center;
    font-size: 0.9rem;
}

.menu-footer #menu-user-info #menu-username {
    font-weight: bold;
}

.menu-footer #menu-login-btn,
.menu-footer #menu-logout-btn {
    width: 100%;
    margin-bottom: 10px;
    padding: 12px;
    font-size: 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: none; /* 默认隐藏 */
}

.menu-footer #menu-login-btn {
    display: block; /* 默认显示登录按钮 */
}

.menu-footer #menu-logout-btn {
    background: #e74c3c !important;
}

.menu-footer #menu-logout-btn:hover {
    background: #c0392b !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .menu-content {
        width: 280px;
        padding: 1rem;
        max-height: 100vh;
        height: 100vh;
    }
    
    .menu-items {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .menu-footer {
        padding: 1rem 0 0.5rem;
    }
    
    .menu-footer #menu-login-btn,
    .menu-footer #menu-logout-btn {
        padding: 12px;
        font-size: 1rem;
    }
}

/* 置顶人物响应式样式 */
@media (min-width: 769px) {
    .desktop-view {
        display: block !important;
    }
    .mobile-view {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .desktop-view {
        display: none !important;
    }
    .mobile-view {
        display: block !important;
    }
}

/* 置顶人物项样式 */
.pinned-person-item:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* 验证码输入区域样式 */
.sms-code-input {
    display: flex;
    gap: 10px;
    align-items: center;
}

.sms-code-input input {
    flex: 1;
    min-width: 0;
}

.sms-code-input .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

#sms-code-group {
    transition: all 0.3s ease;
}

#send-sms-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .sms-code-input {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sms-code-input input,
    .sms-code-input .btn {
        width: 100%;
    }
    
    .sms-code-input .btn {
        margin-top: 10px;
        padding: 12px;
    }
}

/* 底部信息栏样式优化 */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    text-align: center;
    padding: 1rem 2rem;
    margin-top: auto;
    font-size: 0.9rem;
    border-top: 3px solid #e74c3c;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    min-height: 50px; /* 确保最小高度 */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 100; /* 确保footer在最上层显示 */
}

footer p {
    margin: 0;
    opacity: 0.9;
    font-weight: 300;
    line-height: 1.4;
}

@media (max-width: 768px) {
    footer {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        line-height: 1.2;
        min-height: 40px; /* 移动端最小高度 */
        /* 确保footer紧贴底部 */
        position: relative;
        z-index: 10;
    }
}
/* 可编辑的角色样式 */
.editable-role {
    color: #3498db;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid transparent;
}

.editable-role:hover {
    color: #2980b9;
    background: rgba(52, 152, 219, 0.2);
    border-color: #3498db;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

/* 修改用户名模态框的响应式样式 */
@media (max-width: 768px) {
    #edit-username-modal .modal-content {
        width: 90% !important;
        margin: 10% auto !important;
        max-width: 400px;
    }
    
    #edit-username-modal .form-group {
        margin-bottom: 15px;
    }
    
    #edit-username-modal input {
        width: 100%;
        padding: 10px;
        font-size: 16px;
        box-sizing: border-box;
    }
    
    #edit-username-modal .modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    #edit-username-modal .modal-footer button {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }
}