/* 字体引入 - 全局唯一定义 */
@font-face {
    font-family: "Atamekentom";
    src: url("../font/Atamekentom.eot"); /* IE9 */
    src: url("../font/Atamekentom.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
         url("../font/Atamekentom.woff") format("woff"), /* chrome、firefox */
         url("../font/Atamekentom.ttf") format("truetype"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+ */
         url("../font/Atamekentom.svg#uxfonteditor") format("svg"); /* iOS 4.1- */
}

/* 全局样式 - 合并重复的基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Atamekentom', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #2d3436;
    line-height: 1.6;
    overflow-x: hidden; /* 禁止横向滚动 */
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

/* 顶部导航栏 - 合并所有页面的导航样式，统一结构 */
.top-nav {
    background-color: #2980b9;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.top-nav .nav-content {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 15px;
}

.top-nav .page-title {
    font-size: 12px; /* 统一较小字号，适配多页面 */
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 菜单路径（RTL适配）- 保留横向菜单页面的路径功能 */
.menu-path {
    font-size: 12px;
    color: #000000;
    flex: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
}

.path-separator {
    color: rgba(255, 255, 255, 0.7);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.path-item {
    cursor: pointer;
    transition: all 0.2s;
    padding: 2px 4px;
    border-radius: 4px;
}

.path-item:hover {
    color: #ff0000;
    font-size: 13px;
    background-color: rgba(255, 255, 255, 0.1);
}

.path-root {
    cursor: pointer;
    text-decoration: underline;
    font-weight: 500;
}

.path-root:hover {
    color: #000000;
}

/* 顶部功能图标 - 合并所有图标样式，统一交互 */
.top-nav .icon-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.func-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    background-color: #3498db;
    color: white;
}

.func-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    filter: brightness(1.05);
}

.func-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 管理员入口图标 */
.admin-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: #27ae60;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(39, 174, 96, 0.15);
    flex-shrink: 0;
    position: relative; /* 为伪元素定位 */
}

.admin-link::after {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(270deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: all 0.5s;
}

.admin-link:hover {
    background-color: #219653;
}

.admin-link:hover::after {
    right: 100%;
}

/* 留言图标 */
.message-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: #3498db;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    flex-shrink: 0;
}

.message-link:hover,
.admin-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.message-link:active,
.admin-link:active {
    transform: translateY(0);
}

.message-icon,
.admin-icon {
    width: 24px;
    height: 24px;
}

/* 垂直菜单样式 - 保留多级折叠菜单功能 */
.menu-container.vertical-menu {
    background-color: white;
    margin: 15px auto;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    width: 100%;
    max-width: calc(100% - 30px);
}

/* 菜单层级 */
.menu-level {
    list-style: none;
    text-align: right;
    width: 100%;
}

/* 菜单项基础样式 */
.menu-item {
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
    animation: fadeIn 0.2s ease-out forwards; /* 合并动画 */
}

.menu-item:last-child {
    border-bottom: none;
}

/* 主/子菜单项区分 */
.menu-item.main-item {
    border-bottom: 1px solid #f1f1f1;
}

.menu-item.submenu-item {
    border-bottom: 1px solid #f8f8f8;
    border-top: 1px solid #f5f5f5;
    margin-top: 5px;
}

/* 老人头图标 */
.elder-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237f8c8d'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

/* 菜单触发区 */
.menu-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    width: 100%;
    flex-direction: row-reverse;
    white-space: nowrap;
    overflow: hidden;
}

/* 子菜单触发区交互控制 */
.submenu-item .menu-trigger {
    pointer-events: none;
    opacity: 0.6;
}

.menu-item.expanded > .submenu-container .submenu-item .menu-trigger {
    pointer-events: auto;
    opacity: 1;
}

/* 子菜单容器（折叠/展开控制） */
.submenu-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
    display: none;
    margin-right: 45px; /* 右缩进 */
    padding-right: 15px;
    border-right: 1px dashed #e0e0e0;
    width: 100%;
}

/* 更深层级子菜单默认隐藏 */
.submenu-container .submenu-container {
    display: none;
}

/* 展开状态 */
.menu-item.expanded > .submenu-container {
    display: block;
    max-height: 2000px;
    transition: max-height 1s ease-in-out;
    margin-top: 10px;
    margin-bottom: 10px;
}

/* 菜单触发区hover/展开样式 */
.menu-trigger:hover {
    background-color: #f9f9f9;
}

.menu-item.expanded > .menu-trigger {
    background-color: #f0f7ff;
}

