/* 菜单按钮容器 */
.menu-container {
    position: relative;
}

/* 菜单触发按钮 */
.menu-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    transition: background 0.2s;
}

.menu-trigger:hover {
    background: #f5f5f5;
}

.menu-trigger svg {
    width: 22px;
    height: 22px;
    stroke: #333;
    stroke-width: 2;
    fill: none;
}

.menu-trigger .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ff4d4f;
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* 下拉菜单 */
.menu-dropdown {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 260px;
    overflow: hidden;
    animation: menuFadeIn 0.2s ease;
}

.menu-dropdown.show {
    display: block;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端全屏菜单 */
@media (max-width: 768px) {
    .menu-dropdown {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0;
        max-height: calc(100vh - 60px);
        overflow-y: auto;
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from {
            transform: translateY(-100%);
        }
        to {
            transform: translateY(0);
        }
    }
}

/* 用户信息头部 */
.menu-header {
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.menu-user-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.menu-user-info p {
    font-size: 12px;
    opacity: 0.8;
}

/* 菜单项网格 */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 12px;
    gap: 8px;
    background: white;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: #333;
    position: relative;
}

.menu-item:hover {
    background: #f5f5f5;
    transform: translateY(-2px);
}

.menu-item-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.menu-item span:not(.menu-item-badge) {
    font-size: 11px;
    color: #666;
}

.menu-item-badge {
    position: absolute;
    top: 4px;
    right: 20px;
    background: #ff4d4f;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* 退出按钮 */
.menu-footer {
    border-top: 1px solid #f0f0f0;
    padding: 12px;
    background: white;
}

.logout-btn {
    width: 100%;
    padding: 10px;
    background: none;
    border: none;
    color: #ff4d4f;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s;
    font-size: 14px;
}

.logout-btn:hover {
    background: #f5f5f5;
}

/* 未登录状态 */
.login-prompt {
    padding: 30px 20px;
    text-align: center;
    background: white;
}

.login-prompt p {
    color: #999;
    margin-bottom: 16px;
}

.login-btn {
    display: inline-block;
    padding: 10px 30px;
    background: #ff6b35;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
}