/* 菜单文本 */
.menu-text {
    color: #2d3436;
    font-size: 12px;
    flex: 1;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-item.expanded .menu-text {
    color: #2980b9;
    font-weight: 500;
}

/* 子菜单数量徽章 */
.submenu-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #e0e7ff;
    color: #2980b9;
    font-size: 13px;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    padding: 0 5px;
    margin-left: 8px;
}

/* 展开/折叠箭头 */
.menu-arrow {
    color: #b2bec3;
    transition: all 0.3s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    flex-shrink: 0;
}

.menu-item.expanded .menu-arrow {
    transform: rotate(180deg);
    color: #2980b9;
}

/* 垂直菜单层级缩进 */
.level-1 .menu-trigger,
.level-2 .menu-trigger,
.level-3 .menu-trigger {
    padding-right: 20px;
    padding-top: 12px;
    padding-bottom: 12px;
}

/* 横向菜单样式 - 保留网格布局菜单功能 */
.menu-container.horizontal-menu {
    background-color: white;
    margin: 20px auto;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    width: 100%;
    max-width: calc(100% - 30px);
    padding: 20px;
}

/* 横向菜单标题 */
.menu-level-title {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 横向菜单标题图标 */
.menu-level-title .avatar-icon {
    width: 20px;
    height: 40px;
    color: #2980b9;
    flex-shrink: 0;
}

/* 横向菜单列表（网格布局） */
.horizontal-menu-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding: 8px 0;
    animation: fadeIn 0.3s ease;
}

/* 横向菜单卡片 */
.horizontal-menu-card {
    background-color: #f9fafb;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.horizontal-menu-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    border-color: #e1eaf1;
    background-color: #ffffff;
}

/* 菜单卡片内容 */
.menu-card-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 菜单卡片头部（名称+徽章+点赞） */
.menu-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 菜单名称与点赞组合 */
.menu-name-like-group {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 140px;
}

.menu-card-name {
    font-size: 12px;
    font-weight: 500;
    color: #2d3436;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* 横向菜单卡片徽章 */
.menu-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #e0e7ff;
    color: #2980b9;
    font-size: 12px;
    font-weight: 600;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    padding: 0 6px;
}

/* 点赞组件 */
.like-container {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #95a5a6;
    transition: color 0.2s;
}

.like-star {
    cursor: pointer;
    transition: all 0.2s ease;
    width: 14px;
    height: 14px;
}

.like-star:hover {
    transform: scale(1.15);
    color: #f39c12;
}

.like-star.liked {
    color: #f39c12;
    fill: #f39c12;
    animation: pulse 0.5s ease;
}

.like-count {
    font-size: 11px;
    font-weight: 500;
}

/* 空状态样式 */
.menu-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
    font-size: 14px;
    background-color: #f9fafb;
    border-radius: 10px;
    border: 1px dashed #e1eaf1;
    animation: fadeIn 0.3s ease;
}

.menu-empty-state::before {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23cbd5e1'%3E%3Cpath d='M12 5.69l5 4.5V18h-2v-6H9v6H7v-7.81l5-4.5M12 3L2 12h3v8h6v-6h2v6h6v-8h3L12 3z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

/* 表单容器样式 - 合并所有表单相关样式 */
.form-container {
    background-color: white;
    margin: 15px auto;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 30px;
}

h1 {
    color: #2d3436;
    border-bottom: 2px solid #2980b9;
    padding-bottom: 10px;
    margin-bottom: 25px;
    font-size: 13px;
}

.form-group {
    margin-bottom: 12px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.1);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

button {
    background-color: #2980b9;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: #216d9e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: translateY(0);
}

.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 13px;
}

.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.image-upload {
    border: 2px dashed #ddd;
    padding: 10px 10px;
    font-size: 13px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    color: #777;
}

.image-upload:hover {
    border-color: #2980b9;
    background-color: #f0f7ff;
    color: #2980b9;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #2980b9;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover {
    color: #1976d2;
    text-decoration: underline;
}

/* 底部导航栏 */
.bottom-nav {
    background-color: #2980b9;
    color: white;
    padding: 12px 20px;
    margin-top: 20px;
}

.bottom-nav .nav-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.bottom-nav span {
    font-size: 13px;
    opacity: 0.9;
}

/* 总点赞数样式 */
.total-like-container {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.total-like-star {
    animation: pulse 0.5s ease;
}

/* 自定义右键菜单样式 */
#customContextMenu {
    display: none;
    position: fixed;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 5px 0;
}

#customContextMenu button {
    display: block;
    width: 100%;
    padding: 8px 15px;
    background: none;
    border: none;
    text-align: left;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    border-radius: 0;
    box-shadow: none;
}

#customContextMenu button:hover {
    background-color: #f0f0f0;
    transform: none;
}

/* 保护覆盖层 */
.protection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    display: none;
}

/* 动画效果 - 统一管理所有动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* 响应式适配 - 合并所有媒体查询 */
@media (max-width: 768px) {
    .horizontal-menu-list {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
    }

    .top-nav .nav-content {
        gap: 10px;
    }

    .menu-path {
        font-size: 12px;
        padding: 0 5px;
    }

    .func-link {
        width: 38px;
        height: 38px;
    }

    .menu-name-like-group {
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    /* 垂直菜单适配 */
    .menu-trigger {
        padding: 14px 15px;
    }
    
    .menu-text {
        font-size: 12px;
    }
    
    .submenu-container {
        margin-right: 35px;
    }
    
    .level-1 .menu-trigger,
    .level-2 .menu-trigger,
    .level-3 .menu-trigger {
        padding-right: 15px;
    }
    
    .elder-icon {
        width: 14px;
        height: 14px;
    }

    /* 横向菜单适配 */
    .horizontal-menu-list {
        grid-template-columns: 1fr 1fr; /* 小屏幕2列布局 */
    }

    .menu-container.horizontal-menu {
        padding: 15px;
        margin: 15px auto;
    }

    .menu-card-content {
        padding: 14px;
    }

    .menu-card-name {
        font-size: 11px;
    }

    /* 表单适配 */
    .form-container {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 12px;
    }
    
    input, textarea {
        padding: 10px 12px;
        font-size: 12px;
    }

    button {
        width: 100%;
        padding: 14px;
        font-size: 12px;
    }

    /* 图标适配 */
    .top-nav .icon-links {
        gap: 8px;
    }

    .func-link,
    .admin-link, 
    .message-link {
        width: 34px;
        height: 34px;
    }
    
    .admin-icon, 
    .message-icon {
        width: 20px;
        height: 20px;
    }

    .submenu-count {
        font-size: 13px;
        min-width: 18px;
        height: 18px;
    }
}

/* 键盘导航焦点样式 - 统一焦点状态 */
.menu-trigger:focus {
    outline: 2px solid #2980b9;
    outline-offset: -2px;
}

.admin-link:focus, 
.message-link:focus {
    outline: 2px solid #2980b9;
    outline-offset: 2px;
}

/* 图标字体样式 */
.icon {
    font-family: "Atamekentom" !important;
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
/* ==============================================
   1. 基础全局样式（合并并所有重复的基础样式）
   ============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Atamekentom', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #2d3436;
    line-height: 1.6;
    overflow-x: hidden; /* 禁止横向滚动 */
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

/* ==============================================
   2. 顶部导航栏（合并所有页面的导航样式）
   ============================================== */
.top-nav {
    background-color: #2980b9;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.top-nav .nav-content {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 15px;
}

.top-nav .page-title {
    font-size: 12px;
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 菜单路径（RTL适配） */
.menu-path {
    font-size: 12px;
    color: #000000;
    flex: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
}

.path-separator {
    color: rgba(255, 255, 255, 0.7);
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.path-item {
    cursor: pointer;
    transition: all 0.2s;
    padding: 2px 4px;
    border-radius: 4px;
}

.path-item:hover {
    color: #ff0000;
    font-size: 13px;
    background-color: rgba(255, 255, 255, 0.1);
}

.path-root {
    cursor: pointer;
    text-decoration: underline;
    font-weight: 500;
}

.path-root:hover {
    color: #000000;
}

/* ==============================================
   3. 顶部功能图标（合并所有重复的图标样式）
   ============================================== */
.top-nav .icon-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 通用功能图标 */
.func-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    background-color: #3498db;
    color: white;
}

.func-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    filter: brightness(1.05);
}

.func-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 管理员入口图标 */
.admin-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: #27ae60;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(39, 174, 96, 0.15);
    flex-shrink: 0;
    position: relative;
}

.admin-link::after {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(270deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: all 0.5s;
}

.admin-link:hover {
    background-color: #219653;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.admin-link:hover::after {
    right: 100%;
}

.admin-link:active {
    transform: translateY(0);
}

/* 留言图标 */
.message-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: #3498db;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    flex-shrink: 0;
}

.message-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.message-link:active {
    transform: translateY(0);
}

/* 图标尺寸统一 */
.message-icon, .admin-icon {
    width: 24px;
    height: 24px;
}

/* ==============================================
   4. 垂直折叠菜单样式（原菜单页专属）
   ============================================== */
.menu-container.vertical {
    background-color: white;
    margin: 15px auto;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    width: 100%;
    max-width: calc(100% - 30px);
}

.menu-level {
    list-style: none;
    text-align: right;
    width: 100%;
}

.menu-item {
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
    animation: fadeIn 0.2s ease-out forwards;
}

.menu-item:nth-child(1) { animation-delay: 0.05s; }
.menu-item:nth-child(2) { animation-delay: 0.1s; }
.menu-item:nth-child(3) { animation-delay: 0.15s; }
.menu-item:nth-child(4) { animation-delay: 0.2s; }
.menu-item:nth-child(5) { animation-delay: 0.25s; }

.menu-item:last-child {
    border-bottom: none;
}

.menu-item.main-item {
    border-bottom: 1px solid #f1f1f1;
}

.menu-item.submenu-item {
    border-bottom: 1px solid #f8f8f8;
    border-top: 1px solid #f5f5f5;
    margin-top: 5px;
}

.elder-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237f8c8d'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

.menu-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    width: 100%;
    flex-direction: row-reverse;
    white-space: nowrap;
    overflow: hidden;
}

.submenu-item .menu-trigger {
    pointer-events: none;
    opacity: 0.6;
}

.menu-item.expanded > .submenu-container .submenu-item .menu-trigger {
    pointer-events: auto;
    opacity: 1;
}

.submenu-container .submenu-container {
    display: none;
}

.menu-item.expanded > .submenu-container {
    display: block;
    max-height: 2000px;
    transition: max-height 1s ease-in-out;
    margin-top: 10px;
    margin-bottom: 10px;
}

.menu-trigger:hover {
    background-color: #f9f9f9;
}

.menu-item.expanded > .menu-trigger {
    background-color: #f0f7ff;
}

.menu-text {
    color: #2d3436;
    font-size: 12px;
    flex: 1;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-item.expanded .menu-text {
    color: #2980b9;
    font-weight: 500;
}

.submenu-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #e0e7ff;
    color: #2980b9;
    font-size: 13px;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    padding: 0 5px;
    margin-left: 8px;
}

.menu-arrow {
    color: #b2bec3;
    transition: all 0.3s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    flex-shrink: 0;
}

.menu-item.expanded .menu-arrow {
    transform: rotate(180deg);
    color: #2980b9;
}

.submenu-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
    display: none;
    margin-right: 45px;
    padding-right: 15px;
    border-right: 1px dashed #e0e0e0;
    width: 100%;
}

.level-1 .menu-trigger,
.level-2 .menu-trigger,
.level-3 .menu-trigger {
    padding-right: 20px;
    padding-top: 12px;
    padding-bottom: 12px;
}

/* ==============================================
   5. 横向网格菜单样式（原横向菜单页专属）
   ============================================== */
.menu-container.horizontal {
    background-color: white;
    margin: 20px auto;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    width: 100%;
    max-width: calc(100% - 30px);
    padding: 20px;
}

.menu-level-title {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-level-title .avatar-icon {
    width: 20px;
    height: 20px;
    color: #2980b9;
    flex-shrink: 0;
}

.horizontal-menu-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding: 8px 0;
    animation: fadeIn 0.3s ease;
}

.horizontal-menu-card {
    background-color: #f9fafb;
    border-radius: 10px;
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.horizontal-menu-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
    border-color: #e1eaf1;
    background-color: #ffffff;
}

.menu-card-content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-name-like-group {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 140px;
}

.menu-card-name {
    font-size: 12px;
    font-weight: 500;
    color: #2d3436;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.menu-card-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #e0e7ff;
    color: #2980b9;
    font-size: 12px;
    font-weight: 600;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    padding: 0 6px;
}

.like-container {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #95a5a6;
    transition: color 0.2s;
}

.like-star {
    cursor: pointer;
    transition: all 0.2s ease;
    width: 14px;
    height: 14px;
}

.like-star:hover {
    transform: scale(1.15);
    color: #f39c12;
}

.like-star.liked {
    color: #f39c12;
    fill: #f39c12;
    animation: pulse 0.5s ease;
}

.like-count {
    font-size: 11px;
    font-weight: 500;
}

.menu-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #95a5a6;
    font-size: 14px;
    background-color: #f9fafb;
    border-radius: 10px;
    border: 1px dashed #e1eaf1;
    animation: fadeIn 0.3s ease;
}

.menu-empty-state::before {
    content: '';
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23cbd5e1'%3E%3Cpath d='M12 5.69l5 4.5V18h-2v-6H9v6H7v-7.81l5-4.5M12 3L2 12h3v8h6v-6h2v6h6v-8h3L12 3z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
}

.total-like-container {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.total-like-star {
    animation: pulse 0.5s ease;
}

/* ==============================================
   6. 表单容器样式（合并所有表单相关样式）
   ============================================== */
.form-container {
    background-color: white;
    margin: 15px auto;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    padding: 30px;
}

h1 {
    color: #2d3436;
    border-bottom: 2px solid #2980b9;
    padding-bottom: 10px;
    margin-bottom: 25px;
    font-size: 13px;
}

.form-group {
    margin-bottom: 12px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #2980b9;
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.1);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

button {
    background-color: #2980b9;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: #216d9e;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:active {
    transform: translateY(0);
}

.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 13px;
}

.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.error {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.image-upload {
    border: 2px dashed #ddd;
    padding: 10px 10px;
    font-size: 13px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    color: #777;
}

.image-upload:hover {
    border-color: #2980b9;
    background-color: #f0f7ff;
    color: #2980b9;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #2980b9;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover {
    color: #1976d2;
    text-decoration: underline;
}

/* ==============================================
   7. 底部导航栏（横向菜单页专属）
   ============================================== */
.bottom-nav {
    background-color: #2980b9;
    color: white;
    padding: 12px 20px;
    margin-top: 20px;
}

.bottom-nav .nav-content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.bottom-nav span {
    font-size: 13px;
    opacity: 0.9;
}

/* ==============================================
   8. 自定义右键菜单和保护覆盖层
   ============================================== */
#customContextMenu {
    display: none;
    position: fixed;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 5px 0;
}

#customContextMenu button {
    display: block;
    width: 100%;
    padding: 8px 15px;
    background: none;
    border: none;
    text-align: left;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    border-radius: 0;
    box-shadow: none;
}

#customContextMenu button:hover {
    background-color: #f0f0f0;
    transform: none;
    background-color: #f0f0f0;
}

.protection-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    display: none;
}

/* ==============================================
   9. 动画效果（合并所有动画）
   ============================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* ==============================================
   10. 响应式适配（合并所有媒体查询）
   ============================================== */
@media (max-width: 768px) {
    .horizontal-menu-list {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 12px;
    }

    .top-nav .nav-content {
        gap: 10px;
    }

    .menu-path {
        font-size: 12px;
        padding: 0 5px;
    }

    .func-link {
        width: 38px;
        height: 38px;
    }

    .menu-name-like-group {
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    /* 垂直菜单适配 */
    .menu-trigger {
        padding: 14px 15px;
    }
    
    .menu-text {
        font-size: 12px;
    }
    
    .submenu-container {
        margin-right: 35px;
    }
    
    .level-1 .menu-trigger,
    .level-2 .menu-trigger,
    .level-3 .menu-trigger {
        padding-right: 15px;
    }
    
    .elder-icon {
        width: 14px;
        height: 14px;
    }

    /* 横向菜单适配 */
    .horizontal-menu-list {
        grid-template-columns: 1fr 1fr;
    }

    .menu-container.horizontal {
        padding: 15px;
        margin: 15px auto;
    }

    .menu-card-content {
        padding: 14px;
    }

    .menu-card-name {
        font-size: 11px;
    }

    /* 表单适配 */
    .form-container {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 12px;
    }
    
    input, textarea {
        padding: 10px 12px;
        font-size: 12px;
    }

    button {
        width: 100%;
        padding: 14px;
        font-size: 12px;
    }

    /* 图标适配 */
    .top-nav .icon-links {
        gap: 8px;
    }

    .admin-link, .message-link, .func-link {
        width: 34px;
        height: 34px;
    }
    
    .admin-icon, .message-icon {
        width: 20px;
        height: 20px;
    }

    .submenu-count {
        font-size: 13px;
        min-width: 18px;
        height: 18px;
    }
}

/* ==============================================
   11. 键盘导航焦点样式（合并所有焦点样式）
   ============================================== */
.menu-trigger:focus {
    outline: 2px solid #2980b9;
    outline-offset: -2px;
}

.admin-link:focus, .message-link:focus, .func-link:focus {
    outline: 2px solid #2980b9;
    outline-offset: 2px;
}
